Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

systemd

Edit:

/etc/systemd/system/lnd.service
[Service]
Environment=HOME=/home/ubuntu
ExecStart=/home/ubuntu/go/bin/lnd
ExecStop=/home/ubuntu/go/bin/lncli stop
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
SyslogIdentifier=lnd
User=ubuntu
Group=ubuntu

[Install]
WantedBy=multi-user.target

Commands:

# start
sudo systemctl start lnd

# restart
sudo systemctl restart lnd

# monitor
journalctl -fu lnd

# run at startup
sudo systemctl enable lnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment