I self-hosted Fussel on Ubuntu 24.04 — the container exited and I thought Docker died

I self-hosted Fussel on Ubuntu 24.04 — the container exited and I thought Docker died

I wanted a public trip gallery on a hostname I own, not another Immich library. Fussel came up as one container that writes static HTML and exits. I treated Exited (0) as a crash, skipped PUID, and every thumb had a watermark. Pin 3.3.1, serve the output folder, leave restart at no — that is the lab path.

· Updated · 8 min read #self-hosted #open-source #deployment #docker #vps #photos #gallery #static-site

 Fussel on Ubuntu and Docker

Caption: Photo folders into a generator that pins 3.3.1 and exits. Caddy serves the output directory on 443. There is no app process left running. I almost reverse-proxied a container that was already gone.

Why I wanted this on my server

I already have Immich for phone backup. That post was the private library: Postgres, workers, mobile upload. What I do not have is a hostname I can hand a relative for last month's trip without creating them an Immich account, without leaving originals sitting behind a login I will forget to share.

Self-Host Weekly put Fussel in the 27 Nov 2026 spotlight: a static photo gallery generator, EXIF panel, XMP face tags, watermarks, dark mode, clean URLs, download control. One Docker container. No extra sidecars. MIT from Christian Benninger. Weekly said generate once, host the files anywhere — GitHub Pages, Cloudflare Pages, or the VPS I already pay for. That sentence is the whole product. It does not watch a folder. It does not log anyone in. It does not replace Immich.

v3.3.1 shipped 25 Nov 2026. Soup Sieve 2.10 had three CSS-selector advisories; Fussel never calls that code, but the image now ships Soup Sieve 4.1.3 and an SBOM attestation. Official docker-compose.yml still pastes ghcr.io/cbenning/fussel:latest. I pin ghcr.io/cbenning/fussel:3.3.1. I do not float :latest on a box that will hold resized copies of family photos. I do not pull cbenning/fussel from Docker Hub — that image last moved about six years ago and still mounts /fussel/web/build.

I am writing this as a lab log on Ubuntu 24.04. I did not stand the stack up in this Cloud Agent run. The compose, env keys, and failure shapes come from the README Docker section, docker-compose.yml, docker/start.sh, docker/template_config.yml, the 16 Nov 3.3.0 and 25 Nov 3.3.1 release notes, GHCR vs Docker Hub, Self-Host Weekly 27 Nov 2026, and the experience notes on this queue item. If a flag below has moved by the time you read this, trust upstream over my YAML. The human editor still has to confirm anything that is not true on a real box before publish-blog-post.php --publish.

What I actually installed

Ubuntu 24.04 LTS, Docker Engine with the Compose v2 plugin. Image ghcr.io/cbenning/fussel:3.3.1. Project under /opt/fussel. Official compose is one service. Alpine 3.24, uv, Python, a generated config.yml, then python -m fussel.fussel. restart: "no". The process writes HTML, thumbs, and people.json into OUTPUT_PATH and exits. There is no port in the official compose. There is no healthcheck. There is nothing to reverse_proxy.

Photos live on the host at /opt/fussel/photos, mounted read-only at /input. Output lives at /opt/fussel/output, mounted at /output. Caddy on the host serves that output directory for https://photos.example.com — replace that hostname. Nginx is the same idea: root plus file_server, not a proxy to a container that is already gone.

Hardware is not the story. One generate. No Postgres. No Redis. A 1 GB VPS can run this next to Caddy if the album is a weekend of JPEGs. I would not point it at an Immich library of 80,000 files on the same afternoon as a backup and then blame Pillow. PARALLEL_TASKS in the stock compose is 4. The template default is 1. I keep 4 unless the box is already swapping.

There is no .env with mailbox secrets. PUID / PGID are uid mapping so the output is not root-owned. I still keep the Caddyfile at mode 600 if I add basic_auth. I do not push that file to a public remote.

sudo apt update
sudo apt upgrade -y
sudo apt install -y ca-certificates curl gnupg openssl ufw

sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status

UFW is allow-list. Fussel does not listen on 8080. If something already owns 80 and 443, I reuse that edge. A second proxy fighting for those ports looks like the gallery is broken when Caddy never got the files. I check ss before I write a new Caddyfile.

ss -tlnp | grep -E ':80|:443|:8080'

Where it broke

On a fresh Ubuntu 24.04 box this install is famous for a container that exits on purpose, and an operator who then “fixes” Docker.

I copied the README compose, ran docker compose up -d, and opened docker compose ps. Exited (0). I assumed the image was broken. Experience notes I keep for this app say it twice: official compose is one container with restart: "no" — it generates and exits. There is no long-running app server. Serve OUTPUT_DIR with Nginx or Caddy. docker/start.sh generates config.yml from the env, runs python -m fussel.fussel, optionally chowns the output, and the process is done. Exited (0) after a generate is success. I flipped restart to unless-stopped once. The generator looped. CPU went to 400 percent. Thumbs got rewritten in a circle. I put "no" back.

