Systemd service file generator
Run your app as a proper Linux service: it starts at boot, restarts when it crashes and logs to the journal. Fill in the command and get the unit file with optional sandboxing, plus the commands to enable it.
Restart policies
- on-failure restarts the app when it crashes or exits with an error, and leaves it stopped when it exits cleanly.
- always restarts it whatever happened. Good for workers that should never stop.
- RestartSec waits a few seconds between attempts, so a broken app does not spin.
Logs and control
- journalctl -u myapp -f shows the live output. Add --since today for less.
- systemctl restart myapp after a deploy, systemctl status myapp to see whether it is up.
- After editing the unit file, run systemctl daemon-reload first.
Why sandboxing
ProtectSystem=strict makes the whole file system read-only for the service except the paths you list, PrivateTmp gives it its own /tmp, and NoNewPrivileges stops it gaining rights through setuid programs. A bug in the app then cannot change the system.
More tools
- VPS ping test
- VPS cost calculator
- chmod calculator
- Cron generator
- Subnet calculator
- SSH key generator
- Bandwidth calculator
- What is my IP
- Cloud-init generator
- SSH hardening generator
- UFW firewall generator
- Fail2ban config generator
- WireGuard config generator
- Nginx reverse proxy generator
- Docker Compose generator
- Swap size calculator
- DNS lookup