Created
January 18, 2024 22:46
-
-
Save anyxem/084e413167c283d42e7d7f4ad403c3ec to your computer and use it in GitHub Desktop.
Run node as a service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vim /etc/systemd/system/mltnode.service | |
Insert | |
[Unit] | |
Description=ML Node Daemon | |
After=network.target | |
[Service] | |
Type=Simple | |
User=safeuser | |
ExecStart=/home/safeuser/mintlayer/node-daemon # or exact path to your node-daemon | |
StandardOutput=file:/home/safeuser/mintlayer/mlnode.log | |
StandardError=file:/home/safeuser/mintlayer/mlnode-error.log | |
TimeoutStopSec=10 | |
KillSignal=SIGINT | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target | |
ESC | |
Press ZZ to save changes | |
$ sudo systemctl daemon-reload # to reload systemctl | |
$ sudo systemctl enable mltnode.service # to enable auto-run after server restart | |
$ sudo systemctl start mltnode.service # to kickstart service itself |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment