Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

+1 -800-456-478-23

How to install Podman in Linux

This guide installs Podman on Debian 13 (Trixie) following the official Podman installation documentation.

Podman is available directly from Debian's official repositories. The Podman project states that the package is available in Debian 11 (Bullseye) and later, which includes Debian 13.


System Requirements

Operating System

Debian 13 (Trixie)

Podman runs natively on Linux and does not require a virtual machine or a permanent daemon.

For a normal Debian 13 installation, the distribution package provides Podman and its required runtime dependencies.


Recommended Hardware

Podman itself has relatively small resource requirements. The actual hardware requirement depends mainly on the containers being run.

For a small server:

CPU:      2 vCPU+
Memory:   2 GB+
Disk:     20 GB+

For production workloads:

CPU:      Based on application workload
Memory:   Based on application workload
Disk:     Based on images, volumes, and application data

These are sizing recommendations rather than Podman-enforced minimums.


1. Update Debian

sudo apt-get update

Optionally upgrade installed packages:

sudo apt-get upgrade -y

2. Install Podman

The official Podman documentation gives the Debian installation command as:

sudo apt-get -y install podman

That's all that is required for a standard Debian installation.


Quick Install

sudo apt-get update && sudo apt-get -y install podman

3. Verify Installation

Check the installed version:

podman --version

Check Podman system information:

podman info

Example:

podman version 5.x.x

The exact version depends on the version currently shipped by Debian 13.


4. Test Podman

Pull and run a small container:

podman run --rm docker.io/library/alpine echo "Podman is working"

Expected:

Podman is working

You can also run:

podman run --rm docker.io/library/hello-world

Podman Does Not Require a Daemon

Podman is daemonless.

Unlike Docker, you normally do not need to run:

sudo systemctl enable podman
sudo systemctl start podman

Simply run:

podman ps

or:

podman run ...

Podman creates and manages the container directly.


Rootless Podman

Podman supports running containers as a normal Linux user:

podman ps

instead of:

sudo podman ps

For a server environment, rootless Podman is useful because containers do not need to run under a root-controlled Docker daemon.

Check whether the current Podman invocation is rootless:

podman info --format '{{.Host.Security.Rootless}}'

Expected for a normal user:

true

User Namespace Support

Rootless containers depend on Linux user namespaces.

The Podman build documentation specifically notes that Linux must support user namespaces for rootless functionality.

Check subordinate UID mappings:

grep "^$USER:" /etc/subuid

Check subordinate GID mappings:

grep "^$USER:" /etc/subgid

A typical result looks like:

xeon:100000:65536

If these entries exist, the user has a range of subordinate UIDs/GIDs available for rootless containers.


Rootless Networking

Modern Podman uses pasta/passt for rootless networking on newer installations.

The official documentation notes that slirp4netns is no longer the default for new Podman installations and has been superseded by passt in current Podman environments.

On Debian 13, you can check whether passt is installed:

dpkg -l | grep passt

Install it if required:

sudo apt-get install -y passt

For existing workloads specifically configured to use slirp4netns, install:

sudo apt-get install -y slirp4netns

Recommended Additional Packages

For a normal Debian repository installation, start with only:

sudo apt-get -y install podman

If additional rootless/container-storage functionality is required, useful packages include:

sudo apt-get install -y \
    uidmap \
    passt \
    fuse-overlayfs

The official Podman documentation lists uidmap and passt among its Debian/Ubuntu dependencies when building Podman from source, and identifies fuse-overlayfs as an optional package that can resolve certain storage compatibility problems.

For a normal packaged installation, however, you should let Debian resolve dependencies automatically rather than manually installing the full build dependency list from Podman's documentation.


Recommended Server Installation

For a Debian 13 container host:

sudo apt-get update

sudo apt-get -y install \
    podman \
    uidmap \
    passt \
    fuse-overlayfs

Then verify:

podman --version
podman info

Test Rootless Containers

As your normal Linux user:

podman run --rm docker.io/library/alpine id

You will typically see:

uid=0(root) gid=0(root)

That root user exists inside the container namespace. When using rootless Podman, it is mapped to an unprivileged UID on the host.

Check the host mode:

podman info --format '{{.Host.Security.Rootless}}'

Expected:

true

Container Storage

Rootless Storage

For a normal user, Podman container storage is generally located under:

