Podman Quadlet is underrated
Quadlet turns containers into ordinary systemd units. No extra daemon, no separate orchestration tool. With a copy-ready Umami stack.
- podman
- quadlet
- systemd
Podman Quadlet rarely makes the list when a team wants to run a container stack. The choice falls on Docker Compose, or straight to Kubernetes. Yet Quadlet solves a problem both work around. It turns containers into ordinary systemd units. No extra daemon, no separate orchestration tool. The init system already runs on the host, so a second layer of logic beside it is unnecessary.
- Podman
- 4.4.0
- System
- Raspberry Pi OS Trixie
- Umami
- postgresql-latest
Containers as systemd units
Quadlet is not a service that runs. It is a generator. On daemon-reload, systemd reads the files in ~/.config/containers/systemd/ and produces real .service units from them. umami_app.container becomes umami_app.service, the network file becomes umami-network.service. These units show up in systemctl like any other. There is no separate tool to learn or watch.
The complete stack
A complete stack for Umami, the open source analytics software behind this site's numbers (GitHub), is five files. They all live in ~/.config/containers/systemd/ and run rootless under a dedicated user. To try it, copy them.
The network:
[Network]
NetworkName=umami_network
The volume for the database:
[Unit]
Description=Postgres data for Umami
[Volume]
VolumeName=umami_db_data
The database. Notify=healthy only reports readiness to systemd once the health check is green:
[Unit]
Description=Umami DB Container
[Container]
ContainerName=umami_db
Image=docker.io/library/postgres:15-alpine
EnvironmentFile=%h/umami/.env
HealthCmd=pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}
HealthInterval=5s
HealthTimeout=5s
HealthRetries=5
Notify=healthy
Network=umami.network
Volume=umami.volume:/var/lib/postgresql/data
PodmanArgs=--memory=256m
[Service]
Restart=always
TimeoutStartSec=120
[Install]
WantedBy=multi-user.target
The double dollar signs in $${POSTGRES_USER} are deliberate. systemd would read a single $ as its own specifier. Only the doubled $$ reaches the shell inside the container.
The app. Requires= and After= bind it to the database:
[Unit]
Description=Umami App Container
Requires=umami_db.service
After=umami_db.service
[Container]
Image=ghcr.io/umami-software/umami:postgresql-latest
EnvironmentFile=%h/umami/.env
RunInit=true
ContainerName=umami
PublishPort=3000:3000
Network=umami.network
HealthCmd=curl -f http://localhost:3000/api/heartbeat || exit 1
HealthInterval=5s
HealthTimeout=5s
HealthRetries=5
HealthStartPeriod=60s
PodmanArgs=--memory=512m
[Service]
Restart=always
RestartSec=10s
TimeoutStartSec=300
[Install]
WantedBy=multi-user.target
The Cloudflare tunnel. It hangs off the app and needs no open port to the outside:
[Unit]
Description=Umami Cloudflare Tunnel
Requires=umami_app.service
After=umami_app.service
[Container]
ContainerName=umami_cloudflared
Image=docker.io/cloudflare/cloudflared:latest
Network=umami.network
Exec=tunnel --no-autoupdate run
EnvironmentFile=%h/umami/.env
PodmanArgs=--memory=128m
[Service]
Restart=always
TimeoutStartSec=120
[Install]
WantedBy=multi-user.target
Plus an .env at ~/umami/.env with the values all three containers share:
POSTGRES_USER=umami
POSTGRES_PASSWORD=change-me
POSTGRES_DB=umami
DATABASE_URL=postgresql://umami:change-me@umami_db:5432/umami
APP_SECRET=change-me
TUNNEL_TOKEN=your-cloudflare-tunnel-token
The app reaches the database over the hostname umami_db. That is the name of its container on the shared network. No IP, no extra flag. Two details carry the operation. After= only orders the start, not readiness. So through Notify=healthy the app waits for a real connection to the database instead of a sleep. Port, restart and limits sit right next to the container. The memory limit uses PodmanArgs=--memory; the dedicated Quadlet key Memory= only exists in newer Podman versions.
Start and operation
After dropping the files in place comes a reload, then the stack starts like any service:
systemctl --user daemon-reload
systemctl --user start umami_app.service
loginctl enable-linger $USER
enable-linger makes the units come up after a reboot without a login. State shows through systemctl --user status umami_db.service. The logs sit in the journal under journalctl --user -u umami_app.service. An update is two commands: podman pull and systemctl --user restart. To update automatically, add AutoUpdate=registry to the container and enable podman-auto-update.timer. If a new image fails its health check, Podman rolls back to the previous one.
The whole stack shows up at a glance with systemctl --user list-units 'umami*', with state and start order. What Quadlet generated from a file is visible through systemctl --user cat umami_app.service, without digging in the generator directory. The generated units are ephemeral and come back fresh from the source file on the next reload.
Rolling out with Ansible
The files are declarative, so they roll out with Ansible like any other configuration. One play drops the units, writes the .env from a template and starts the stack:
- name: Drop the Quadlet units
ansible.builtin.copy:
src: "{{ item }}"
dest: "~/.config/containers/systemd/{{ item }}"
loop:
- umami.network
- umami.volume
- umami_db.container
- umami_app.container
- umami_cloudflared.container
- name: Start the stack
ansible.builtin.systemd_service:
name: umami_app.service
scope: user
daemon_reload: true
enabled: true
state: started
The same stack runs this way on one host or on twenty, reproducible and without manual steps. Image tags, limits or ports come from variables when the environments differ. The role becomes part of the existing playbook, not a second path beside it.
The point is idempotence. Run the play again and only what actually changed changes. A new image tag in a variable, an adjusted limit. The next run pulls exactly that line through, restarts the affected unit and leaves the rest alone. The host's configuration stays traceable. It is not a state someone pieced together by hand.
Owning the files is not required. The containers.podman collection ships modules for this. podman_quadlet installs and removes ready-made Quadlet files, and the resource modules such as podman_container generate them with state: quadlet straight from their parameters. If the units already sit versioned in the repo, the ansible.builtin.systemd_service path above fits. If they come from variables, the Podman modules write the file for you.
What it saves
The gain is in operation, not in the install. Compose needs a process. It runs in the background and has to be watched and patched. After a reboot it only comes back up if something kicks it. Quadlet does not have this gap, because systemd does the start anyway. Kubernetes solves problems a single host does not have. In return it costs a cluster that someone operates. For three containers on one machine that is effort without return.
Concretely that means: no Compose daemon to account for when the host is updated. No separate monitoring for container state. The health check sits in the unit, and a failure lands in the status and the journal. No start script in the crontab that pulls the containers back up after a reboot. Each of these is one less place where something breaks in operation or someone gets paged at night.
In numbers: the whole stack is five files. Podman needs no running daemon for it. The overhead before the first application is zero. The Docker daemon sits at a typical 100 to 200 MB idle. Podman does without that. A Kubernetes server wants around 2 GB for the control plane per its docs, even lightweight k3s. That holds before a single workload runs. Three containers here are capped at about 900 MB together. So the control plane decides the size of the machine. With Quadlet the stack fits on a 2 GB server. The same load on k3s wants closer to 4 GB. At a host that is usually the next price tier.
- Idle RAM overhead
- Background daemon
- Setup to first start
- Ongoing operation
- Extra monitoring
- Moving parts
What is left is less: one tool instead of two, one log channel, one mechanism for start, restart and boot. Rootless comes on top, no daemon runs as root. Fewer moving parts means less that fails and less that someone has to maintain. That lowers the running cost, not the one-off setup.
When Kubernetes is not an option
Not every environment carries a cluster. Sometimes the hardware is missing, sometimes the team, sometimes the sign-off. In those cases Quadlet is not a compromise. It is the right layer.
The clearest case is a single host. A VPS, a small on-prem machine, a server at the edge. There the Kubernetes control plane takes memory that the actual load needs. There is no second node to move anything to. Scheduling across nodes, self-healing in the cluster and rolling updates across replicas solve problems that do not occur on one machine.
Concrete cases where Quadlet is the better choice:
- Edge and on-prem. A machine at a customer site or in a branch, with no operations team on site. systemd is there, the host manages the containers itself, a reboot brings everything back.
- Regulated or air-gapped environments. Rootless, no daemon as root, no extra attack surface. No cluster network to sign off and audit.
- Internal services and build agents. A dozen helper services, CI runners, a reverse proxy. Load that fits stably on one machine and needs no scheduling across nodes.
- Appliances and embedded systems. Linux with systemd on fixed hardware. Containers as units fit into what already runs.
The line is honest. Once load has to spread across several nodes, be pulled back up automatically or moved between machines, Kubernetes has the edge. Then its control plane pays off. Below that line you only pay for it. Quadlet covers exactly the range beneath, and that is the larger part of the services a team actually runs.
Is it worth it?
Count how many of your services today depend on an extra daemon or a start script. Each of those scripts is pulled back up by hand after a reboot. Each of those services is a candidate for Quadlet. The question is not whether it runs. The question is how much operation you save once the host manages the containers itself.