Skip to content

Instantly share code, notes, and snippets.

@Stadicus
Last active January 23, 2023 07:50
Show Gist options
  • Save Stadicus/f0c6db4fa6cf787f19d9d3444b91633f to your computer and use it in GitHub Desktop.
Save Stadicus/f0c6db4fa6cf787f19d9d3444b91633f to your computer and use it in GitHub Desktop.
systemd service for LND Lightning Daemon
[Unit]
Description=LND Lightning Daemon
Requires=bitcoind.service
After=getpublicip.service
After=bitcoind.service
# for use with sendmail alert
#OnFailure=systemd-sendmail@%n
[Service]
# get var PUBIP from file
EnvironmentFile=/run/publicip
ExecStart=/usr/local/bin/lnd --externalip=${PUBLICIP}
PIDFile=/home/bitcoin/.lnd/lnd.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