Search docs.molo17.com
    A newer version of this documentation is available.
    View Latest (v2.3)

    Install Podman and podman-compose

    This guide provides step-by-step instructions for installing Podman on various operating systems. For the most up-to-date information, refer to the official Podman documentation.

    When you unpack the Gluesync kit without customizing the destination, it lives under /opt/gluesync on Linux and C:\\Program Files\\Gluesync on Windows. References to helper scripts (for example run.sh, run.ps1, or podman-compose helpers) in this guide assume those defaults.

    Linux

    Podman can be installed on various Linux distributions. Below are the installation instructions for the most common distributions.

    For all Linux distributions, after installing Podman, you can install podman-compose to manage multi-container applications.

    Installing Podman

    Fedora

    # Install Podman
    sudo dnf -y install podman
    
    # Verify installation
    podman --version

    Ubuntu

    # Set up the repository for Podman (Ubuntu 22.04 LTS example)
    sudo apt-get update
    sudo apt-get install -y curl
    
    # Add Podman repository for Ubuntu 22.04 (Jammy)
    REPO="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/"
    sudo sh -c "echo 'deb $REPO /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
    curl -fsSL $REPO/Release.key | sudo gpg --dearmor -o /usr/share/keyrings/devel-kubic-libcontainers-stable.gpg
    
    # Install Podman
    sudo apt-get update
    sudo apt-get -y install podman
    
    # Verify installation
    podman --version

    Red Hat Enterprise Linux (RHEL) 8+

    # Enable required repositories
    sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
    
    # Install Podman
    sudo dnf -y install podman
    
    # Verify installation
    podman --version

    Debian

    # Set up the repository for Podman (Debian 12 Bookworm example)
    sudo apt-get update
    sudo apt-get install -y curl
    
    # Add Podman repository for Debian 12 (Bookworm)
    REPO="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_12/"
    sudo sh -c "echo 'deb $REPO /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
    curl -fsSL $REPO/Release.key | sudo gpg --dearmor -o /usr/share/keyrings/devel-kubic-libcontainers-stable.gpg
    
    # Install Podman
    sudo apt-get update
    sudo apt-get -y install podman
    
    # Verify installation
    podman --version

    CentOS 8+

    # Enable required repositories
    sudo dnf -y install dnf-plugins-core
    sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
    
    # Install Podman
    sudo dnf -y install podman
    
    # Verify installation
    podman --version

    Install podman-compose

    # For Fedora/RHEL/CentOS 8+
    sudo dnf install -y podman-compose
    
    # For Ubuntu/Debian
    sudo apt-get install -y podman-compose
    
    # For other distributions using pip
    pip3 install --user podman-compose

    Running Podman as Non-Root User

    To run Podman without root privileges, you need to create a user namespace:

    # Enable user namespaces
    sudo sh -c "echo $USER:$(id -u):65536 >> /etc/subuid"
    sudo sh -c "echo $USER:$(id -g):65536 >> /etc/subgid"
    
    # Verify non-root operation
    podman run hello-world

    Configuring Podman as a System Service

    To ensure Podman containers start automatically on system boot, you can create a systemd service:

    # Create a systemd service file for your container
    podman generate systemd --new --name your_container_name --files
    
    # Move the service file to systemd directory
    sudo mv container-your_container_name.service /etc/systemd/system/
    
    # Reload systemd
    sudo systemctl daemon-reload
    
    # Enable and start the service
    sudo systemctl enable --now container-your_container_name.service

    Customizing Log Driver and Retention

    To configure log driver and retention for all containers:

    # Edit the containers.conf file
    sudo nano /etc/containers/containers.conf
    
    # Add or modify these settings under [containers]
    [containers]
    log_driver = "k8s-file"
    log_size_max = 52428800  # 50MB
    log_tag = "{{.Name}}/{{.ID}}"

    Windows Desktop

    1. Download the Podman installer for Windows from the official GitHub releases page: https://github.com/containers/podman/releases.

    2. Run the installer and follow the on-screen instructions.

    3. After installation, open a new PowerShell window and verify the installation:

      podman --version
    4. Initialize the Podman machine (required for the first run):

      podman machine init
      podman machine start

    Using Podman Compose

    Using Podman Desktop

    Podman Desktop offers a built-in way to manage Compose. Go to Settings > Resources > Compose, and follow the prompts to set up Compose with Podman Desktop.

    Using Python

    1. Install Python and pip: If you don’t have Python and pip (Python’s package installer) already, download and install them from the official Python website.

    2. Install podman-compose: Open a PowerShell or command prompt and run:

      pip install podman-compose
    3. Verify installation:

      podman-compose --version
    4. Configure system PATH (if necessary): If podman-compose or python commands are not recognized, you may need to add Python’s scripts directory (e.g., C:\Users\<YourUser>\AppData\Local\Programs\Python\<PythonVersion>\Scripts) to your system’s PATH environment variable.

      To modify the PATH:

      • Search for "environment variables" in the Windows search bar and select "Edit the system environment variables".

      • Click "Environment Variables…​"

      • Select "Path" under "System variables" or "User variables" and click "Edit…​"

      • Click "New" and paste the path to Python’s scripts directory

      • Click "OK" on all open dialogs

        You may need to restart your terminal or log out and back in for the changes to take effect.
    5. Using podman-compose:

      • Run podman-compose up: Navigate to the directory containing your compose.yaml file and run the command to start your application.

      • Verify: Use podman ps to see the running containers and access your application in a web browser, if applicable.

    Windows Server

    this installation is only available for Windows Server with desktop environment.
    1. Install podman on the official website.

    2. Follow the installation instructions to set-up podman.

    3. Verify the installation with the following command:

      podman --version

    Using Podman Compose

    Follow the same instructions as provided in the Windows Desktop section above to set up and use podman-compose on Windows Server.

    macOS

    1. Install Homebrew if you haven’t already:

      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. Install Podman:

      brew install podman
    3. Start the Podman machine:

      podman machine init
      podman machine start
    4. Verify the installation:

      podman --version
    5. If you want to run the docker-compose file for Gluesync, you have to install podman-compose with this command:

      brew install podman-compose
    6. Run the docker-compose file for Gluesync:

      podman-compose up -d

    Using Podman Desktop

    1. Download and install Podman Desktop from the official website.

    2. Launch Podman Desktop and follow the setup wizard.

    3. The application will automatically set up a Podman machine for you.

    4. You can now use Podman commands in your terminal.

    Verifying Your Installation

    After installation, verify that Podman is working correctly by running:

    podman run --rm hello-world

    This command downloads a test container and runs it to verify your installation.