DevOps & Config

systemd Unit Builder

Build and validate a systemd unit, with per-directive explanations.

  • Draft kept in this tabYour draft is kept in this tab's session storage and cleared when the tab closes.
  • Runs in your browserProcessing happens in this page. No application server receives your input.

systemd unit file source

Sections

Generated configuration is inert text and has not been validated against a live daemon, cluster, or host. Review every directive before deploying.

The sections are listed once the unit has been read.

Analysis

Counts and findings are shown once there is a unit to check.

What this tool checks and its limits

It reads one unit; it does not resolve Requires=, After=, or a .wants/ directory to other units, and it has no view of a system's unit tree. Drop-ins (unit.d/*.conf) and the merge order that gives them their meaning are out of scope. Specifiers (%i, %n, %H) are explained but not expanded, since expansion needs the instance name and the host. .service, .timer, .socket, .mount, .path, and .target are covered; .slice, .scope, and .swap parse but have no directive explanations. The directive table is the ~180 directives in common use, not all ~900: an unrecognized key is reported as info, never as invalid.

systemd lint rules

RuleSeverityFires when
SYSTEMD/unknown-sectionerrorA section header outside the known set
SYSTEMD/wrong-sectionerrorA known directive in a section it is not valid in โ€” systemd ignores these without a word, which is why the severity is not warning
SYSTEMD/type-needs-execerrorType= other than oneshot with no ExecStart
SYSTEMD/bad-timeerrorA time value that is not a systemd time span โ€” RestartSec=5min30, missing a unit
SYSTEMD/oneshot-restartwarningType=oneshot with Restart=always, which systemd refuses to start
SYSTEMD/no-restartwarningA long-running .service with no Restart=
SYSTEMD/relative-execwarningExecStart with a relative path. systemd requires absolute and fails at load
SYSTEMD/no-hardeninginfoNone of NoNewPrivileges, ProtectSystem, PrivateTmp, or User= is set
SYSTEMD/unknown-directiveinfoA key not in DIRECTIVES. Reported, never rejected โ€” the table is a subset and says so
SYSTEMD/deprecatedinfoA directive systemd has renamed, with its replacement named

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.