2018-08-14 01:55:12 +02:00
|
|
|
# It is not recommended to modify this file in-place, because it will
|
|
|
|
# be overwritten during package upgrades. If you want to add further
|
|
|
|
# options or overwrite existing ones then use
|
|
|
|
# $ systemctl edit lightningd.service
|
|
|
|
# See "man systemd.service" for details.
|
|
|
|
|
|
|
|
# Note that almost all daemon options could be specified in
|
|
|
|
# /etc/lightningd/lightningd.conf
|
|
|
|
|
|
|
|
[Unit]
|
2022-09-26 00:03:52 +02:00
|
|
|
Description=Core Lightning daemon
|
2018-08-14 01:55:12 +02:00
|
|
|
Requires=bitcoind.service
|
|
|
|
After=bitcoind.service
|
2019-05-16 16:55:56 +02:00
|
|
|
Wants=network-online.target
|
2019-08-19 17:04:53 +02:00
|
|
|
After=network-online.target
|
2018-08-14 01:55:12 +02:00
|
|
|
|
|
|
|
[Service]
|
2023-07-05 17:11:25 +02:00
|
|
|
ExecStart=/usr/bin/lightningd --conf /etc/lightningd/lightningd.conf --pid-file=/run/lightningd/lightningd.pid
|
2018-08-14 01:55:12 +02:00
|
|
|
|
|
|
|
# Creates /run/lightningd owned by bitcoin
|
|
|
|
RuntimeDirectory=lightningd
|
2022-09-26 00:58:40 +02:00
|
|
|
# Creates /etc/lightningd owned by bitcoin
|
|
|
|
ConfigurationDirectory=lightningd
|
2018-08-14 01:55:12 +02:00
|
|
|
|
|
|
|
User=bitcoin
|
|
|
|
Group=bitcoin
|
2023-07-05 17:11:25 +02:00
|
|
|
Type=simple
|
2018-08-14 01:55:12 +02:00
|
|
|
PIDFile=/run/lightningd/lightningd.pid
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
# Hardening measures
|
|
|
|
####################
|
|
|
|
|
|
|
|
# Provide a private /tmp and /var/tmp.
|
|
|
|
PrivateTmp=true
|
|
|
|
|
|
|
|
# Mount /usr, /boot/ and /etc read-only for the process.
|
|
|
|
ProtectSystem=full
|
|
|
|
|
|
|
|
# Disallow the process and all of its children to gain
|
|
|
|
# new privileges through execve().
|
|
|
|
NoNewPrivileges=true
|
|
|
|
|
|
|
|
# Use a new /dev namespace only populated with API pseudo devices
|
|
|
|
# such as /dev/null, /dev/zero and /dev/random.
|
|
|
|
PrivateDevices=true
|
|
|
|
|
|
|
|
# Deny the creation of writable and executable memory mappings.
|
2022-11-11 02:30:31 +01:00
|
|
|
# NOTE: This seems to break node.js plugins, notably Ride-The-Lightning/c-lightning-REST:
|
|
|
|
# https://github.com/Ride-The-Lightning/c-lightning-REST/issues/116
|
2018-08-14 01:55:12 +02:00
|
|
|
MemoryDenyWriteExecute=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|