Search…
Running as a service
Using systemd, run WildBeast as a service for automatic (re)starting
Good to know: This guide uses systemd, we're assuming this is present on your system.
If you're using Ubuntu 20.04, you're already using systemd.

Making a new service

Start creating a new service:
1
sudo nano /etc/systemd/system/wildbeast.service
Copied!
Copy and paste the following example:
1
[Unit]
2
After=network.target network-online.target
3
Requires=network.target network-online.target
4
StartLimitBurst=3
5
StartLimitIntervalSec=0
6
7
[Service]
8
WorkingDirectory=/REPLACE THIS
9
Type=simple
10
Restart=on-failure
11
RestartSec=1
12
User=REPLACE THIS
13
ExecStart=/usr/bin/env npm start
14
15
[Install]
16
WantedBy=multi-user.target
Copied!
Pay attention to the REPLACE THIS, as you might've guessed you need to replace these values.
  • WorkingDirectory - The folder where you saved WildBeast
    For example: /home/wildbeast/WildBeast
  • User - The user that's going to run WildBeast
    Do NOT use root, create a new user for safety.

Controlling the service

Starting

1
sudo systemctl start wildbeast.service
Copied!

Stopping

1
sudo systemctl stop wildbeast.service
Copied!

Start on boot

1
sudo systemctl enable wildbeast.service
Copied!
To undo:
1
sudo systemctl disable wildbeast.service
Copied!

Restarting

1
sudo systemctl restart wildbeast.service
Copied!
Last modified 1mo ago