WireGuard Easy
Deployment rootful
1. Prepare the host
Prerequisites once as root
Install Podman (needs podman 4.3 or newer; Ubuntu 22.04 ships 3.4 and is too old, use 24.04)
apt update && apt install -y podman
2. Choose a format and deploy
The same pod in four forms. Pick one and follow only its steps.
Each tab says which podman it needs. Check yours with podman --version:
Debian 12 ships 4.3, Ubuntu 24.04 4.9, Debian 13 5.4, Fedora 5.8, Arch 6.x.
Kubernetes YAML for podman kube play, started by systemd through a Quadlet .kube unit (podman 4.4+; older podman like Debian 12 uses podman-kube@, see the version check below).
Kubernetes YAML
apiVersion: v1
kind: Pod
metadata:
name: wg-easy
labels:
app: wg-easy
spec:
restartPolicy: Always
containers:
- name: wg-easy
image: ghcr.io/wg-easy/wg-easy:latest
imagePullPolicy: Always
ports:
- containerPort: 51820
hostPort: 51820
- containerPort: 51821
hostPort: 51821
env:
- name: WG_HOST
value: G8asGCG0da0Ll94WmKPVyg
- name: PASSWORD_HASH
value: G8asGCG0da0Ll94WmKPVyg
- name: WG_PORT
value: '51820'
- name: WG_DEFAULT_DNS
value: 1.1.1.1
- name: WG_ALLOWED_IPS
value: 0.0.0.0/0
volumeMounts:
- name: vol-0
mountPath: /etc/wireguard
securityContext:
capabilities:
add:
- NET_ADMIN
- SYS_MODULE
volumes:
- name: vol-0
persistentVolumeClaim:
claimName: wg-easy-data
Save the YAML file
sudo mkdir -p /etc/containers/ sudo nano /etc/containers/wg-easy.yaml
Test the pod (without systemd)
sudo podman kube play /etc/containers/wg-easy.yaml # Status: sudo podman pod ps && sudo podman ps # Stop: sudo podman kube down /etc/containers/wg-easy.yaml
Check your podman version
podman --version
4.4 or newer: continue with step 3 below.
Older, e.g. 4.3 on Debian 12? There is no Quadlet yet: use podman's own podman-kube@ service instead of steps 3–5
sudo systemctl enable --now podman-kube@$(systemd-escape /etc/containers/wg-easy.yaml).service # Status & logs: sudo systemctl status podman-kube@$(systemd-escape /etc/containers/wg-easy.yaml).service sudo journalctl -u podman-kube@$(systemd-escape /etc/containers/wg-easy.yaml).service -f
The day-to-day commands below have a block for this service.
Create Quadlet .kube file (systemd)
[Unit] Description=wg-easy pod After=network-online.target Wants=network-online.target [Kube] Yaml=/etc/containers/wg-easy.yaml [Service] Restart=always [Install] WantedBy=multi-user.target
Save to /etc/containers/systemd/:
sudo mkdir -p /etc/containers/systemd/ sudo nano /etc/containers/systemd/wg-easy.kube
Start systemd service (rootful)
sudo systemctl daemon-reload sudo systemctl start wg-easy.service
Status & Logs
sudo systemctl status wg-easy.service sudo journalctl -u wg-easy.service -f sudo podman pod ps sudo podman ps
Enable automatic image updates optional
Requires AutoUpdate=registry in the .kube file. Podman checks for new images and restarts the pod automatically:
sudo systemctl enable --now podman-auto-update.timer # Check status: sudo systemctl status podman-auto-update.timer # Trigger manually: sudo podman auto-update
- Containers run as root — only use trusted images
- Ports < 1024 can be bound directly
- No
loginctl enable-lingerneeded — systemd manages the service - Quadlet path:
/etc/containers/systemd/(not~/.config/)
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f wg-easy-wg-easy sudo podman exec -it wg-easy-wg-easy /bin/sh
Restart
sudo systemctl restart wg-easy.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
sudo podman pull <image>:<tag> sudo systemctl restart wg-easy.service
Stop & remove
Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:
sudo systemctl stop wg-easy.service sudo rm /etc/containers/systemd/wg-easy.kube sudo systemctl daemon-reload
podman older than 4.4 (podman-kube@ from step 3)
sudo systemctl restart podman-kube@$(systemd-escape /etc/containers/wg-easy.yaml).service # Update an image: pull, then restart as above sudo podman pull <image>:<tag> # Stop and remove from autostart: sudo systemctl disable --now podman-kube@$(systemd-escape /etc/containers/wg-easy.yaml).service
Delete the data — permanent, only after stop & remove
sudo podman volume rm wg-easy-data
Native systemd units without the Kubernetes YAML: one .pod plus one .container per container.
Each container becomes its own systemd service (restart, logs and ordering per container).
Needs podman 5.0 or newer — Debian 12 ships 4.3, use the Kube YAML tab there.
Save the unit files
[Unit] Description=wg-easy pod [Pod] PodName=wg-easy PublishPort=51820:51820 PublishPort=51821:51821
[Unit] Description=wg-easy-wg-easy container [Container] Image=ghcr.io/wg-easy/wg-easy:latest Pod=wg-easy.pod ContainerName=wg-easy-wg-easy Pull=always Environment=WG_HOST=G8asGCG0da0Ll94WmKPVyg Environment=PASSWORD_HASH=G8asGCG0da0Ll94WmKPVyg Environment=WG_PORT=51820 Environment=WG_DEFAULT_DNS=1.1.1.1 Environment=WG_ALLOWED_IPS=0.0.0.0/0 Volume=wg-easy-data:/etc/wireguard:Z AddCapability=NET_ADMIN AddCapability=SYS_MODULE [Service] Restart=always [Install] WantedBy=multi-user.target
Save all of them to /etc/containers/systemd/:
sudo mkdir -p /etc/containers/systemd/ sudo nano /etc/containers/systemd/wg-easy.pod sudo nano /etc/containers/systemd/wg-easy-wg-easy.container
Start the pod
The pod service pulls in every container service. Autostart at boot comes from the [Install] section of the units, no enable needed.
sudo systemctl daemon-reload sudo systemctl start wg-easy-pod.service
Status & Logs
sudo systemctl status wg-easy-pod.service sudo journalctl -u wg-easy-wg-easy.service -f sudo podman pod ps && sudo podman ps
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f wg-easy-wg-easy sudo podman exec -it wg-easy-wg-easy /bin/sh
Restart
sudo systemctl restart wg-easy-pod.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
sudo podman pull <image>:<tag> sudo systemctl restart wg-easy-pod.service
Stop & remove
Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:
sudo systemctl stop wg-easy-pod.service sudo rm /etc/containers/systemd/wg-easy.pod sudo rm /etc/containers/systemd/wg-easy-wg-easy.container sudo systemctl daemon-reload
Delete the data — permanent, only after stop & remove
sudo podman volume rm wg-easy-data
A docker-compose.yml for podman-compose. Handy if you already work with Compose; there are no per-container systemd services.
Install podman-compose as root
apt install -y podman-compose
Save the compose file
services:
wg-easy:
image: ghcr.io/wg-easy/wg-easy:latest
pull_policy: always
restart: always
ports:
- 51820:51820
- 51821:51821
environment:
- WG_HOST=G8asGCG0da0Ll94WmKPVyg
- PASSWORD_HASH=G8asGCG0da0Ll94WmKPVyg
- WG_PORT=51820
- WG_DEFAULT_DNS=1.1.1.1
- WG_ALLOWED_IPS=0.0.0.0/0
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- wg-easy-data:/etc/wireguard:Z
volumes:
wg-easy-data: null
sudo mkdir -p /opt/wg-easy sudo nano /opt/wg-easy/docker-compose.yml
Start, status & logs
cd /opt/wg-easy sudo podman-compose up -d sudo podman-compose ps sudo podman-compose logs -f # Stop: sudo podman-compose down
Start after reboot
podman-restart.service starts every container with restart: always at boot:
sudo systemctl enable podman-restart.service
Update images
cd /opt/wg-easy sudo podman-compose pull sudo podman-compose up -d
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f wg-easy_wg-easy_1 sudo podman exec -it wg-easy_wg-easy_1 /bin/sh
Restart
cd /opt/wg-easy sudo podman-compose restart
Stop & remove
cd /opt/wg-easy sudo podman-compose down
Delete the data — permanent, only after stop & remove
sudo podman volume rm wg-easy_wg-easy-data
Plain podman pod create / podman create commands. Good for a quick test or to see what happens under the hood.
Save the script
#!/bin/bash set -e # ── Create named volumes ─────────────────────────────────────────── # Named volumes are created automatically — no UID/GID permission adjustment needed. sudo podman volume exists wg-easy-data || sudo podman volume create wg-easy-data # ── Create pod ───────────────────────────────────────────────────── sudo podman pod create \ --name wg-easy \ -p 51820:51820 \ -p 51821:51821 # ── Container: wg-easy-wg-easy ───────────────────────────────────────────── sudo podman create \ --pod wg-easy \ --name wg-easy-wg-easy \ --restart always \ --pull always \ -e WG_HOST='G8asGCG0da0Ll94WmKPVyg' \ -e PASSWORD_HASH='G8asGCG0da0Ll94WmKPVyg' \ -e WG_PORT='51820' \ -e WG_DEFAULT_DNS='1.1.1.1' \ -e WG_ALLOWED_IPS='0.0.0.0/0' \ -v wg-easy-data:/etc/wireguard:Z \ --cap-add NET_ADMIN \ --cap-add SYS_MODULE \ ghcr.io/wg-easy/wg-easy:latest # ── Start pod ────────────────────────────────────────────────────── sudo podman pod start wg-easy # ── Stop & clean up ─────────────────────────────────────────────── # sudo podman pod stop wg-easy # sudo podman pod rm wg-easy
nano wg-easy.sh
Run it, status & logs
bash wg-easy.sh sudo podman pod ps && sudo podman ps sudo podman logs -f <container-name>
Start after reboot
podman-restart.service starts every container with --restart always at boot:
podman 6.1 does not bring rootful pods created by hand back after a reboot (the infra container fails with stale file handle, and the failing podman-restart.service then stops the other containers it started). If the pod must survive reboots, use the Kube YAML or Quadlet tab.
sudo systemctl enable podman-restart.service
Remove or rebuild
The script creates the pod once. To apply changes or new images, remove the pod and run the script again (named volumes stay):
sudo podman pod rm -f wg-easy bash wg-easy.sh
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f wg-easy-wg-easy sudo podman exec -it wg-easy-wg-easy /bin/sh
Restart
sudo podman pod stop wg-easy sudo podman pod start wg-easy
Stop & remove
sudo podman pod rm -f wg-easy
Delete the data — permanent, only after stop & remove
sudo podman volume rm wg-easy-data
Ports < 1024 (e.g. 80, 443)
Rootless cannot open privileged ports. Solution:
sysctl net.ipv4.ip_unprivileged_port_start=80
Make persistent in /etc/sysctl.d/99-podman.conf.
Containers communicate via localhost
All containers in the pod share the same network namespace. Always use localhost, not container names.
# Correct (e.g. app → db): localhost:5432 # Wrong (doesn't work in a pod): db-container:5432
List open ports
Which ports are the running containers publishing? See the PORTS column:
podman ps
Custom DNS for the pod
Set a custom DNS server (e.g. local Pi-hole) in the generator under DNS server. Every format picks it up.
Set volume ownership
Fix permission errors by adjusting UID/GID in the user namespace:
podman unshare chown 1000:1000 /path/to/volume
SELinux volume labels
On SELinux systems (RHEL, Fedora) set the volume suffix:
/host/path:/container/path:Z # private /host/path:/container/path:z # shared
List all volumes
podman volume ls podman volume inspect <volume-name>
Volume backup
Back up data from a named volume:
podman run --rm \ -v <volume-name>:/data:ro \ -v $(pwd):/backup \ busybox tar czf /backup/backup.tar.gz /data
Cleanup
Remove unused images, containers and volumes:
podman system prune -f # containers + images podman image prune -f # untagged images only podman volume prune -f # unused volumes
Check for outdated images
List local images; auto-update only covers units with AutoUpdate= (Kube and Quadlet tabs):
podman images podman auto-update --dry-run
All containers, including stopped ones
podman pod ps podman ps -a
Resource usage
podman stats --no-stream