How to Run Podman on Windows

run podman on windows

Podman is an open-source container engine developed by Red Hat which creates, runs, and manages containers without a central daemon. Podman has a rootless design which allows containers to be run by a user without elevated permissions. Because of all of this, Podman is much more secure and resource-efficient than other container tools.

Docker Desktop on Windows has poor resource consumption, runs as an app and therefore needs a process running in the background, and isn’t free if you will use it for commercial purposes. Podman is lightweight; it is open-source; and will fit just into Windows Subsystem for Linux (WSL2) beautifully without the overhead of a daemon.

The main advantages of Podman Windows is that Podman uses a rootless container model, is daemonless, and is fully compatible with already-built containers. Overall, Podman represents a better opportunity for developers wanting to achieve better security, less overhead, and more control in their container immersive environments.

What is Podman?

Podman is a free and open-source container engine created by Red Hat that creates, runs, and manages containers without a centralized daemon. Podman has a rootless design that permits containers to be run by a user without elevated permissions which makes it more secure and resource efficient than other container tools.

Docker Desktop has poor resource usage, it runs as an app and therefore needs a process running in the background, and it is not free if you will be using it commercially. Podman is lightweight; it is open-source, and it will fit just into Windows Subsystem for Linux (WSL2) very well without the overhead of a daemon.

The primary advantages of running Podman for Windows are that Podman uses a rootless container model, is daemonless, and is completely compatible with already-built containers. Overall, Podman represents an advantageous opportunity for developers wanting better security, lower overhead, and more control over their container immersive environments.

Prerequisites Before Installing Podman on Windows

Before installing Podman WSL, make sure your Windows system is ready to support Linux containers via WSL2. This includes enabling platform features and installing a Linux distribution.

Enable WSL2 (Windows Subsystem for Linux)

WSL2 is required for running Linux containers on Windows. First, ensure that the Virtual Machine Platform feature is enabled. Run the following command in PowerShell as Administrator:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Command to enable wsl2 for running Linux containers on Windows

After running the command, restart your system for changes to take effect.

2. Install a Linux Distribution

You can install Ubuntu or another supported Linux distribution from the Microsoft Store. Once installed, launch it once to complete the setup.

Also you can run the below command in the power shell to install ubuntu by default:

wsl --installcd..
Command to install ubuntu by default

Method 1: Install Podman on Windows via Podman Desktop

Step 1: Download and Install Podman Desktop

To get started, go to the official Podman Desktop website and download the Windows installer:

downloading podman for windows from official website


Be sure to select the version for your system architecture (64-bit). After you download it, run the installer and follow the setup wizard. The process is fairly simple and you accept the license agreement, install to whichever path you prefer, and leave the rest of the options as default:

getting started with podman desktop


Once you have installed Podman Desktop, start Podman Desktop from your Start Menu. The app gives you a graphical user interface (GUI) that you can use for managing containers, which is useful for users who prefer using tools as opposed to command line interfaces.

Step 2: Configure WSL2 Integration

The first time you launch Podman Desktop, you will be prompted to link Podman Desktop with an existing WSL2 distribution:

podman desktop main interface


You’ll choose your preferred Linux distro (e.g., Ubuntu) from the list. This allows Podman Desktop to use the WSL2 environment as its backend for executing the container. If the application doesn’t detect your distribution, please make sure it’s properly installed and registered in WSL.

Step 3: Test with Sample Container

After integration, the Podman Desktop will show you the dashboard for containers. You can now click through the interface and pull a sample container image from a registry and run it. This is a great way to check that the Podman Desktop is setup correctly and to confirm the communications to WSL2 is operational. The dashboard also shows real-time container logs, image details and basic resource metrics in order to visualize and manage the containers.

Running Containers with Podman on Windows

Once Podman is installed and setup, you can run containers via your WSL2 Linux distribution. Working within the command line interface (CLI) you can directly manage your containers while leveraging all the precision and programmability/output-piping the Bash CLI offers.

To run a container via Podman, using the command line is the first-step. The first action is to pull a container image from a public registry, such as Docker Hub. Podman supports the same image repositories as Docker, so you can use the same naming for the image. After you successfully pull the image, you can use the podman run command, followed by your image name and any flags required to start the container. This command will initialize and launch an instance of your container successfully within your WSL2 environment and does not require you to use any kind of background service.

Podman’s command-line interface syntax is almost identical to Docker’s and similarly structured for every CLI workflow that Docker has. You will find that most commands, arguments and workflows are nearly identical…the primary difference is in the architecture, where Podman runs containers without a daemon, as well as being able to run containers with unprivileged execution. This is truly a lighter more secure approach to containerization if you are able to use Podman with your WSL2 environment.

Managing Containers and Images

Podman offers simple commands for working with containers and images in your WSL2 (Windows Subsystem for Linux) environment that allows for complete management of your containers/units’ lifecycle without a daemon running in the background.

To see all active or inactive containers run podman ps. You can use the –all flag to see active and stopped containers. For images you can run podman images to see all of the locally available container images on your system along with their sizes and registry origins.

You can start or stop containers with the podman start and/or podman stop commands followed by the container’s ID or name. This allows you to stop workloads and startup again without needing to reinitialize everything. If you want to completely remove a container or an image run podman rm for containers and podman rmi for images.

These commands may provide great lightweight control of containers with low overhead to the system. Therefore, with a minimal investment of time and resources Podman is an excellent platform/container option for developers or testers who wish to efficiently manage and control their environments on the Windows operating systems through WSL2.

Conclusion

Podman has a modern and secure approach to containerization on the Windows platform since it does not require root access or background daemons. Podman is aligned with OCI standards, and with its rootless architecture, it is an attractive choice for developers who want to run Linux containers safely and properly in a Windows environment.

The easiest and most intuitive way to get Podman going is to use Podman Desktop through WSL2 (Windows Subsystem for Linux). While there are a few steps involved in getting configured, such as downloading the installer, attaching to a Linux distribution, and running a test container, once completed, you will have a fully functioning environment to manage your containers with minimal configuration. In addition, you can manage and visualize your containers through the graphic user interface, while still having the ability to get down into the Bash and spin containers that way. Podman is definitely a good option for users who want a functional, features-rich desktop, lightweight alternative to Docker Desktop that is reliable and really easy to use.

Experience secure, rootless containerization on UltaHost’s high-performance VDS hosting with full WSL2 integration. Whether you’re using Podman Desktop or the CLI, enjoy smooth container management, low resource usage, and total control, ideal for developers seeking a lightweight, Docker-free solution. Our VDS is the perfect platform for efficient and secure container development with Podman.

FAQ

Can Podman run natively on Windows without WSL2?
Is Podman a complete replacement for Docker on Windows?
Does Podman Desktop require administrative access to install?
Can I use Docker Hub images with Podman?
Is Podman free for commercial use on Windows?
What Windows versions support Podman with WSL2?
Can I manage containers without using the command line?

Related Post

How to Install XAMPP on Windows

XAMPP is a free cross-platform solution stack package f...

How to Install Rust on Windows

Rust, a systems of rust programming language, is gainin...

How to Install Chromium on Windows 10

Chromium is an open-source web browser project that for...

How to Install Perl on Windows

Perl is a powerful programming language that's been aro...

How to Install Linux Bash on Windows 10

The computing world keeps changing, and now, many Windo...

How to Install Apache Tomcat on Windows

Apache Tomcat a widely used web server and Java contain...

Leave a Comment