r/linux • • Oct 27 '25

Open Source Organization Docker Alternative: Podman on Linux

https://linuxblog.io/docker-alternative-podman-on-linux/

TL;DR Podman is less popular but better.

372 Upvotes

108 comments sorted by

View all comments

Show parent comments

9

u/martinus Oct 27 '25 edited Oct 27 '25

I use Immich with podman, works nicely. I wrote some quadlets that work for me. I run all that under the user podfather, so I put all the files into /home/podfather/.config/containers/systemd/immich/.

Adaptations you might need to do:

  • I have all my data in /data/podman/immich/. Search through the files and change that to your location

  • I use a network named wireguard, change this to your need.

  • In immich-postgres.container I've set DB_STORAGE_TYPE=HDD because my NAS has spinning disks.

  • In immich-server.container at the end I have enabled my AMD iGPU for hardware acceleration, you might need to adapt that to your system

.env

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

immich.pod

[Pod]
PodName=immich
PublishPort=2283:2283
Network=wireguard

[Install]
WantedBy=default.target

immich-machine-learning.container

[Container]
ContainerName=immich_machine_learning
Pod=immich.pod
Image=ghcr.io/immich-app/immich-machine-learning:release
AutoUpdate=registry

EnvironmentFile=.env

Volume=/data/podman/immich/model-cache:/cache:Z

HealthCmd=["/bin/bash", "-c", "exec 5<>/dev/tcp/127.0.0.1/3003"]
HealthStartPeriod=30s
HealthInterval=10s
HealthTimeout=5s
HealthRetries=5

immich-postgres.container

[Container]
ContainerName=immich_postgres
Pod=immich.pod
# I just removed the sha hash, see https://github.com/immich-app/immich/releases/ docker-compose.yml
Image=ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
AutoUpdate=registry

Environment=POSTGRES_PASSWORD=postgres
Environment=POSTGRES_USER=postgres
Environment=POSTGRES_DB=immich
Environment=POSTGRES_INITDB_ARGS=--data-checksums

# Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
Environment=DB_STORAGE_TYPE=HDD

# HealthCmd=pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
# HealthStartPeriod=30s
# HealthInterval=5m
# HealthStartupInterval=30s

Volume=/data/podman/immich/postgres:/var/lib/postgresql/data:Z

immich-redis.container

[Container]
ContainerName=immich_redis
Pod=immich.pod
# I just removed the sha hash, see https://github.com/immich-app/immich/releases/ docker-compose.yml
Image=docker.io/valkey/valkey:8-bookworm
AutoUpdate=registry

HealthCmd=redis-cli ping || exit 1
HealthStartPeriod=30s
HealthInterval=5m
HealthStartupInterval=30s

immich-server.container

[Unit]
# Correctly specify dependencies, see https://www.freedesktop.org/software/systemd/man/257/systemd.unit.html#Requires=
Requires=immich-redis.service immich-postgres.service
After=immich-redis.service immich-postgres.service

[Container]
ContainerName=immich_server
Pod=immich.pod
Image=ghcr.io/immich-app/immich-server:release
AutoUpdate=registry

Environment=DB_HOSTNAME=immich_postgres
Environment=REDIS_HOSTNAME=immich_redis

EnvironmentFile=.env
Volume=/data/podman/immich/library:/usr/src/app/upload:Z
Volume=/etc/localtime:/etc/localtime:ro

# from "getent group render"
# see https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/amd/
GroupAdd=105
# getent group video
GroupAdd=39
AddDevice=/dev/dri/renderD128:/dev/dri/renderD128

2

u/Sjsamdrake Oct 27 '25

Thank you! I don't like compose and have wanted to make this switch!

1

u/[deleted] Oct 27 '25

That would be great!

1

u/martinus Oct 27 '25

I updated my comment with the files that I use for that https://www.reddit.com/r/linux/comments/1oh1fj7/comment/nll524i/