Skip to content

Instantly share code, notes, and snippets.

@mariodian
Created July 6, 2016 06:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mariodian/c649cda70291dbc6e083bdc410e6f8aa to your computer and use it in GitHub Desktop.
Save mariodian/c649cda70291dbc6e083bdc410e6f8aa to your computer and use it in GitHub Desktop.
Bitcoind Systemd script
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=pi
Group=pi
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
ExecStart=/usr/local/bin/bitcoind -daemon
ExecStop=/usr/local/bin/bitcoin-cli stop
KillMode=process
Restart=on-failure
TimeoutSec=120
[Install]
WantedBy=multi-user.target
@yonderblue
Copy link

Can use Type=simple and no -daemon along with -nodebuglogfile to have it use journald, saving that disk access, and also not needing bitcoin-cli stop.

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