Run services reliably with systemd: units, dependencies, and resource limits.
Systemd is the standard for service management on most Linux distros. Use it for reliability and observability.
[Unit]
Description=My App
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
ExecStart=/usr/local/bin/myapp
Restart=on-failure
RestartSec=5
User=app
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
Systemd gives you a consistent way to run and debug services across environments.
Get the latest tutorials, guides, and insights on AI, DevOps, Cloud, and Infrastructure delivered directly to your inbox.
How a small team moved from single-region risk to a simple active/passive multi-region setup without doubling complexity.
A practical guide to writing and managing systemd services for production. The unit file features that earn their place, plus the operational workflows.
Explore more articles in this category
cpu.shares vs cpu.cfs_quota_us vs memory.max — the cgroup mechanics behind Kubernetes resource limits, and the surprises that explain the weird symptoms you've seen.
bpftrace one-liners replace strace, perf top, and a half-dozen ad-hoc debugging scripts. The patterns that actually earn their place when you're troubleshooting at 2 AM.
We migrated most scheduled jobs from cron to systemd timers. The wins, the gotchas, and the cases we kept on cron anyway.