I want to use a raspberry for IoT. For this project I need to start Ethereum (Geth) at privat chain in the boot state.

When I have some data, I would like to make a transaction (contract) to store the data.

Is there anybody who can help me?

  • I removed the pyethereum tag. If there is a connection I missed, please update your question to explain the connection and re-tag.
    – carver
    Nov 29, 2017 at 17:30

3 Answers 3


Check this answer for some options - How can I run go-ethereum as daemon process on Ubuntu?

And one more option - use /etc/inittab to add the geth process to TTY 10 (for example):

10:2345:respawn:/path/to/geth --geth_options console

later you can switch to that console with Ctrl + Alt + F10


A way to start on boot is to possibly find where you do mount geth and add it to the fstab so it starts on boot. Only issue here is that if it doesn't find it, it will not boot. So keep a proper backup somewhere so you don't lose out on stuff.

You can learn more here:


  1. power on raspi / open terminal
  2. download geth / move geth to bin
wget "https://gethstore.blob.core.windows.net/builds/geth-linux-arm7-1.9.7-a718daa6.tar.gz"
tar -xvf geth-linux-arm7-1.9.7-a718daa6.tar.gz;
cd geth-linux-arm7-1.9.7-a718daa6;
sudo mv geth /usr/local/bin/;
  1. initialize a geth node

geth --datadir privatenet init genesis.json

  1. edit the /etc/rc.local file to include a geth command or a shell script containing a geth command

geth --datadir add/path/privatenet ...

  1. Create a js or py file using web3.js, ethers.js, web3.py, etc. to first check if the local node is running. when the check returns positive, send a transaction to the blockchain to deploy your contract

  2. Return to /etc/rc.local and add a command to start the script created in step 5

  3. Restart raspi

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.