Proxmox LXC Podman Setup Guide

Proxmox LXC Setup for Podman

1. Configure the Container (CT)

In the Proxmox web UI:

2. Edit the LXC Config

Open a shell on the Proxmox node and edit the container config file:

nano /etc/pve/lxc/<CTID>.conf
Replace <CTID> with the numeric ID of your container.

Add the following line at the bottom of the file, then save and exit:

lxc.apparmor.profile: unconfined

3. Install Podman in the CT

Start the container and log in as root. Then update packages:

apt update && apt upgrade -y

Install Podman:

apt install -y podman

Check the version and run a test container:

podman --version podman run hello-world
If you see the hello-world output, Podman is working correctly.

4. Fix Podman Pull Issues

Edit the Podman registries configuration file so it can pull images from Docker Hub and others:

sudo nano /etc/containers/registries.conf

Add the following content:

[registries.search]
registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org']

5. Run Nginx with Podman

Pull the nginx image:

podman pull nginx:latest

Run Nginx in a container, exposing port 8080 on the host:

podman run -d --name mynginx -p 8080:80 nginx:latest
Now you can access Nginx in your browser at http://<ProxmoxCTIP>:8080.