Skip to content

Install Podman

Installation

Install Podman and Podlet:

sudo dnf install -y podman podlet

Configuration

Enable User Lingering

Enable lingering for your user so that user services continue to run even after logout:

loginctl enable-linger <username>

Replace <username> with your actual username.

Create Systemd User Configuration Directory

Create the systemd user configuration directory if it doesn't exist:

mkdir -p ~/.config/systemd/user
mkdir -p ~/.config/containers/systemd/

Enable Podman User Socket

Enable and start the Podman user socket for rootless container management:

systemctl --user enable --now podman.socket

This allows you to use Podman as a non-root user with user-level systemd services.

Create Podman Network Configuration

Create a Podman systemd network configuration file for your network:

mkdir -p ~/.config/containers/systemd

Create a network file at ~/.config/containers/systemd/skynet.network:

[Unit]
Description=Skynet network
After=network-online.target

[Network]
NetworkName=skynet
Subnet=10.90.0.0/24
Gateway=10.90.0.1
#pihole
DNS=10.0.0.250

[Install]
WantedBy=default.target

Adjust the network name, subnet, gateway, and DNS settings according to your requirements.

Prepare user to run containers.

Fix .bash_profile variables.

Replace User ID

Replace 1000 with your user id.

Run id command to learn your id

export XDG_RUNTIME_DIR=/run/user/1000
alias pdupdate='podman auto-update;podman image prune;systemctl --user restart nginx;'