Skip to content

Instantly share code, notes, and snippets.

@veox
Last active April 29, 2022 17:41
Show Gist options
  • Save veox/b4c2c121bf39e8c9e88026526cab4fc7 to your computer and use it in GitHub Desktop.
Save veox/b4c2c121bf39e8c9e88026526cab4fc7 to your computer and use it in GitHub Desktop.
go-ethereum systemd config
[Unit]
Description=go-ethereum node
After=network.target
[Service]
Type=simple
User=geth
Group=geth
## ===== initial sync: no light peers, please =====
ExecStart=/usr/bin/geth --nousb --datadir /home/geth/.ethereum --cache 2048 --txpool.pricelimit 99999999999 --txpool.globalslots 1024
## ============ full nodes' monitoring ============
#ExecStart=/usr/bin/geth --nousb --datadir /home/geth/.ethereum --cache 2048 --txpool.pricelimit 1000000000 --txpool.globalslots 2048 --txpool.accountslots 2 --txpool.accountqueue 2 --maxpeers 1000
## ================ live LES mode =================
#ExecStart=/usr/bin/geth --nousb --datadir /home/geth/.ethereum --cache 2048 --txpool.pricelimit 1000000000 --txpool.globalslots 2048 --txpool.accountslots 2 --txpool.accountqueue 2 --lightserv 50 --lightpeers 775 --maxpeers 800
## =============== debug LES mode =================
#ExecStart=/usr/bin/geth --nousb --datadir /home/geth/.ethereum --cache 2048 --txpool.pricelimit 1000000000 --txpool.globalslots 2048 --txpool.accountslots 2 --txpool.accountqueue 2 --lightserv 50 --lightpeers 3000 --maxpeers 3025 --vmodule "downloader=4"
## restart options
#KillSignal=SIGINT
TimeoutStopSec=120
Restart=on-failure
[Install]
WantedBy=multi-user.target
@veox
Copy link
Author

veox commented Aug 2, 2018

Oh, also: this is on the ETH main-net; on Ropsten, the same .service works pretty well on a much lower-spec machine, because the "~ 500" light client limit is never even reached, there's a lot less transactions, the chain state is smaller, etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment