Run Rootless Podman Containers Without a Daemon
Run Podman containers rootless without a daemon. Covers user namespaces, port mapping, bind mounts, and host limits to verify first.
18 Jul 2025, 14:50 UTC

Run containers without root or a daemon
You need to run containers on a host where you do not have sudo access, or you want to avoid running container processes as root on the host. The useful takeaway is that Podman can run containers rootless by default: there is no daemon, and the container's root user is mapped to your unprivileged host user ID through a Linux user namespace.
A user namespace is a kernel feature that lets a process see a different set of user and group IDs inside a container than on the host. Inside the container, the process can appear as root (UID 0); on the host, it runs as your unprivileged UID.
Worked example: start a web container rootless
Where to run: your normal user shell on the host. Required permissions: none beyond a normal user account; do not use sudo.
podman run -d --name web -p 8080:80 nginx:alpine
This command starts nginx:alpine detached, maps host port 8080 to container port 80, and names the container web. Rootless users cannot bind ports below 1024 by default, so the host side uses 8080 while the container still listens on 80.
Check that the container is running:
podman ps
Then test the mapping:
curl http://localhost:8080
If curl returns the nginx welcome page, the port mapping and user-mode network stack are working.
Persistent storage and file ownership
Rootless Podman supports named volumes and bind mounts, but the host directory must be readable and writable by the UID and GID that Podman maps into the container. Otherwise the container sees permission denied.
podman run --rm -v "$HOME/app:/app:Z" alpine ls -la /app
The :Z suffix tells Podman to relabel the content for SELinux systems. Replace $HOME/app with an actual directory path. If the directory is owned by a UID outside your subordinate ID range, the mount fails or the container cannot write to it.
Host requirements to verify first
- Confirm user namespaces are enabled:
cat /proc/sys/user/max_user_namespaces
A nonzero value means the host allows user namespaces. Zero or missing means rootless containers will fail to start.
- Confirm your user has subordinate ID ranges:
grep "$USER" /etc/subuid /etc/subgid
Each file should list your username followed by a starting UID/GID and a count. These ranges supply the IDs Podman maps inside the container.
- Confirm Podman is running rootless:
podman info --format '{{.Host.Security.Rootless}}'
The expected value is true.
Limits and common mistakes
Ports below 1024
Rootless Podman cannot bind host ports below 1024 because unprivileged users lack the required capability. Use a high host port such as 8080, or ask a system administrator to set net.ipv4.ip_unprivileged_port_start=0. That setting is host-wide and requires root.
Bind mount permission denied
Common mistake: mounting a directory owned by root or another user. Fix the host directory ownership to match your mapped UID/GID, or use a named volume managed by Podman instead of a bind mount.
Images that assume root privileges
Some images run chown, setcap, or try to bind port 80 during startup. Those operations fail rootless unless the image is rebuilt to run as a non-root user. Prefer images that include a USER directive in their Dockerfile.
Containers are session-scoped by default
Because Podman is daemonless, each container is a child process of the CLI that started it. podman ps lists containers from your current session unless you configure systemd socket activation to persist them across sessions.
Practical verification
Run a throwaway container to confirm the UID mapping:
podman run --rm alpine id
Look for output showing the container process as root (UID 0) while the corresponding host process runs under your unprivileged UID. If the command errors with a namespace or permission failure, check max_user_namespaces and /etc/subuid first.
When rootful mode is the better choice
| Factor | Rootless Podman | Rootful Podman |
|---|---|---|
| Daemon required | No | No (Podman remains daemonless) |
| Host ports below 1024 | Not by default | Yes |
| Container process on host | Your unprivileged UID | Root UID |
| Sudo needed | No | Yes, for container execution |
Use rootless for shared hosts, CI runners, and multi-user workstations. Use rootful only when you need privileged ports, specific kernel capabilities, or images that cannot run unprivileged.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.