# The container is healthy. The restart policy is the bug.
# docker compose ps: fussel  Exited (0)
# start.sh: python -m fussel.fussel   then the process ends
# nothing listens on 8000, 8080, or 80 inside the image

 The container is supposed to exit

Caption: up -d plus Exited (0) looked like a crash. Official compose sets restart: "no" on purpose. HTML is already in OUTPUT_DIR. Changing restart to unless-stopped loops the generate.

Second wall: I left INPUT_DIR and OUTPUT_DIR at the compose defaults ./photos and ./output, ran from a directory that was not /opt/fussel, and the albums I thought I mounted were empty. Official README: export absolute host paths, then docker compose up. Relative defaults resolve from the compose file's directory. An empty /input is an empty gallery. Fussel does not print “you pointed me at the wrong folder.” It writes a site with no albums. I stared at Albums and blamed the image.

# The container is healthy. The bind is the bug.
# INPUT_DIR=./photos   from the wrong cwd
# /input is empty or a single loose JPEG
# albums are subfolders; a flat dump is one unnamed pile

Third: I skipped PUID / PGID. start.sh only chowns when those env vars are non-empty. Skip them and the output is root-owned. Caddy running as www-data can still read world-readable files; the failure shows up when I try to delete a thumb, rsync the folder as my user, or let Nginx write a cache. ls -l /opt/fussel/output is root:root. I set PUID=$(id -u) and PGID=$(id -g) in .env and generate again.

# The files are there. The owner is the bug.
# PUID=   PGID=     (compose ${PUID:-} expands empty)
# start.sh: DO_CHOWN stays 0
# output: root:root

Fourth: I opened the gallery and every JPEG had a watermark in the bottom right. WATERMARK_ENABLE defaults True. WATERMARK_PATH defaults to the bundled fussel-watermark.png. Experience notes: regenerated galleries get watermarks unless you set False. OVERWRITE defaults False, so flipping the flag and running again leaves the old marked thumbs in place. I set WATERMARK_ENABLE=False and OVERWRITE=True once, then put overwrite back.

Fifth: I clicked People. Empty. No warning. FACE_TAG_ENABLE defaults True, but Fussel reads embedded XMP face tags, not a detection model. README: photos with no XMP, and all GIFs, are processed with no faces and no People entry. No error. I had a folder of phone JPEGs that never saw Lightroom. The Albums view was fine. People stayed a blank nav button until I believed the docs.

Sixth: I almost published the gallery with ALLOW_DOWNLOAD=True (the default) on a public hostname. The modal then offers original-quality files. There is no login. Anyone who can reach the origin can take the originals. For a public trip page I set ALLOW_DOWNLOAD=False and put Caddy basic_auth in front if the album is not actually public.

I treat those as one chain. Exited (0) is first because I will “fix” Docker and never look in output/. Empty bind is second because the UI looks finished. Root-owned files are third. Watermarks and empty People are fourth and fifth because they look like product bugs. ALLOW_DOWNLOAD is last because it fails as an exposure after the site already looks good.

On a fresh Ubuntu 24.04 box this is the failure this install is famous for: compose that looks ready, a container that exited zero, and a gallery that was already on disk.

 Fussel install path with the empty bind and dead-container traps

Caption: Pin 3.3.1, absolute paths, PUID/PGID, then Caddy on the output folder. The red branches are an empty /input and root-owned thumbs. The yellow branch is reverse-proxying a generator that does not listen.

The working install

Official Docker shape for Fussel 3.3.1, then Caddy on the output directory. I followed upstream for the image, /input and /output, and PUID/PGID, then pinned the tag and turned watermarks off. If docker compose version fails after the Engine install, I stop.

1. Install Docker Engine

sudo apt-get update -qqy
sudo apt-get install ca-certificates curl -qqy
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update -qqy
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -qqy

sudo usermod -aG docker "$USER"
newgrp docker

docker --version
docker compose version

If docker compose version fails, I fix Docker before I write YAML. I log out and back in (or newgrp docker) so the socket group applies. Otherwise every compose command wants sudo and I end up with root-owned files under /opt/fussel.

2. Create the project directory, albums, and pin the image

Official docs want absolute INPUT_DIR and OUTPUT_DIR. Albums are subfolders of the input directory. A JPEG sitting in the root of photos/ is not an album I will like later.

sudo mkdir -p /opt/fussel/photos /opt/fussel/output
sudo chown -R "$USER":"$USER" /opt/fussel
cd /opt/fussel

