Going fully decentralized on the cheap

Setting up a “light” Geth node for $35 USD in hardware

The cheapest and most approachable way to get an Ethereum wallet is through MetaMask or Trust/Cipher/Toshi. Each of these has a handful of different network options ranging from their own servers to Infura. But what if we wanted to go fully decentralized and control a node that talks directly to the Ethereum network?

I should start by giving credit to Péter Szilágyi for how smooth Geth runs:

I chose the cheapest machine I could find on Amazon: Intel BOXSTCK1A8LFC Compute Stick. It has enough compute power and storage to keep up with the blockchain in “light” mode.

Intel Compute Stick

Unbox the Compute Stick and connect a keyboard, mouse, and monitor. You might need a USB hub too. For bonus points, I’m going to connect mine to a $40 touch screen display:

When Ubuntu first boots, you will go through setting up the language, wifi, password, and updates. A good note to make right now is if you ever mess anything up, you can restart your Compute Stick and Restore To Factory Settings. This will get you back to a fresh start.

“Restore to factory state” in Grub

When the OS is ready, you will want to launch a Terminal. (Ctrl + Alt + T) Then, run the following commands to install git:

sudo apt-get update
sudo apt-get install git -y

Once git is installed you can clone repositories so you don’t have to worry about the rest of the provisioning, we can run prepared scripts! I wrote a quick set of open source bash scripts that anyone can use and contribute to here:

git clone https://github.com/austintgriffith/gethcomputestick.git
cd gethcomputestick

Now you can install Geth with:

sudo bash install.sh

And you can fire up your Geth node with:

sudo bash run.sh

After a hot minute, you will start syncing blocks in realtime:

I went to bed after firing it up so I have no idea how long it took to sync, sorry :)

You now have a local Geth node up and running on port 8545 with open CORS and full RPC access.

Warning: You shouldn’t do this on a public network.

If you would like to use USB sticks for multiple accounts that you can swap out, the run.sh is already configured to run the IPC node on the native drive. All you need to do is clone the repo above to the USB stick instead:

cd /media/*nameofthecomputestick*/*nameoftheusb*
git clone https://github.com/austintgriffith/gethcomputestick.git
cd gethcomputestick
sudo bash install.sh
sudo bash run.sh

(This could also be handy if you are running into storage limits.)

From here I usually fire up a bunch of node scripts that run from the command line and orchestrate my smart contract functionality (clevis.io), but let’s play around with something more approachable, MetaMask:

Selecting the local Geth RPC from MetaMask (Localhost 8545)

If you select Localhost 8545, MetaMask will talk to your local Geth node instead of other ‘Centralized’ systems.

Making a fully decentralized transaction!

So there we have it! Your local node gives you access to the Ethereum network without touching any centralized system and it only costs $35.00!

Let’s have a little more fun and shamelessly plug a couple of my Dapps:

Playing Cryptogs.io was really, really slow on that cheap processor.
Galleass.io looks pretty weird on that cheap screen too! Heck, it looks pretty weird all the time…

All of my scripts/games are open source: https://github.com/austintgriffith

Hit me up on Twitter or Peepeth with comments or suggestions.

Learn more about me here: https://austingriffith.com Thanks!

Like what you read? Give Austin Thomas Griffith a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.