Run Postgres, Redis, and More on Your Laptop with systemd User Services

Tired of Docker Desktop drains and flaky local services? Use systemd user services to run dev daemons reliably, with simple unit files and real trade-offs.

Written by: Rohan Deshpande

A developer laptop showing a terminal with system services running, placed on a desk
Image credit: Scott Graham / Unsplash

A few months ago I hit a recurring morning ritual: start my laptop, wait for Docker Desktop to boot, pray my Postgres container comes up, and then spend 10–15 minutes wrestling with volume mounts, container names, or low disk space. On my corporate laptop, with limited CPU and background policy agents chewing cycles, Docker felt heavy and fickle.

I switched to running local dev daemons as systemd user services. It sounds nerdy, but the gains were immediate: predictable startup, tiny overhead, journald logs, and clean commands to start/stop without remembering container names. If you’re on Linux (or WSL2 with systemd enabled), this is a low-friction way to keep essential services like Postgres, Redis, or MinIO available without Docker Desktop’s memory tax.

Why systemd user services work for local development

A realistic example: Postgres as a user service Create a data directory in your home and a simple unit file:

Then reload and enable: systemctl —user daemon-reload systemctl —user enable —now postgres

Check logs: journalctl —user -u postgres -f

Swap the ExecStart path for your distribution’s postgres binary (or use initdb first). The point is you now control start/stop with simple systemctl commands and get automatic restarts and logs without Docker.

Redis, MinIO, and other services The same pattern works for any single-process daemon. For Redis, ExecStart=/usr/bin/redis-server —dir %h/.local/var/redis —port 6379. For a local MinIO binary, pass your key, secret, and path. Keep service ports consistent with your dev environment, or use environment files (~/.config/systemd/user/myapp.env) referenced by EnvironmentFile=.

Small conveniences that matter

Tradeoffs and real constraints This isn’t a silver bullet. Expect the following downsides:

When to prefer containers instead If you need exact production-like isolation, custom OS packages, or reproducible images for onboarding, containers are still better. I use systemd user services for day-to-day, fast workflows, and containers when I need parity with CI/prod or when onboarding teammates.

Polish with small extras

Final recommendation If you work on a constrained laptop, hate Docker Desktop’s resource usage, and want predictable local services, try systemd user services for a week. Start small—Postgres or Redis—so you can measure the benefits (startup time, memory saved, fewer morning rituals). Keep containers in your toolbox for cases that need strict isolation. The trade-offs are real, but for day-to-day development, the predictability and integration with systemd’s tooling win more mornings than they lose.

It changed my mornings: one less thing to pray for and one more terminal command that actually does what it says. If you want, I can share my exact unit files for Postgres, Redis, and a MinIO setup I use—drop a note and I’ll paste them.