Systemd Service
In this section we describe how to enable, disable, start, stop the Systemd Service.
The service is set up by the assisted installer automatically, or manually as described in the manual installation and docker install.
While the Lightning-CLI Node process can operate independently, it is recommended to utilize Systemd for service management of the Lightning Node process in Linux. It's important to note that any network-related settings, such as opting-in or opting-out of network participation, should be managed separately by the Node Operator via the CLI.
Reload the daemon
Reload the Systemctl daemon by executing the command:
sudo systemctl daemon-reload
Enable
Enable the service for starting up on system boot:
sudo systemctl enable lightning.service
If you have installed or set up the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl enable docker-lightning
You shouldn't have prefixed the systemctl command with sudo when start/stop/status the service. Due to some VPS providers modifying the operating system, we had to present the examples prefixed with sudo for the wider audience. If you'd like to learn more about controlling Systemd services as a user
check the reference Systemd user-service.
Disable
Disable the service for starting up on system boot:
sudo systemctl disable lightning.service
If you have installed or setup the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl disable docker-lightning
Start
Node participation can be true or false (online or offline) throughout an Epoch. Participation is in a transient state when the operator requests to opt in or out, and the network has yet to end the undergoing Epoch. Once the Epoch ends, the Node participation transitions to true or false. Therefore, a Node Operator can expect a Node state to be online, offline, opted in or out during an Epoch lifetime.
Before starting the service, make sure to opt-in or opt-out of network participation, through the available subcommand opt in the CLI.
The quickest way to find help is to run the help subcommand as follows:
lgtn opt help
To learn more, read the Lightning-CLI section for command opt.
Start the service by:
sudo systemctl start lightning.service
When naming the service, the *.service can be omitted. For this reason the command can be typed as follows:
sudo systemctl start lightning
If you have installed or set up the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl start docker-lightning
Stop
To prevent any negative impact on the node's reputation, it's advisable to wait until the end of the Epoch (~24h) before shutting down the node when opting out. The same applies to nodes that have opted-in but are currently offline.
To learn more, read the Lightning-CLI section for command opt.
Shutting down a Node after an Epoch can be tedious, given the remaining time an Epoch can take to end. Doing it prematurely, will cause reputation penalties, e.g. shutting down before the participation state change to offline. Therefore, a shutdown utility is available in the Tools menu option of get.fleek.network
.
To access it, execute the command:
curl https://get.fleek.network | bash
Stop the service by:
sudo systemctl stop lightning
If you have installed or set up the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl stop docker-lightning
Restart
Restart the service by:
sudo systemctl restart lightning
If you have installed or set up the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl restart docker-lightning
Status
Check the service status by:
sudo systemctl status lightning.service
Network participation is solely managed by the Node Operator, who decides to opt-in or opt-out of node network participation.
It' s important for Node Operators to regularly monitor the status of their active nodes and ensure that they are actively participating in the network.
Any node that has opted-in but remains inactive will be subjected to reputation penalties.
To learn more read the Lightning-CLI Opt command section and health-checkups.
If you have installed or set up the Service as a Docker Container, prefix the service name with docker-
.
sudo systemctl status docker-lightning