Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

systemd Service Generator — Create a .service Unit File

Run your app as a proper Linux service that starts on boot and restarts when it crashes. Pick a preset (Node.js, Python, Go, a script), adjust the command, user and environment, and get a commented .service unit file with optional sandboxing — or a .timer to run a job on a schedule, like cron.

Aktualisiert am
Unit file
Install commands

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: systemd Service Generator

  1. Pick a preset — Node.js, Python with Gunicorn, a Go binary or a scheduled script — to fill sensible defaults.
  2. Set the command, working directory and the user it runs as (create it with useradd --system; never run apps as root).
  3. Add environment variables or an EnvironmentFile, choose the restart policy and keep sandboxing on.
  4. Copy the unit file to /etc/systemd/system/ and run the install commands shown.

The three sections of a unit file

SectionKey settings
[Unit]Description, and After=/Wants=network-online.target so the app starts once networking is up
[Service]ExecStart (absolute path), User, WorkingDirectory, Environment, Restart and RestartSec
[Install]WantedBy=multi-user.target — what systemctl enable hooks the service into so it starts at boot

Sandboxing

The hardening options make the service much safer with no code changes: NoNewPrivileges, ProtectSystem=strict (the filesystem is read-only except ReadWritePaths), ProtectHome, PrivateTmp, PrivateDevices and kernel protections. Check the result with systemd-analyze security my-app. If the app needs to write somewhere else, add that path to ReadWritePaths.

Timers instead of cron

A .timer unit starts a oneshot service on a calendar schedule. Unlike cron, its runs are logged in the journal, it can catch up on missed runs (Persistent=true) and you can see the next run with systemctl list-timers. To turn a cron line into an OnCalendar value, see the Cron Expression Generator.

Auch gesucht als: systemd unit file generator, create systemd service, systemd service file, node js systemd service, python systemd service, systemd timer generator, linux service file.

Passende Tools zu: systemd Service Generator

  • Nginx-Konfigurationsgenerator — Wähle aus, was Nginx tun soll – eine statische Website oder ein SPA bereitstellen, als Proxy für eine Node-/Python-App fungieren oder PHP ausführen – und setze ein Häkchen bei den Zusatzoptionen.
  • Dockerfile Generator — Choose your stack and get a production-ready Dockerfile: multi-stage build, cached dependency layer, non-root user, health check and a matching .dockerignore — explained line by line.
  • Apache VirtualHost Generator — Get a complete Apache virtual host config for your domain: a static site, WordPress, PHP-FPM or a reverse proxy to a Node or Python app.
  • Caddyfile Generator — Caddy gets HTTPS certificates automatically — you only describe your site.

Häufige Fragen

Where do I put a systemd service file?
Save it as /etc/systemd/system/NAME.service, run sudo systemctl daemon-reload, then sudo systemctl enable --now NAME to start it now and at every boot.
How do I see the logs of my service?
Run journalctl -u NAME -f to follow the log live, or journalctl -u NAME --since today. Anything the app prints to stdout or stderr ends up there.
What is the difference between Restart=always and on-failure?
on-failure restarts only after a crash or non-zero exit; always also restarts after a clean exit. Use on-failure for most apps and always for workers that should never stop.
Can systemd replace cron?
Yes — tick “Run on a schedule” to get a .timer unit. Timers log every run, can catch up after downtime and are easier to inspect than crontab entries.
Kann ich systemd Service Generator als Web-App installieren und offline nutzen?
Ja. systemd Service Generator ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools