Hi all,

I am running a couple of private nodes on AWS, and I am trying to get Geth to start on system start up.

I found this post --> Is there the start/stop script of geth after Debian/Ubuntu booting?

and followed it, trying the following in the [email protected] file

Description=Start geth<BR>
ExecStart=/bin/sh -c "/usr/bin/geth --networkid 1900 --nodiscover --verbosity 4 init /home/ubuntu/.ethereum/InitGenesis.json"<BR>

However I cannot get Geth to start.

systemctl status geth@ubuntu outputs:

<p>● [email protected] - Start geth<BR>
   Loaded: loaded (/etc/systemd/system/[email protected]; disabled; vendor preset: enabled)<BR>
   Active: inactive (dead)<P>

I am not sure what I am doing wrong. Can anyone point me in the right direction?

1 Answer 1


The way Geth currently works it's weird to be passing it init as an argument for when you routinely stop and start it. You run it once with init, also specifying your genesis.json file and the appropriate datadir, and that sets up the appropriate chain under the datadir. When you run it after that you just have to specify datadir. (You can omit datadir too if you're using mainnet or testnet, as it will use its default directories.)

Without using the systemd script, run it with init first, then confirm that you can start and stop manually. Also make sure you have the right rpc/ipc options that will allow you to connect to it in whatever way you intend to connect to it. Once that's working, stop it, copy your start command into the systemd script and start it with systemctl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.