systemd "Failed to start: Unit not found" — Name, Path, or [Install]

The unit you referenced doesn't exist as systemd sees it — typo, missing file, or an unreadable path. One command shows what systemd actually loaded; then it's fixing names and daemon-reload.

What you'll see

Root causes

Name mismatch / file missing

systemctl cat <unit> reads the file; 'No such file or directory' means the name or path is wrong (suffix .service matters).

Stale unit list — no daemon-reload after changes

systemd caches unit state. Any file change/add/remove requires: systemctl daemon-reload before start/enable sees it.

Requires/After references a nonexistent unit

The failing unit exists but its [Unit] Requires= names one that doesn't — the error names the missing dependency.

Missing [Install] section for enable

'created a symlink ... disabled anyway' — enable needs [Install] WantedBy=multi-user.target.

Fix it

  1. Ask systemd what it knows about the name
    systemctl cat <name>.service 2>&1 | head -5 ; systemctl list-units --all | grep -i <part-of-name>
  2. Fix the file path/permissions and reload the daemon
    sudo systemctl daemon-reload && sudo systemctl start <name>.service
  3. Add [Install] so enable persists across boots
    # in the unit file: [Install]
    # WantedBy=multi-user.target   then: sudo systemctl daemon-reload && sudo systemctl enable <name>.service
  4. Missing dependencies: point Requires/Wants at real units
    systemctl list-unit-files | grep -iE 'network|docker'   # fix the referenced name in [Unit]

Field note

Unit files go in /etc/systemd/system (admin) — /usr/lib/systemd/system is the package lane, upgrades can overwrite it. systemd-analyze verify <unit> checks for typos and missing deps before you try to start it.

Common questions

Why does daemon-reload matter so much?

systemd caches the unit table in memory. Editing files on disk doesn't update that table — start/enable keep using the old definition (or 'not found' for new ones) until daemon-reload runs.

Where should my custom unit live?

/etc/systemd/system/ — it overrides package units and survives package upgrades. Confirm ownership/permissions (root:root 644) so systemd accepts it.

Ship it right the first time

Our most-documented failures, packaged as ready-to-ship starter kits: Docker, Kubernetes, and Terraform.

Browse the template store →

One-time. Yours to modify. Instant download from the NinjaOps template store.