Installing and Configuring Podman on Ubuntu 24.04

This guide will help you install and configure the Podman container management system on your Ubuntu 24.04 server.

ubuntu podman
Custom
VPS
4
vCPU
8 GB
Memory
80 GB
NVMe Disk
10240 GB
Traffic
20.90
/month
* Up to 4 IPv4, 1Gbit/s Network Speed, 16 vCPU, 48GB RAM, 480GB NVMe Disk Space
**Prerequisites:** * A server running Ubuntu 24.04. * A user account with `sudo` privileges on the server. **Tutorial Steps:** **1. Update the System:** * **Description:** Update your system to get the latest software updates and security patches. * **Command:** ```bash sudo apt update -y sudo apt upgrade -y ``` **2. Install Required Dependencies:** * **Description:** Install dependencies required by Podman. * **Command:** ```bash sudo apt install -y software-properties-common ``` **3. Add Podman Repository:** * **Description:** Add the official Podman repository. * **Command:** ```bash . /etc/os-release sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add - ``` **4. Install Podman:** * **Description:** Install Podman and related packages. * **Command:** ```bash sudo apt update -y sudo apt install -y podman ``` **5. Verify Podman Installation:** * **Description:** Verify that Podman is installed correctly by checking the Podman version. * **Command:** ```bash podman --version ``` **6. Enable User Namespace:** * **Description:** Configure user namespaces to allow non-root users to run containers. * **Command:** ```bash sudo sh -c "echo 'user.max_user_namespaces=28633' >> /etc/sysctl.conf" sudo sysctl -p ``` **7. Configure Podman:** * **Description:** Set up configuration files for Podman to optimize performance and security. * **Command:** ```bash mkdir -p ~/.config/containers touch ~/.config/containers/containers.conf ``` **8. Test Podman Installation:** * **Description:** Test that Podman is working correctly by running a test container. * **Command:** ```bash podman run hello-world ``` **Conclusion:** Congratulations! You have successfully installed and configured Podman on your Ubuntu 24.04 server. **Additional Resources:** * **Podman Documentation:** [https://podman.io/getting-started/](https://podman.io/getting-started/) * **Ubuntu Documentation:** [https://ubuntu.com/documentation](https://ubuntu.com/documentation)


Created with ❤ at Estonia
EcoStack Technology OÜ