docs: add example systemd service file

This is an example systemd service file for lnd designed to run
alongside a bitcoind service. This file is loosely based on
https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service,
https://gist.github.com/Stadicus/f0c6db4fa6cf787f19d9d3444b91633f,
and my own experience managing lnd with systemd.
This commit is contained in:
Daniel McNally committed 2021-11-30 23:43:24 -05:00
1 parent 03a038c769
commit 128ec2c454
3 files changed
+88

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# Init
Sample configuration files for:
```
systemd: lnd.service
```
## systemd
Add the example `lnd.service` file to `/etc/systemd/system/` and modify it according to your system and user configuration. Use the following commands to interact with the service:
```bash
# Enable lnd to automatically start on system boot
systemctl enable lnd
# Start lnd
systemctl start lnd
# Restart lnd
systemctl restart lnd
# Stop lnd
systemctl stop lnd
```
Systemd will attempt to restart lnd automatically if it crashes or otherwise stops unexpectedly.