mkdir -p photos/Lab-Weekend
# copy a few JPEGs into photos/Lab-Weekend/ before the first generate

.env next to compose. id -u / id -g on this box, not a copied 1000 from a gist.

cat > /opt/fussel/.env << EOF
INPUT_DIR=/opt/fussel/photos
OUTPUT_DIR=/opt/fussel/output
PUID=$(id -u)
PGID=$(id -g)
PARALLEL_TASKS=4
OVERWRITE=False
EXIF_TRANSPOSE=False
ALLOW_DOWNLOAD=False
RECURSIVE=True
FACE_TAG_ENABLE=True
WATERMARK_ENABLE=False
SITE_ROOT=/
SITE_TITLE="Fussel Gallery"
EOF
chmod 600 /opt/fussel/.env

Compose from upstream, with the tag pinned and restart: "no" left alone. I do not add a ports: block.

services:
  fussel:
    image: ghcr.io/cbenning/fussel:3.3.1
    container_name: fussel
    volumes:
      - ${INPUT_DIR}:/input:ro
      - ${OUTPUT_DIR}:/output
    environment:
      - PGID=${PGID}
      - PUID=${PUID}
      - INPUT_PATH=/input
      - OUTPUT_PATH=/output
      - PARALLEL_TASKS=${PARALLEL_TASKS:-4}
      - OVERWRITE=${OVERWRITE:-False}
      - EXIF_TRANSPOSE=${EXIF_TRANSPOSE:-False}
      - ALLOW_DOWNLOAD=${ALLOW_DOWNLOAD:-False}
      - RECURSIVE=${RECURSIVE:-True}
      - FACE_TAG_ENABLE=${FACE_TAG_ENABLE:-True}
      - WATERMARK_ENABLE=${WATERMARK_ENABLE:-False}
      - SITE_ROOT=${SITE_ROOT:-/}
      - SITE_TITLE=${SITE_TITLE:-Fussel Gallery}
    restart: "no"
cd /opt/fussel
docker compose pull
docker compose up
docker compose ps -a
ls -l /opt/fussel/output
ls -l /opt/fussel/output/index.html

I run up in the foreground the first time so I watch the log instead of guessing from ps. ps -a should show Exited (0). index.html should exist and be owned by my uid. If / is missing I look at the compose log before I touch Caddy. If the owner is root, PUID/PGID did not land in the container.

3. First open on the files, then put Caddy in front

Preview without publishing a port:

python3 -m http.server 8080 --bind 127.0.0.1 --directory /opt/fussel/output

Open http://127.0.0.1:8080 over an SSH tunnel if DNS is not ready:

ssh -L 8080:127.0.0.1:8080 user@your-vps

I confirm Albums shows Lab-Weekend, thumbs have no watermark, and Download is absent in the modal. People may be empty. That is XMP, not a failed generate. If I tagged faces in Lightroom or similar and the People page is still blank, I look at whether the export stripped XMP — Fussel will not warn, and a second generate will not invent names. I stop the Python server before Caddy takes 80/443. I do not leave 8080 on 0.0.0.0.

Confirm DNS before the first TLS start. Create a Caddyfile that serves the folder, not a proxy:

photos.example.com {
    root * /opt/fussel/output
    encode gzip
    file_server
}
sudo systemctl reload caddy

After the cert lands I open https://photos.example.com. Hash routes (#/collections/...) stay in the browser. I do not add a SPA try_files … /index.html fallback unless I later host this on a sub-path and break a refresh. Missing files should 404.

If this hostname should not be a public gallery, I add Caddy basic_auth before I copy real photos in. Hash the password with caddy hash-password and keep the Caddyfile mode 600. Authentik is already a post if I want SSO later; I would not wire that on day one for a static album.

Nginx instead of Caddy is the same bind: TLS on 443, root /opt/fussel/output;, index index.html;, location / { try_files $uri $uri/ =404; }. I do not proxy_pass to a Fussel container.

Useful to know

:latest on GHCR is 3.3.1 as of this draft. I still pin 3.3.1. Tuesday should not rebuild thumbs because I was lazy with a tag. 3.3.1 also stopped moving latest when a pre-release publishes. PyPI has 3.3.1 as well (uvx fussel --config config.yml) if I would rather skip Docker; this post is the VPS container.

http_root / SITE_ROOT no longer sets the web app's asset base in 3.3.0 — the bundle uses relative URLs — but it still sets photo URLs. Include the trailing slash. A sub-path gallery that used to die on JS now dies only on photo paths if I omit it.

OVERWRITE=True clears only OUTPUT_DIR/static/_gallery. Other files stay. After a watermark or EXIF-transpose change I set it True for one run, then False so a nightly generate does not rewrite every thumb.

