Skip to content

Instantly share code, notes, and snippets.

@fmoledina
Forked from Stadicus/lightningd.service
Last active February 5, 2018 23:21
Show Gist options
  • Save fmoledina/02b525c39ce8ba883513cb42c9a0f678 to your computer and use it in GitHub Desktop.
Save fmoledina/02b525c39ce8ba883513cb42c9a0f678 to your computer and use it in GitHub Desktop.
systemd for c-lightning daemon
[Unit]
Description=C-Lightning daemon
Requires=bitcoind.service
Requires=getpubip.service
After=bitcoind.service
[Service]
# get var PUBIP from file
EnvironmentFile=/etc/pubip/pubip
# wait 2 minutes until bitcoind has loaded blockchain data
#ExecStartPre=/bin/sleep 120
ExecStart=/usr/local/bin/lightningd --network bitcoin --log-level debug --rgb HEXXXX --alias ALIAS --ipaddr $PUBIP_V4 --ipaddr=$PUBIP_V6 --lightning-dir=/var/lib/lightningd --bitcoin-datadir=/var/lib/bitcoind
PIDFile=/var/lib/lightningd/lightningd.pid
User=bitcoin
Group=bitcoin
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment