FedoraRHEL Based

How To Install Podman on Fedora 43

Install Podman on Fedora 43

Container technology has revolutionized how developers and system administrators deploy applications. Podman stands out as a powerful, daemonless container engine that offers enhanced security and seamless integration with Linux systems. Unlike traditional container platforms, Podman operates without requiring a background daemon, reducing attack surfaces and system overhead.

Fedora 43 users have a distinct advantage when working with Podman. The operating system ships with native support and often includes Podman pre-installed, making it the ideal platform for container management. This guide walks you through the complete installation process, verification steps, and initial configuration of Podman on Fedora 43. Whether you’re migrating from Docker or starting fresh with containers, Podman provides a robust, enterprise-grade solution that aligns with modern security practices.

What is Podman?

Podman, which stands for Pod Manager, is an open-source container engine developed as part of the libpod library. It serves as a comprehensive tool for managing containers, pods, and container images on Linux systems. The architecture differs fundamentally from traditional container platforms because it operates without a central daemon.

The daemonless design means each container runs as a child process of the podman command itself. This approach eliminates single points of failure and reduces security vulnerabilities associated with privileged daemon processes. Podman fully supports the Open Container Initiative (OCI) standards, ensuring compatibility with images and containers from various sources.

Key features include rootless operation, allowing regular users to run containers without elevated privileges. The command-line interface mirrors Docker’s syntax, facilitating easy migration for existing Docker users. Podman integrates natively with systemd, enabling containers to run as system services. Advanced users can also leverage Podman Desktop, a graphical interface for managing containers visually.

The tool excels at managing Kubernetes-style pods, groups of containers that share resources and namespaces. This capability makes Podman particularly valuable for developers working with Kubernetes deployments.

Why Use Podman on Fedora 43?

Fedora’s relationship with Podman runs deep, given Red Hat’s significant involvement in both projects. The operating system provides native, optimized support for Podman, resulting in superior performance and stability compared to third-party installations.

Security represents Podman’s most compelling advantage. Rootless containers allow unprivileged users to create and manage containers without sudo access, dramatically reducing security risks. The absence of a daemon eliminates vulnerabilities associated with long-running privileged processes. Enhanced SELinux integration provides additional security layers specific to Fedora and RHEL-based systems.

Performance benefits include near-native execution speed with minimal overhead. Without a daemon mediating every container operation, resource consumption drops significantly compared to daemon-based alternatives. Memory footprint remains lower, especially important on resource-constrained systems.

Kubernetes and OpenShift compatibility makes Podman ideal for cloud-native development. The pod concept translates directly to Kubernetes workloads, streamlining development and testing workflows. Organizations using OpenShift find Podman particularly valuable for local development environments.

Systemd integration allows containers to start automatically at boot, restart on failure, and integrate with existing system management tools. Use cases span development environments, production servers, continuous integration pipelines, and multi-user systems where security isolation matters.

Prerequisites

Before installing Podman on Fedora 43, ensure your system meets these requirements. A modern processor with at least 2 CPU cores suffices for basic usage, though 4 cores improve performance for multiple concurrent containers. RAM requirements start at 2GB minimum, but 4GB or more is recommended for running multiple containers simultaneously.

Your system must run Fedora 43 with the latest updates applied. Verify your Fedora version by executing:

cat /etc/os-release

Look for “VERSION_ID=43” in the output. Root or sudo privileges are necessary for initial installation, though subsequent container operations can run rootless. Basic command-line familiarity helps, but detailed Linux expertise isn’t required.

Check available disk space, as container images can consume significant storage. Reserve at least 10GB for the container storage directory. While not mandatory, understanding basic container concepts like images, containers, and registries enhances your learning experience.

Most Fedora 43 installations include Podman by default, so verification becomes the first actual step.

Step 1: Update System Packages

Maintaining an updated system prevents compatibility issues and ensures security patches are current. Before installing or configuring Podman, refresh all system packages.

Open a terminal and execute:

sudo dnf update -y

This command contacts Fedora’s package repositories, checks for available updates, and installs them automatically. The -y flag automatically answers “yes” to confirmation prompts, streamlining the process. Update time varies depending on how recently you last updated, ranging from seconds to several minutes.

The DNF package manager displays progress indicators showing download speeds and installation progress. If kernel updates are included, reboot your system afterward to activate the new kernel:

sudo reboot

Regular system updates represent a critical security practice. They patch vulnerabilities, improve stability, and ensure compatibility with the latest software versions.

Step 2: Check if Podman is Already Installed

Fedora typically includes Podman in default installations, saving you installation effort. Verify Podman’s presence before attempting installation.

Run this command:

podman --version

Alternatively, use the shorter form:

podman -v

If Podman is installed, you’ll see output similar to:

podman version 4.8.0

The exact version number may differ. For comprehensive system information, execute:

podman info

This command displays detailed configuration including storage drivers, registry settings, network configuration, and security features. If the command returns “command not found,” Podman requires installation. If already present, you can skip to the verification section or proceed to update to the latest version.

Step 3: Install Podman

Installing Podman on Fedora 43 involves a single straightforward command. The DNF package manager handles all dependencies automatically.

Execute:

sudo dnf install podman -y

Alternatively, you can use:

dnf -y install podman

Both commands achieve identical results. The installation process downloads Podman and its dependencies, including containers-common (configuration files), runc (container runtime), and conmon (container monitoring utility). Total download size typically ranges from 30-50MB depending on already-installed dependencies.

Installation completes within 1-3 minutes on typical internet connections. DNF displays progress bars for downloads and installation steps. The package manager automatically configures Podman with sensible defaults suitable for most users.

No additional configuration is required for basic functionality, though advanced users may customize settings later.

Step 4: Verify Podman Installation

Confirmation of successful installation involves multiple verification steps. Each provides different insights into your Podman configuration.

First, check the installed version:

podman --version

Expected output shows the version number, confirming the binary is accessible. Next, view comprehensive system information:

podman info

This command reveals critical details including storage driver (usually overlay2), cgroup version, security options, and configured registries. Pay attention to the “runRoot” and “graphRoot” paths showing where Podman stores temporary and persistent data.

Verify the installation path:

which podman

This should return /usr/bin/podman, confirming proper installation. Check that Podman recognizes your user account for rootless operations:

podman info | grep rootless

The output should indicate whether you’re running in rootless mode. These verification steps ensure Podman is properly installed and configured for your system.

Step 5: Run Your First Container

Testing Podman with a simple container confirms everything works correctly. Start by pulling an official Fedora image from the registry.

Execute:

podman pull fedora

Podman contacts configured registries and downloads the latest Fedora container image. Download time depends on your connection speed. Once complete, run a simple echo command inside the container:

podman run fedora /bin/echo "Welcome to the Podman World"

This command creates a new container from the Fedora image, executes the echo command, displays the output, and terminates the container. You should see “Welcome to the Podman World” printed in your terminal.

For interactive exploration, launch a Bash shell inside a container:

podman run -it fedora /bin/bash

The -i flag keeps STDIN open, while -t allocates a pseudo-TTY. Your prompt changes, indicating you’re inside the container. Explore the environment by checking the OS version:

cat /etc/os-release

You’ll see Fedora container OS information. List installed packages, create files, or experiment freely. The container environment is isolated from your host system. Exit the container by typing:

exit

This terminates the container and returns you to your host shell.

Step 6: Run Container as Daemon

Long-running services require containers that persist in the background. Daemon mode allows containers to run continuously without occupying your terminal.

Start a container in detached mode:

podman run -itd fedora /bin/bash

The -d flag detaches the container, running it in the background. Podman prints the container ID, a long hexadecimal string uniquely identifying your container. View running containers:

podman ps

This displays a table with columns including CONTAINER ID, IMAGE, COMMAND, CREATED, STATUS, PORTS, and NAMES. The STATUS column should show “Up” followed by the runtime duration.

To access a running container, use the exec command:

podman exec -it <container-id> /bin/bash

Replace <container-id> with the first few characters of your container’s ID. You enter an interactive shell inside the running container. Detach without stopping the container by pressing Ctrl+P followed by Ctrl+Q.

Stop a running container with:

podman stop <container-id>

Or forcefully terminate it:

podman kill <container-id>

The kill command sends SIGKILL, immediately terminating the container.

Basic Podman Commands

Mastering essential commands streamlines container management. These commands cover daily operations for most users.

Container Management:

  • podman pull <image> – Download container images from registries
  • podman run <image> – Create and start a new container
  • podman ps – List running containers
  • podman ps -a – List all containers including stopped ones
  • podman stop <container> – Gracefully stop a running container
  • podman start <container> – Start a stopped container
  • podman rm <container> – Remove a stopped container
  • podman kill <container> – Force stop a container

Image Management:

  • podman images – List downloaded images
  • podman rmi <image> – Remove an image
  • podman build -t <name> . – Build image from Dockerfile
  • podman tag <source> <target> – Tag an image

Pod Management:

  • podman pod create --name <name> – Create a new pod
  • podman pod start <pod> – Start a pod and its containers
  • podman pod stop <pod> – Stop a pod
  • podman pod rm <pod> – Remove a pod

System Commands:

  • podman info – Display system information
  • podman version – Show version details
  • podman system prune – Remove unused data
  • podman logs <container> – View container logs
  • podman inspect <container> – Display detailed container information

These commands form the foundation of Podman operations, sufficient for most containerized workflows.

Configuring Podman for Rootless Operation

Rootless mode represents one of Podman’s strongest security features, allowing unprivileged users to manage containers. Fedora configures this automatically for most users, but verification ensures proper setup.

Check your current mode:

podman info | grep rootless

The output shows whether rootless mode is active. User namespace configuration enables rootless operation. Verify your user has subordinate UID and GID ranges:

cat /etc/subuid
cat /etc/subgid

Each should contain a line with your username followed by numerical ranges. Typical entries allocate 65536 subordinate IDs per user. If absent, add them manually (requires root):

sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER

Check your UID mapping within a rootless context:

podman unshare cat /proc/self/uid_map

