systemd Service Generator

Generate a systemd unit file to autostart a program on boot — and the install commands to drop it in place. The right column shows both the .service file and the matching systemctl commands.

Service identity

Filename will be <name>.service. Lowercase, no spaces.

Command to run

Always use absolute paths. systemd does not run a shell unless you invoke one.

User & permissions

Run as this user instead of root. Leave blank to run as root.

Restart behaviour

Boot ordering

Logging

System vs user services: the unit goes in /etc/systemd/system/ for system-wide autostart at boot. For per-user services that start on login, drop it in ~/.config/systemd/user/ and run with systemctl --user.

Inspecting: after install, check status with systemctl status <name>, follow logs with journalctl -u <name> -f, and verify it survives reboot.

If it won't start: 90% of failures are absolute-path issues (use which python3 to be sure), permission errors (test by running the ExecStart line directly as the target user), or PATH dependencies (set Environment=PATH=... explicitly).

Hardening: the optional ProtectSystem / ProtectHome options are excellent defaults for hobby projects, but break services that need to write outside /var, /run, or /tmp. Disable if the service can't write its files.