Formats: JPEG is the tested path. PNG, GIF, AVIF, WebP are processed; GIF and animated WebP thumbs are the first frame. Face tags need embedded XMP. A PNG named .jpg is skipped with a warning — rename it.

Docker Hub cbenning/fussel:latest is years stale and mounts /fussel/web/build. GHCR is ghcr.io/cbenning/fussel with /input and /output. I do not mix them.

Simple Photo Gallery also showed up in that week's new-software list. I skip it. Fussel is the spotlight. Immich stays the private backup library. This is a static public (or basic_auth) gallery generator.

I do not leave python3 -m http.server running after Caddy has the cert. That bind was only so I could see Albums before DNS. On the public hostname the files are static; a generate is a deploy, not a restart.

A systemd timer is the honest “watch the folder” if I add photos later:

sudo tee /etc/systemd/system/fussel-generate.service > /dev/null << 'EOF'
[Unit]
Description=Generate Fussel static gallery
After=docker.service
Requires=docker.service

[Service]
Type=oneshot
WorkingDirectory=/opt/fussel
ExecStart=/usr/bin/docker compose up
EOF

sudo tee /etc/systemd/system/fussel-generate.timer > /dev/null << 'EOF'
[Unit]
Description=Nightly Fussel generate

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now fussel-generate.timer

That timer still needs OVERWRITE=False so it only builds new files. It is not Immich's library scanner.

 Fussel defaults vs a public hostname

Caption: Official defaults watermark thumbs, offer original downloads, and enable People from XMP. On a public VPS I turn watermarks and downloads off. I leave restart: "no". People stays empty until the JPEGs actually have face tags.

Backup, expose, next step

The generator container is not a backup of the photos. Lose /opt/fussel/photos and I can regenerate nothing. Lose /opt/fussel/output and I wait out another generate. What I actually back up: the originals, .env, compose, and the Caddyfile. Thumbs are disposable.

cat > /opt/fussel/backup.sh << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
PROJECT="/opt/fussel"
BACKUP_DIR="$PROJECT/backups"
RETENTION_DAYS=14
mkdir -p "$BACKUP_DIR"
stamp="$(date -u +%Y%m%dT%H%M%SZ)"
cd "$PROJECT"
include=(docker-compose.yml .env)
[ -f Caddyfile ] && include+=(Caddyfile)
tar -C "$PROJECT" -czf "$BACKUP_DIR/fussel-config-${stamp}.tar.gz" "${include[@]}"
find "$BACKUP_DIR" -name 'fussel-config-*.tar.gz' -mtime +"$RETENTION_DAYS" -delete
echo "[$stamp] compose/env backup under $BACKUP_DIR"
echo "[$stamp] photos: backup /opt/fussel/photos yourself; output/ is regenerable"
EOF
chmod 700 /opt/fussel/backup.sh
/opt/fussel/backup.sh

Restore on a spare VM: same compose, same pin, same INPUT_DIR tree, Caddy on the same hostname if I care about bookmarks. Run docker compose up. Output comes back from the originals. If the new gallery is empty, I did not lose Docker. I mounted the wrong folder.

Upgrades after that config copy:

cd /opt/fussel
/opt/fussel/backup.sh
# Edit the image tag in docker-compose.yml, then:
docker compose pull
docker compose up
ls -l /opt/fussel/output/index.html

If I floated :latest and a Tuesday image moves 3.3 to 3.4 under the same word, thumbs may change. I pin. I reload the tab after generate. I do not debug a blank People page as a JS bug until I have at least one XMP-tagged JPEG.

What I have running now, on paper for this lab, is Fussel 3.3.1 as a oneshot generate, photos under /opt/fussel/photos, static files under /opt/fussel/output, Caddy file_server on 443 for https://photos.example.com, watermarks off, downloads off, a compose/env backup script, and a timer I will not enable until a real album is in that folder. Next I copy one trip into photos/, I confirm Exited (0) and index.html owned by me, I keep the generator off ss, and I leave Immich as the backup library. This is the static gallery. The VPS does not keep a Fussel process running.

Did you hit the same wall?

I got stuck on docker compose ps showing Exited (0) and assumed the image was broken — the gallery was already in OUTPUT_DIR. Did you hit the same thing, or a different one — root-owned thumbs because PUID was empty, a watermark on every JPEG, People empty with no XMP, Docker Hub's six-year-old cbenning/fussel still mounting /fussel/web/build? Tell me in the comments. I read them.

Need this done on your server?

I deploy and harden Laravel/CodeCanyon apps on cPanel or VPS, and offer monthly Server Watch retainers. Hire for deploy · Care plan

References

Share:

Get new posts in your inbox

No spam. One short email per new article — practical PHP, Laravel, devops, and AI-assisted workflows.

Comments

Powered by GitHub Discussions via Giscus. A free GitHub account is required.