~/.local/share/containers/storage/

Check usage:

du -sh ~/.local/share/containers/storage

Rootful Storage

Containers started with:

sudo podman

use separate root-owned storage, typically:

/var/lib/containers/storage/

Therefore:

podman images

and:

sudo podman images

may return different images.

Rootful and rootless Podman environments should be considered separate.


Configuration Directory

System-wide container configuration is normally located under:

/etc/containers/

Common configuration files include:

/etc/containers/containers.conf
/etc/containers/registries.conf
/etc/containers/storage.conf

User-specific configuration can be stored under:

~/.config/containers/

The Podman installation documentation also references registries.conf and container policy configuration as part of the container stack.


Container Runtime

Podman uses an OCI container runtime such as:

crun

or:

runc

The official documentation states that Podman expects at least one OCI runtime and prefers crun when both are available.

Check:

podman info | grep -i runtime

You can also check:

crun --version

or:

runc --version

You generally do not need to install these manually when installing Podman from Debian's package repository, because APT resolves the required package dependencies.


Run Nginx

Example:

podman run -d \
    --name nginx \
    -p 8080:80 \
    docker.io/library/nginx:alpine

Check:

podman ps

Test:

curl http://127.0.0.1:8080

Persistent Volume Example

Create a volume:

podman volume create redis-data

Run Redis:

podman run -d \
    --name redis \
    -p 127.0.0.1:6379:6379 \
    -v redis-data:/data \
    docker.io/library/redis:latest \
    redis-server --appendonly yes

Check:

podman ps

View logs:

podman logs redis

Useful Commands

Running containers:

podman ps

All containers:

podman ps -a

Images:

podman images

Volumes:

podman volume ls

Networks:

podman network ls

System information:

podman info

Disk usage:

podman system df

Start / Stop Containers

Start:

podman start <container>

Stop:

podman stop <container>

Restart:

podman restart <container>

Remove:

podman rm <container>

Force remove:

podman rm -f <container>

Container Logs

podman logs <container>

Follow:

podman logs -f <container>

Last 100 lines:

podman logs --tail 100 <container>

Enter a Container

For containers with Bash:

podman exec -it <container> bash

For minimal/Alpine containers:

podman exec -it <container> sh

Cleanup

Remove stopped containers:

podman container prune

Remove unused images:

podman image prune

General cleanup:

podman system prune

More aggressive cleanup:

podman system prune -a

Verify that unused resources are no longer required before running aggressive cleanup commands.


Rootless Services After Logout

If a server user runs persistent rootless Podman services managed by systemd --user, enable lingering:

sudo loginctl enable-linger $USER

Check:

loginctl show-user $USER | grep Linger

Expected:

Linger=yes

This is useful for long-running rootless container workloads because the user's service manager can continue running without an interactive login.


Recommended Production Setup

A simple Podman host can be structured as:

Debian 13
    │
    ├── systemd
    │
    └── application-user
         │
         ├── Rootless Podman
         ├── OCI containers
         ├── Rootless networking
         └── Persistent volumes

For installation:

sudo apt-get update

sudo apt-get -y install \
    podman \
    uidmap \
    passt \
    fuse-overlayfs

For a dedicated application account:

sudo loginctl enable-linger application-user

Then run application containers as that user rather than using:

sudo podman ...

for every container.


Quick Installation Summary

Install:

sudo apt-get update && sudo apt-get -y install podman

Verify:

podman --version
podman info

Test:

podman run --rm \
    docker.io/library/alpine \
    echo "Podman OK"

Expected:

Podman OK

For a rootless production-oriented host, optionally install:

sudo apt-get install -y \
    uidmap \
    passt \
    fuse-overlayfs

Check:

podman info --format '{{.Host.Security.Rootless}}'

Expected:

true

Important Note About the Official Documentation

The large Debian/Ubuntu dependency list shown later on Podman's installation page is under Building from Source. It is not required simply to install Podman from Debian 13's repository.

For a standard Debian 13 installation, the official installation instruction is simply:

sudo apt-get -y install podman

APT will resolve the required runtime dependencies automatically.


Reference

Official Podman installation documentation:

https://podman.io/docs/installation

The official documentation states that Podman has been available from Debian's repositories since Debian 11 and recommends installing the Debian package using apt-get.

Leave a comment

Your email address will not be published. Required fields are marked *