Skip to main content

Using Podman Desktop behind a proxy on Linux

You can configure Podman to run behind a proxy.

Prerequisites

  • <proxy_ca.pem>: Your proxy Certificate Authorities (CA), in Privacy-Enhanced Mail (PEM) format.
  • <your.proxy.tld:port>: Your proxy URL.

Procedure

  1. Edit the containers.conf file to pass the proxy environment variables to Podman CLI.

    The file location depends on your connection mode:

    • rootless: $HOME/.config/containers/containers.conf

    • rootful: /etc/containers/containers.conf

  2. Set the proxy environment variables to pass into the containers:

    [containers]
    http_proxy = true
    env = ["http_proxy=<your.proxy.tld:port>", "https_proxy=<your.proxy.tld:port>"]
  3. Set the proxy environment variables to pass into the Podman engine:

    [engine]
    env = ["http_proxy=<your.proxy.tld:port>", "https_proxy=<your.proxy.tld:port>"]
  4. Add the custom Certificate Authorities (CA) for your proxy:

    $ sudo cp <proxy_ca.pem> /etc/pki/ca-trust/source/anchors/
    $ sudo update-ca-trust
  5. Restart all podman processes.

    $ pkill podman
  6. Restart Podman Desktop: Ctrl + q.

Verification

  1. Go to Images.
  2. Click Pull an image.
  3. Image to Pull: bash
  4. Click Pull image.
  5. Podman Desktop reports Download complete.