This displays how UIDs map between your user namespace and the host. Storage configuration for rootless users resides in ~/.config/containers/storage.conf. Default settings usually suffice, but modifications enable customization.

Rootless mode provides significant security benefits by eliminating the need for privileged operations. Limitations include restricted access to ports below 1024 without additional configuration and some limitations on specific storage drivers.

Understanding Podman Networking

Container networking enables communication between containers and external networks. Podman creates a default bridge network for container connectivity.

List existing networks:

podman network ls

You’ll see at least “podman” (default bridge network). Inspect the default network configuration:

podman network inspect podman

This reveals network details including subnet range, gateway, and DNS settings. Create custom networks for better isolation:

podman network create --subnet 192.168.100.0/24 network01

This creates a network named “network01” with the specified subnet. Launch containers on specific networks:

podman run --network network01 -d fedora sleep infinity

Connect running containers to additional networks:

podman network connect network01 <container-id>

Disconnect containers from networks:

podman network disconnect network01 <container-id>

Remove custom networks:

podman network rm network01

Networks cannot be removed while containers are connected. Custom networks provide better isolation and simplified container-to-container communication compared to the default network.

Docker Compatibility and Migration

Podman’s Docker compatibility simplifies migration for existing Docker users. The command-line interface deliberately mirrors Docker’s syntax.

Most Docker commands work identically with Podman. Replace “docker” with “podman” in your scripts and workflows. For seamless transitions, create an alias:

alias docker=podman

Add this to your ~/.bashrc or ~/.zshrc for persistence. Docker Compose workflows require additional consideration. Podman supports Docker Compose through podman-compose, a separate package providing similar functionality.

OCI image format compatibility ensures images work across platforms. Pull Docker Hub images directly:

podman pull docker.io/nginx

For applications requiring the Docker API, Podman provides a compatibility socket:

systemctl --user enable --now podman.socket

This enables Docker API emulation, allowing Docker-specific tools to communicate with Podman. Test existing Docker scripts by running them with the docker alias active. Key differences to remember include the daemonless architecture, rootless defaults, and pod support.

Troubleshooting Common Issues

Resolving common problems ensures smooth Podman operations. These solutions address frequent issues encountered by users.

Permission Denied Errors: Usually stem from improper rootless configuration. Verify subuid/subgid settings and ensure your user has appropriate ranges. Log out and back in after making changes to activate new configurations.

Container Networking Problems: Firewall rules may block container traffic. Check firewalld configuration and add necessary exceptions. SELinux contexts occasionally interfere; verify policies with ausearch -m avc and adjust as needed.

Storage Driver Issues: The overlay driver requires kernel support. If unavailable, Podman falls back to vfs, which offers poorer performance. Upgrade your kernel or reconfigure storage drivers in /etc/containers/storage.conf.

Registry Connection Failures: Check /etc/containers/registries.conf for proper registry configuration. Network connectivity issues or DNS problems may prevent registry access. Verify network settings and DNS resolution.

Command Not Found: Installation issues or PATH problems cause this error. Reinstall Podman or add /usr/bin to your PATH variable.

Rootless Port Binding: Binding to ports below 1024 fails in rootless mode without additional configuration. Use ports above 1024 or configure sysctl net.ipv4.ip_unprivileged_port_start=80 for lower ports.

SELinux Context Errors: Relabeling volumes resolves most issues. Add :Z or :z flags to volume mounts for automatic relabeling.

Check logs for detailed error information:

journalctl --user -u podman

Or view container-specific logs:

podman logs <container-id>

Community resources include Podman’s GitHub repository, Red Hat forums, and Fedora user communities.

Best Practices for Using Podman

Following established best practices optimizes security, performance, and maintainability.

Security Practices: Run rootless containers whenever possible to minimize security risks. Keep container images updated regularly to patch vulnerabilities. Scan images for security issues using tools like Trivy or Clair. Avoid running containers as root inside the container environment.

Performance Optimization: Use appropriate storage drivers for your workload. The overlay driver offers best performance for most use cases. Regularly clean unused images and containers:

podman system prune -a

Set resource limits to prevent containers from consuming excessive resources:

podman run --memory=512m --cpus=1 <image>

Image Management: Prefer official images from trusted registries. Minimize image layers by combining commands in Dockerfiles. Use .containerignore files to exclude unnecessary files from builds. Tag images meaningfully to track versions.

Networking: Create custom networks for related containers to improve isolation. Avoid using default networks for production workloads. Document network configurations for troubleshooting.

Storage: Configure appropriate storage backends based on your filesystem and performance requirements. Mount volumes for persistent data rather than storing data in container layers.

Systemd Integration: Generate systemd unit files for containers that should start automatically:

podman generate systemd --name <container-name> > ~/.config/systemd/user/<container-name>.service

Enable the service:

systemctl --user enable <container-name>.service

Maintenance: Schedule regular maintenance windows for updates. Backup important container data and configurations. Monitor resource usage to identify issues early.

Congratulations! You have successfully installed Podman. Thanks for using this tutorial for installing Podman containers on your Fedora 43 Linux system. For additional help or useful information, we recommend you check the official Podman website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button