Skip to content

Instantly share code, notes, and snippets.

@brainfoolong
Last active September 27, 2025 23:08
Show Gist options
  • Select an option

  • Save brainfoolong/117a0f7562cb2c51b824db4011d40d29 to your computer and use it in GitHub Desktop.

Select an option

Save brainfoolong/117a0f7562cb2c51b824db4011d40d29 to your computer and use it in GitHub Desktop.
Install Podman Desktop on Windows 11 + WSL Installation + Podman Desktop showing WSL containers

If you are in my boots, starting using podman for the first time and want it to get it working on Windows and WSL, this is for you. It's a bit of a pain to have the same "Docker Desktop" experience just with "Podman Desktop".

This guide doesn't matter for security, it just documents how you make things work.

This guide only works for ubuntu 24 in your WSL distro. Versions bellow have older podman versions which are not compatible with podman desktop.

What we do

  • Remove Docker Desktop if installed
  • Install Podman Desktop
  • Install Podman in WSL Ubuntu
  • Configuring windows to cntrol podman linux and show containers from WSL in Podman Desktop.

Notice

This guide will set all default podman connections to WSL, so every podman command finally runs in WSL, even if called from windows. The other way around would be podman-remote installed in WSL, which have many problems and i can't recommend that.

1. Remove Docker Desktop

Just remove it. For basic setup, podman is a drop in replacement.

2. Install Podman Desktop

Download from https://podman.io/. Install recommended extensions. Install it on WSLv2. You dont need to create a podman machine when you only connect to your WSL instance. When finished, it should look something like this in windows. The error is expected. image

Enable remote access in Settings -> Preferences -> Extensions: Podman -> Remote image

3. Install Podman, SSH server and dependencies in WSL Ubuntu

sudo apt update
sudo apt install podman  podman-compose openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh

Check if Port 22 and PubkeyAuthentication yes is enabled in sudo nano /etc/ssh/sshd_config, restart ssh service if required.

After that, it should look something like this in WSL. image

4. Connect Podman Desktop to WSL

From windows (or wsl, it doesnt matter): Create a random new ssh key-pair. Create it without a passphrase.

ssh-keygen -t ed25519 -f %USERPROFILE%/wsl_podman_sshid

In WSL: Copy the wsl_podman_sshid.pub file somewhere into WSL. Example to open folder in windows explorer: \\wsl.localhost\Ubuntu\srv Copy SSH key to authorized keys. Create ~/.ssh folder if not exist.

cat /srv/wsl_podman_sshid.pub >> ~/.ssh/authorized_keys
rm /srv/wsl_podman_sshid.pub

In WSL: Enable and start podman.socket

systemctl --user enable podman.socket
systemctl --user start podman.socket

In WSL: Verify it runs

systemctl --user status podman.socket

image

In WSL: Use podman info to determine the correct socket path:

podman info | grep sock

should output something like this
   path: /run/user/1000/podman/podman.sock

Copy the wsl_podman_sshid file somewhere into windows, example %USERPROFILE%/wsl_podman_sshid. You may need to modify file permissions so only you have access to n(ot everyone) Verify if ssh connection can be established. If you have a more complicated network setup, find out your wsl ip for SSH with wsl hostname -i

# in windows
ssh -i %USERPROFILE%/wsl_podman_sshid myuser@localhost

image

Now you are ready to add the podman connection in windows. Add it with a distinct name to the Podman system connection list:

podman system connection add wsl --identity %USERPROFILE%/wsl_podman_sshid ssh://myuser@localhost/run/user/1000/podman/podman.sock
podman system connection default wsl

Verify in windows if you can see correct podman version

podman version

image

Now you should be able to see the "wsl" connection in podman preferences. image

Finally you can create and run containers now in WSL which will show up on podman desktop on windows. image

More info here: https://podman-desktop.io/docs/podman/podman-remote

Troubleshooting

Error: unable to connect to Podman socket: server API version is too old. Client "4.0.0" server "3.4.4"

Coming from Ubuntu bellow 24. It just doesnt work.

My containers running in WSL are not accessible from windows host.

Define explicit port mapping in your commands/compose.yml by adding the ip 127.0.0.1. Example compose

services:
  app:
    ...
    ports:
      #- this--->127.0.0.1:<---8080:8080
      -127.0.0.1:8080:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment