recommended
recommended
recommended
recommended
recommended
recommended
recommended
recommended
Set it up run these on the target machine
- 1
Place the unit file. System-wide units live in /etc/systemd/system/. (Or just drop your downloaded file there with sudo cp.)
sudo tee /etc/systemd/system/myapp.service > /dev/null <<'EOF' # …paste the generated file here… EOF
- 2
Sanity-check the file for syntax errors and unknown directives.
sudo systemd-analyze verify /etc/systemd/system/myapp.service
- 3
Make systemd aware of the new or changed unit file.
sudo systemctl daemon-reload
- 4
Start it immediately AND enable it to start on boot. Drop --now to only enable.
sudo systemctl enable --now myapp.service
- 5
Check it's running. Use journalctl -u myapp.service -f to follow logs.
systemctl status myapp.service