Authentik
Deployment rootless
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
Create user (if not existing)
useradd -m -s /bin/bash authentik passwd authentik
Enable linger (services keep running after logout and start after reboot)
loginctl enable-linger authentik
Switch to deployment user
su - authentik
Use su - with the dash — this creates a proper login shell as authentik. Without the dash, root environment variables carry over and rootless Podman will not work correctly.
Fix environment for rootless systemd (new users only — skip if already set)
Required once so systemctl --user works in non-login sessions.
cat << 'EOF' >> ~/.bashrc # Fix for systemd user services (rootless Podman/systemctl) export XDG_RUNTIME_DIR=/run/user/$(id -u) export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus EOF source ~/.bashrc
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: authentik
labels:
app: authentik
spec:
restartPolicy: Always
containers:
- name: authentik-server
image: ghcr.io/goauthentik/server:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
hostPort: 9000
- containerPort: 9443
hostPort: 9443
env:
- name: AUTHENTIK_REDIS__HOST
value: 127.0.0.1
- name: AUTHENTIK_POSTGRESQL__HOST
value: 127.0.0.1
- name: AUTHENTIK_POSTGRESQL__USER
value: authentik
- name: AUTHENTIK_POSTGRESQL__PASSWORD
value: nsKWGURu0ANME3XU6m1yHA
- name: AUTHENTIK_POSTGRESQL__NAME
value: authentik
- name: AUTHENTIK_SECRET_KEY
value: nsKWGURu0ANME3XU6m1yHA
command:
- dumb-init
- --
- ak
- server
- name: authentik-worker
image: ghcr.io/goauthentik/server:latest
imagePullPolicy: Always
env:
- name: AUTHENTIK_REDIS__HOST
value: 127.0.0.1
- name: AUTHENTIK_POSTGRESQL__HOST
value: 127.0.0.1
- name: AUTHENTIK_POSTGRESQL__USER
value: authentik
- name: AUTHENTIK_POSTGRESQL__PASSWORD
value: nsKWGURu0ANME3XU6m1yHA
- name: AUTHENTIK_POSTGRESQL__NAME
value: authentik
- name: AUTHENTIK_SECRET_KEY
value: nsKWGURu0ANME3XU6m1yHA
command:
- dumb-init
- --
- ak
- worker
- name: postgres
image: docker.io/postgres:16
env:
- name: POSTGRES_USER
value: authentik
- name: POSTGRES_PASSWORD
value: nsKWGURu0ANME3XU6m1yHA
- name: POSTGRES_DB
value: authentik
volumeMounts:
- name: vol-0
mountPath: /var/lib/postgresql/data
securityContext:
runAsUser: 999
runAsGroup: 999
- name: redis
image: docker.io/redis:7-alpine
volumeMounts:
- name: vol-1
mountPath: /data
command:
- redis-server
- --appendonly
- 'yes'
volumes:
- name: vol-0
persistentVolumeClaim:
claimName: authentik-db
- name: vol-1
persistentVolumeClaim:
claimName: authentik-redis
Save the YAML file
mkdir -p ~/.config/containers/ nano ~/.config/containers/authentik.yaml
Test the pod (without autostart)
podman kube play ~/.config/containers/authentik.yaml # Check status: podman pod ps && podman ps # Stop: podman kube down ~/.config/containers/authentik.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
systemctl --user enable --now podman-kube@$(systemd-escape ~/.config/containers/authentik.yaml).service # Status & logs: systemctl --user status podman-kube@$(systemd-escape ~/.config/containers/authentik.yaml).service journalctl --user -u podman-kube@$(systemd-escape ~/.config/containers/authentik.yaml).service -f
The day-to-day commands below have a block for this service.
Create Quadlet .kube file
[Unit] Description=authentik pod After=network-online.target Wants=network-online.target [Kube] Yaml=%h/.config/containers/authentik.yaml [Service] Restart=always [Install] WantedBy=default.target
%h is a systemd home-directory specifier — do not replace it with ~/.
Save to ~/.config/containers/systemd/:
mkdir -p ~/.config/containers/systemd/ nano ~/.config/containers/systemd/authentik.kube
Start systemd service
systemctl --user daemon-reload systemctl --user start authentik.service
Status & Logs
systemctl --user status authentik.service journalctl --user -u authentik.service -f podman pod ps podman ps
Enable automatic image updates optional
Requires AutoUpdate=registry in the .kube file. Podman then checks for new images and restarts the pod automatically:
systemctl --user enable --now podman.socket systemctl --user daemon-reload systemctl --user enable --now podman-auto-update.timer # Check status: systemctl --user status podman-auto-update.timer # Trigger manually: podman auto-update
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
podman logs -f authentik-authentik-server podman logs -f authentik-authentik-worker podman logs -f authentik-postgres podman logs -f authentik-redis podman exec -it authentik-authentik-server /bin/sh
Restart
systemctl --user restart authentik.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
podman pull <image>:<tag> systemctl --user restart authentik.service
Stop & remove
Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:
systemctl --user stop authentik.service rm ~/.config/containers/systemd/authentik.kube systemctl --user daemon-reload
podman older than 4.4 (podman-kube@ from step 3)
systemctl --user restart podman-kube@$(systemd-escape ~/.config/containers/authentik.yaml).service # Update an image: pull, then restart as above podman pull <image>:<tag> # Stop and remove from autostart: systemctl --user disable --now podman-kube@$(systemd-escape ~/.config/containers/authentik.yaml).service
Delete the data — permanent, only after stop & remove
podman volume rm authentik-db podman volume rm authentik-redis
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=authentik pod [Pod] PodName=authentik PublishPort=9000:9000 PublishPort=9443:9443
[Unit] Description=authentik-authentik-server container [Container] Image=ghcr.io/goauthentik/server:latest Pod=authentik.pod ContainerName=authentik-authentik-server Pull=always Environment=AUTHENTIK_REDIS__HOST=127.0.0.1 Environment=AUTHENTIK_POSTGRESQL__HOST=127.0.0.1 Environment=AUTHENTIK_POSTGRESQL__USER=authentik Environment=AUTHENTIK_POSTGRESQL__PASSWORD=nsKWGURu0ANME3XU6m1yHA Environment=AUTHENTIK_POSTGRESQL__NAME=authentik Environment=AUTHENTIK_SECRET_KEY=nsKWGURu0ANME3XU6m1yHA Entrypoint=dumb-init Exec=-- ak server [Service] Restart=always [Install] WantedBy=default.target
[Unit] Description=authentik-authentik-worker container [Container] Image=ghcr.io/goauthentik/server:latest Pod=authentik.pod ContainerName=authentik-authentik-worker Pull=always Environment=AUTHENTIK_REDIS__HOST=127.0.0.1 Environment=AUTHENTIK_POSTGRESQL__HOST=127.0.0.1 Environment=AUTHENTIK_POSTGRESQL__USER=authentik Environment=AUTHENTIK_POSTGRESQL__PASSWORD=nsKWGURu0ANME3XU6m1yHA Environment=AUTHENTIK_POSTGRESQL__NAME=authentik Environment=AUTHENTIK_SECRET_KEY=nsKWGURu0ANME3XU6m1yHA Entrypoint=dumb-init Exec=-- ak worker [Service] Restart=always [Install] WantedBy=default.target
[Unit] Description=authentik-postgres container [Container] Image=docker.io/postgres:16 Pod=authentik.pod ContainerName=authentik-postgres Environment=POSTGRES_USER=authentik Environment=POSTGRES_PASSWORD=nsKWGURu0ANME3XU6m1yHA Environment=POSTGRES_DB=authentik Volume=authentik-db:/var/lib/postgresql/data:Z User=999 Group=999 [Service] Restart=always [Install] WantedBy=default.target
[Unit] Description=authentik-redis container [Container] Image=docker.io/redis:7-alpine Pod=authentik.pod ContainerName=authentik-redis Volume=authentik-redis:/data:Z Entrypoint=redis-server Exec=--appendonly yes [Service] Restart=always [Install] WantedBy=default.target
Save all of them to ~/.config/containers/systemd/:
mkdir -p ~/.config/containers/systemd/ nano ~/.config/containers/systemd/authentik.pod nano ~/.config/containers/systemd/authentik-authentik-server.container nano ~/.config/containers/systemd/authentik-authentik-worker.container nano ~/.config/containers/systemd/authentik-postgres.container nano ~/.config/containers/systemd/authentik-redis.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.
systemctl --user daemon-reload systemctl --user start authentik-pod.service
Status & Logs
systemctl --user status authentik-pod.service journalctl --user -u authentik-authentik-server.service -f journalctl --user -u authentik-authentik-worker.service -f journalctl --user -u authentik-postgres.service -f journalctl --user -u authentik-redis.service -f podman pod ps && podman ps
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
podman logs -f authentik-authentik-server podman logs -f authentik-authentik-worker podman logs -f authentik-postgres podman logs -f authentik-redis podman exec -it authentik-authentik-server /bin/sh
Restart
systemctl --user restart authentik-pod.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
podman pull <image>:<tag> systemctl --user restart authentik-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:
systemctl --user stop authentik-pod.service rm ~/.config/containers/systemd/authentik.pod rm ~/.config/containers/systemd/authentik-authentik-server.container rm ~/.config/containers/systemd/authentik-authentik-worker.container rm ~/.config/containers/systemd/authentik-postgres.container rm ~/.config/containers/systemd/authentik-redis.container systemctl --user daemon-reload
Delete the data — permanent, only after stop & remove
podman volume rm authentik-db podman volume rm authentik-redis
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
Run this as root, e.g. together with the prerequisites before su - authentik.
apt install -y podman-compose
Save the compose file
services:
authentik-server:
image: ghcr.io/goauthentik/server:latest
pull_policy: always
restart: always
environment:
- AUTHENTIK_REDIS__HOST=127.0.0.1
- AUTHENTIK_POSTGRESQL__HOST=127.0.0.1
- AUTHENTIK_POSTGRESQL__USER=authentik
- AUTHENTIK_POSTGRESQL__PASSWORD=nsKWGURu0ANME3XU6m1yHA
- AUTHENTIK_POSTGRESQL__NAME=authentik
- AUTHENTIK_SECRET_KEY=nsKWGURu0ANME3XU6m1yHA
entrypoint:
- dumb-init
- --
- ak
- server
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
network_mode: service:postgres
authentik-worker:
image: ghcr.io/goauthentik/server:latest
pull_policy: always
restart: always
environment:
- AUTHENTIK_REDIS__HOST=127.0.0.1
- AUTHENTIK_POSTGRESQL__HOST=127.0.0.1
- AUTHENTIK_POSTGRESQL__USER=authentik
- AUTHENTIK_POSTGRESQL__PASSWORD=nsKWGURu0ANME3XU6m1yHA
- AUTHENTIK_POSTGRESQL__NAME=authentik
- AUTHENTIK_SECRET_KEY=nsKWGURu0ANME3XU6m1yHA
entrypoint:
- dumb-init
- --
- ak
- worker
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
network_mode: service:postgres
postgres:
image: docker.io/postgres:16
restart: always
environment:
- POSTGRES_USER=authentik
- POSTGRES_PASSWORD=nsKWGURu0ANME3XU6m1yHA
- POSTGRES_DB=authentik
user: 999:999
volumes:
- authentik-db:/var/lib/postgresql/data:Z
ports:
- 9000:9000
- 9443:9443
redis:
image: docker.io/redis:7-alpine
restart: always
entrypoint:
- redis-server
- --appendonly
- 'yes'
volumes:
- authentik-redis:/data:Z
network_mode: service:postgres
depends_on:
postgres:
condition: service_started
volumes:
authentik-db: null
authentik-redis: null
mkdir -p ~/authentik nano ~/authentik/docker-compose.yml
Start, status & logs
cd ~/authentik podman-compose up -d podman-compose ps podman-compose logs -f # Stop: podman-compose down
Start after reboot
podman-restart.service starts every container with restart: always at boot:
systemctl --user enable podman-restart.service
Update images
cd ~/authentik podman-compose pull podman-compose up -d
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
podman logs -f authentik_authentik-server_1 podman logs -f authentik_authentik-worker_1 podman logs -f authentik_postgres_1 podman logs -f authentik_redis_1 podman exec -it authentik_authentik-server_1 /bin/sh
Restart
cd ~/authentik podman-compose restart
Stop & remove
cd ~/authentik podman-compose down
Delete the data — permanent, only after stop & remove
podman volume rm authentik_authentik-db podman volume rm authentik_authentik-redis
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. podman volume exists authentik-db || podman volume create authentik-db podman volume exists authentik-redis || podman volume create authentik-redis # ── Create pod ───────────────────────────────────────────────────── podman pod create \ --name authentik \ -p 9000:9000 \ -p 9443:9443 # ── Container: authentik-authentik-server ───────────────────────────────────────────── podman create \ --pod authentik \ --name authentik-authentik-server \ --restart always \ --pull always \ -e AUTHENTIK_REDIS__HOST='127.0.0.1' \ -e AUTHENTIK_POSTGRESQL__HOST='127.0.0.1' \ -e AUTHENTIK_POSTGRESQL__USER='authentik' \ -e AUTHENTIK_POSTGRESQL__PASSWORD='nsKWGURu0ANME3XU6m1yHA' \ -e AUTHENTIK_POSTGRESQL__NAME='authentik' \ -e AUTHENTIK_SECRET_KEY='nsKWGURu0ANME3XU6m1yHA' \ --entrypoint dumb-init \ ghcr.io/goauthentik/server:latest \ -- ak server # ── Container: authentik-authentik-worker ───────────────────────────────────────────── podman create \ --pod authentik \ --name authentik-authentik-worker \ --restart always \ --pull always \ -e AUTHENTIK_REDIS__HOST='127.0.0.1' \ -e AUTHENTIK_POSTGRESQL__HOST='127.0.0.1' \ -e AUTHENTIK_POSTGRESQL__USER='authentik' \ -e AUTHENTIK_POSTGRESQL__PASSWORD='nsKWGURu0ANME3XU6m1yHA' \ -e AUTHENTIK_POSTGRESQL__NAME='authentik' \ -e AUTHENTIK_SECRET_KEY='nsKWGURu0ANME3XU6m1yHA' \ --entrypoint dumb-init \ ghcr.io/goauthentik/server:latest \ -- ak worker # ── Container: authentik-postgres ───────────────────────────────────────────── podman create \ --pod authentik \ --name authentik-postgres \ --restart always \ -e POSTGRES_USER='authentik' \ -e POSTGRES_PASSWORD='nsKWGURu0ANME3XU6m1yHA' \ -e POSTGRES_DB='authentik' \ -v authentik-db:/var/lib/postgresql/data:Z \ --user 999:999 \ docker.io/postgres:16 # ── Container: authentik-redis ───────────────────────────────────────────── podman create \ --pod authentik \ --name authentik-redis \ --restart always \ -v authentik-redis:/data:Z \ --entrypoint redis-server \ docker.io/redis:7-alpine \ --appendonly yes # ── Start pod ────────────────────────────────────────────────────── podman pod start authentik # ── Stop & clean up ─────────────────────────────────────────────── # podman pod stop authentik # podman pod rm authentik
nano authentik.sh
Run it, status & logs
bash authentik.sh podman pod ps && podman ps podman logs -f <container-name>
Start after reboot
podman-restart.service starts every container with --restart always at boot:
systemctl --user 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):
podman pod rm -f authentik bash authentik.sh
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
podman logs -f authentik-authentik-server podman logs -f authentik-authentik-worker podman logs -f authentik-postgres podman logs -f authentik-redis podman exec -it authentik-authentik-server /bin/sh
Restart
podman pod stop authentik podman pod start authentik
Stop & remove
podman pod rm -f authentik
Delete the data — permanent, only after stop & remove
podman volume rm authentik-db podman volume rm authentik-redis
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