Fix a service that will not start on boot
We'll check systemctl enable, status, and journalctl, fix the unit file [Install] and dependencies—or tell you when to escalate.
What you'll need
- SSH or console access with sudo
Step-by-step diagnostic
Quick triage — pick your path
Quick triage — pick your path
Choose the option that matches what you see. You can jump straight to that section.
- Follow this guide Work through the full procedure from checking enable to fixing the unit.
- Check enable status You want to confirm the service is enabled first.
- Check boot logs The service fails at boot and you need the error.
- Fix unit file The unit lacks [Install] or has dependency issues.
- When to escalate Config management or packaged unit you cannot modify.
Show full guide
Steps
Goal: Check systemctl enable, status, and journalctl, then fix the unit file or dependencies.
- Run
systemctl is-enabled servicename. If disabled, runsudo systemctl enable servicename. - Good: Service is enabled. Proceed to Check boot logs if it still does not start on boot.
- Bad: Enable fails—check Fix unit file.
Check enable status
Goal: Confirm the service is enabled for boot.
- Run
systemctl is-enabled servicename. It should returnenabled. Ifdisabled, runsudo systemctl enable servicename. - If enable fails with “has no [Install] section”, the unit file lacks the [Install] block. Add it via
sudo systemctl edit servicename. - Good: Service is enabled. Reboot and check status.
- Bad: Enable fails—add [Install] WantedBy=multi-user.target to the unit.
Check boot logs
Goal: See why the service failed at boot.
- Run
journalctl -u servicename -b --no-pagerto read logs from the current boot. - Look for dependency failed, permission denied, or timeout. Check
systemctl statusfor any unit listed in After= or Requires=. - Good: Error identified. Proceed to Fix unit file.
- Bad: Logs unclear—check
systemctl cat servicenamefor the full unit.
Fix unit file
Goal: Add [Install] WantedBy and fix dependencies.
- Run
systemctl cat servicename. Confirm [Install] has WantedBy=multi-user.target (or graphical.target for GUI services). - If missing, run
sudo systemctl edit servicenameand add:[Install] WantedBy=multi-user.target - If the service needs network, add
After=network-online.targetin [Unit]. Runsudo systemctl daemon-reloadandsudo systemctl enable servicename. - Good: Unit has [Install] and correct dependencies. Reboot and confirm the service starts.
- Bad: Service still fails—check if a dependency fails at boot.
When to escalate
Escalate if:
- The service is managed by config management (Puppet, Ansible, Chef).
- The unit file is from a package you cannot safely modify.
- Dependencies are outside your control.
Provide systemctl status, journalctl -u servicename -b, and systemctl cat output.
Verification
systemctl is-enabled servicenamereturnsenabled.- After reboot,
systemctl status servicenameshowsactive (running). journalctl -u servicename -bshows no errors for the service.
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Check enabled systemctl is-enabled; systemctl enable if disabled.
- Status and logs systemctl status; journalctl -u servicename -b.
- Unit file Add [Install] WantedBy; fix After/Requires dependencies.
- Escalate Provide status, journalctl, unit file.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- systemctl is-enabled output
- systemctl status output
- journalctl -u servicename -b output
- systemctl cat servicename (unit file)
- Steps already tried
Is the service enabled?
Run systemctl is-enabled servicename.
You can change your answer later.
Enable the service
What does journalctl -b show?
Read boot-time logs for the service.
You can change your answer later.
Check unit file
Apply fix
You can change your answer later.
Done
Escalate
Reviewed by Blackbox Atlas
Frequently asked questions
- Why would a service not start on boot?
- The service is not enabled (systemctl enable), the unit file lacks [Install] with WantedBy, or a dependency fails at boot. Check systemctl is-enabled and journalctl.
- Can I fix a service that will not start on boot myself?
- Yes. Run systemctl enable servicename, confirm the unit has [Install] WantedBy, and check journalctl for dependency or timing errors.
- When should I escalate boot start failures?
- If the service is managed by config management, the fix requires changes to packaged unit files, or dependencies are outside your control.
Rate this guide
Was this helpful?
Thanks for your feedback.