Comment

Comment by michaelsbradley

If readers are curious how to get up-and-running with a (non-mining) full node (ETH1) at home, it's quite simple.

This is how I did/do it on my Intel NUC running Ubuntu Server 20.04:

1. Download a prebuilt binary from https://geth.ethereum.org/downloads/.

2. Unpack it. Optionally make it (or a symlink) available in your PATH.

3. Create a service definition, enable it, and start it:

   [Unit]
   Description=Go Ethereum
   
   [Service]
   Type=simple
   WorkingDirectory=/home/user
   ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment GETH_EXT_IP=$$(/home/user/.local/bin/ext-ip.sh)"
   ExecStart=/home/user/.local/bin/geth \
     --nat extip:${GETH_EXT_IP} \
     --ws
   StandardError=append:/home/user/.ethereum/geth.log
   PermissionsStartOnly=true
   User=user
   Group=user
   Restart=always
   RestartSec=5
   
   [Install]
   WantedBy=default.target

The script ~/.local/bin/ext-ip.sh consists of:

   #!/usr/bin/env bash
   
   dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{print $2}'

And that's it. geth will start syncing mainnet and will likely finish in under 12 hours (depending on your Internet connection, of course).

Note: the initial sync is intensive in both network and disk IO, you'll need an SSD. Also, running a full node long-term (without pruning) currently eats quite a bit of disk space:

   $ du -sh ~/.ethereum/geth

   598G /home/user/.ethereum/geth

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton