systemd Service Generator
Create a systemd .service (or .timer) unit with restart and hardening.
About this tool
Enter the command to run, its working directory, the user to run as, environment variables or an EnvironmentFile, and the restart policy. Tick hardening for extra isolation, or Run on a schedule to get a oneshot service plus a .timer. The file paths and the systemctl and journalctl commands to enable and watch it are included.
Running an app with systemd
systemd is the service manager on almost every modern Linux distribution. A .service unit tells it how to start your program, as which user, in which folder, with which environment, and what to do if it exits. Restart=on-failure brings a crashed app back after RestartSec seconds, After/Wants=network-online.target waits for networking, and WantedBy=multi-user.target starts it at boot when enabled. Logs go to the journal (journalctl -u NAME -f), so you don't need log files or nohup. The hardening options sandbox the service. NoNewPrivileges blocks privilege escalation, PrivateTmp gives it its own /tmp, ProtectSystem=strict makes the filesystem read-only except for paths in ReadWritePaths, and ProtectHome hides home directories. A .timer runs a oneshot service on a schedule, a modern alternative to cron with logging, catch-up after downtime (Persistent=true) and randomised delays. Honest limits: ExecStart needs absolute paths, because systemd doesn't use your shell's PATH. Hardening can stop apps that write unexpected places, so check journalctl if the service fails. Test calendar expressions with systemd-analyze calendar. The cron generator, the nginx config generator and the .env converter are related.
Frequently asked questions
How do I create a systemd service?
Save the unit as /etc/systemd/system/NAME.service, run sudo systemctl daemon-reload, then sudo systemctl enable --now NAME.
Where do systemd service logs go?
To the journal: journalctl -u NAME -f follows them live.
Should I use a systemd timer or cron?
Timers integrate with logging, catch up missed runs and can depend on other units. Cron is simpler and universal.
Is anything uploaded?
No. The file is generated in your browser and nothing is stored or sent.