Starting Podman Containers with Quadlet
December 5, 2026
In an earlier article, Starting Podman Containers with Systemd, I used podman generate systemd to create unit files so my homelab containers would start after a reboot. It works, but Podman has deprecated that command. The replacement is Quadlet.
I tried Quadlet in my homelab, and it is simpler. You don’t create a container first and then generate a unit file from it. You write one small file that describes the container, and systemd does the rest.
What Is Quadlet
Quadlet is built into Podman 4.4 and later. It is a systemd generator: when systemd reloads, Quadlet reads your .container files and turns each one into a normal systemd service.
You can check your Podman version with:
podman --version
Where the Files Go
| Container type | Directory |
|---|---|
| Rootless (user) | ~/.config/containers/systemd/ |
| Root (system) | /etc/containers/systemd/ |
I run my containers rootless when I can, so this example uses the user directory.
A Simple Example
This is the same nginx web server from the systemd article, written as a Quadlet file.
Create the directory and the file:
mkdir -p ~/.config/containers/systemd
vim ~/.config/containers/systemd/web.container
[Unit]
Description=Nginx web server
[Container]
Image=docker.io/library/nginx:alpine
ContainerName=web
PublishPort=8080:80
Volume=%h/html:/usr/share/nginx/html:Z
[Service]
Restart=always
[Install]
WantedBy=default.target
The [Container] section takes the place of the podman run options:
Imageis the image to run. Use the full name, including the registry.ContainerNameis the same as--name.PublishPortis the same as-p.Volumeis the same as-v.%his systemd’s shortcut for your home directory.
The other sections are regular systemd unit settings. WantedBy=default.target is what starts the container at boot.
Start the Container
Reload systemd so Quadlet generates the service. The service name comes from the file name, so web.container becomes web.service.
systemctl --user daemon-reload
systemctl --user start web.service
systemctl --user status web.service
You don’t run systemctl enable with Quadlet. The [Install] section in the file takes care of starting it at boot.
Rootless Containers Still Need Lingering
As with the systemd method, a rootless user service only starts at boot if lingering is enabled for your user:
sudo loginctl enable-linger username
When the Service Does Not Show Up
If web.service is not found after the reload, Quadlet probably could not parse the file. The dry run shows the unit it would generate, or the error:
/usr/libexec/podman/quadlet -dryrun -user
The path to quadlet can be different on your distribution.
You can read the container logs with journalctl:
journalctl --user -u web.service
Conclusion
Quadlet replaces the two steps of creating a container and generating a unit file with one file. The container is defined in a file I can keep in version control, and systemd manages it like any other service. For new containers in my homelab, this is now how I start them.
