Skip to content
Guest
Cloud & DevOps · Course Syllabus Show lessons
Operations · 8 min read · Intermediate

Supervising Backend Apps with systemd

Run Python, Node.js, or Go APIs reliably as self-healing background daemons with locked-down environment files.

What you'll learn

  • Enable boot startup with `systemctl enable --now <service>`
  • Reload systemd definitions with `systemctl daemon-reload` after editing unit files
  • Keep `Restart=always` so crashes recover in 3 seconds

Overview

Run Python, Node.js, or Go APIs reliably as self-healing background daemons with locked-down environment files.

Code Example

[Unit]
Description=DevPath API Server
After=network.target

[Service]
EnvironmentFile=/etc/devpath-api.env
ExecStart=/usr/bin/python3 /opt/devpath-api/server.py
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Key Takeaways

  • Enable boot startup with systemctl enable --now <service>
  • Reload systemd definitions with systemctl daemon-reload after editing unit files
  • Keep Restart=always so crashes recover in 3 seconds

Quick Check

Check Your Understanding

Score: 0 / 1

1. What command must you run after editing a `.service` file in `/etc/systemd/system/`?

Study Workspace

Finished this lesson?

Your progress is saved locally in your browser, no account needed.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind