Skip to content

Running LightningTip with systemd

Michael edited this page Apr 1, 2018 · 2 revisions

Because LightningTip has to run all the time to connect the frontend and LND I recommend to start it on Linux with systemd.

Create a file called lightningtip.service in the directory /etc/systemd/system/ with the following content:

[Unit]
Description=LightningTip service
After=<name of the LND service>

[Service]
User=<user which should run LightningTip>
Group=<group of the user above>
ExecStart=<path to the executable>

# If LND is not fully started up yet LightningTip will crash
# this causes LightningTip to restart every 60 seconds if it fails to start
Restart=on-failure
RestartSec=60

[Install]
WantedBy=multi-user.target

To start LightningTip:

sudo systemctl start lightningtip

To stop it:

sudo systemctl stop lightningtip

To start it on boot:

sudo systemctl enable lightningtip