dankhostself-host anything

wallabag with Docker Compose

wallabag is a web application allowing you to save web pages for later reading. Click, save and read it when you want. In the project's words: wallabag README on GitHub checked 2026-09-30

Runs on: amd64, arm64 from each image's registry manifest, checked 2026-09-30; a CPU counts only if every image has a build for it. Image by image

Add wallabag to the builder to use your own domain, get its passwords generated in your browser, and combine it with other apps in one file.

What wallabag needs

Only figures wallabag's own documentation publishes, each linked to the page it is on. Where the project gives no number, this page does not invent one.

ResourceMinimumRecommended
RAMThe project publishes no figure
CPUThe project publishes no figure
DiskThe project publishes no figure

On top of this, Caddy (the reverse proxy in the file) is a single small container. wallabag itself runs as 3 containers: wallabag, wallabag-db, wallabag-redis.

Which hardware wallabag has images for

Read from each image's manifest list in its registry (anonymous, read-only) when this page was built. An app counts for a CPU only if every one of its images lists it.

  • x86-64 PC or NAS (linux/amd64): every image has a build.
  • Raspberry Pi 4/5, 64-bit OS (linux/arm64): every image has a build.
  • Raspberry Pi 3 or Zero 2 W, 32-bit OS (linux/arm/v7): no image for db. No image for this hardware; the builder leaves the app out.
ServiceImagePlatforms in the manifestDigestRegistryChecked
wallabagwallabag/wallabagamd64, arm64, arm/v7sha256:4a527e027e0d59e87c14225ef11e005af3d4890374202ad319ce5e63dfc66709registry-1.docker.io2026-09-30
dbmariadbamd64, arm64, ppc64le, s390xsha256:d4fdec0510ad498e4f3127da30a99df3745bd6d5e611ae6ac5f76403d9284a8dregistry-1.docker.io2026-09-30
redisredis:alpineamd64, arm/v6, arm/v7, arm64, 386, ppc64le, riscv64, s390xsha256:3811787313eba226a2ef38658c6ccb91cd5e110edc89c37767de373120a0e5a0registry-1.docker.io2026-09-25

A manifest says an image exists for a CPU, not how well wallabag runs on it: a build for arm64 or arm/v7 can still be too slow or need more memory than the board has. The RAM and disk wallabag publishes are in the table above and, for a whole set of apps against a Raspberry Pi, on Will it run on my machine?. A tag like latest can move to a new digest after the date checked.

docker-compose.yml

This is exactly what the builder writes for wallabag alone on example.org: the official definition with its published ports removed and Caddy added in front. Every ${VARIABLE} is defined in the .env below.

# docker-compose.yml built at dankhost.com for: wallabag
# Each app block is its official compose definition. Only the names were prefixed with
# the app slug (services, containers, volumes, bind folders, .env variables) so any set of
# apps can share one file; other differences are listed under "Changed:" in each block.
# Only Caddy publishes ports. Secrets live in .env next to this file.

services:
  # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ----
  # Source: https://caddyserver.com/docs/running (checked 2026-09-23)
  # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23)
  # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly.
  caddy:
    image: "caddy:2"
    container_name: "caddy"
    restart: "unless-stopped"
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - "./caddy:/etc/caddy"
      - "caddy-data:/data"
      - "caddy-config:/config"
    networks:
      proxy:
        ipv4_address: "172.30.0.2"

  # ---- wallabag (read.example.org) ----
  # Source: https://github.com/wallabag/docker (checked 2026-09-30)
  # Changed: Removed the documented ports: "80" line; Caddy reaches wallabag:80 on the proxy network. The database and Redis stay on wallabag's own network, which has no internet access (wallabag itself fetches articles through the proxy network).
  #          The README example's two passwords, for the MariaDB root user (used in both services) and for the wallabag database user, are generated values in .env.
  #          Added SYMFONY__ENV__SECRET as a generated value: the README lists it with a fixed default ("defaults to" a published string), which would be the same on every server that keeps it.
  #          The folders /opt/wallabag/images and /opt/wallabag/data become ./images and ./data next to this file, and SYMFONY__ENV__DOMAIN_NAME is https://read.example.org. The documented list-form values "wallabag_" and "Your wallabag instance" are written without the quote marks: they are also the README's defaults.
  wallabag:
    image: "wallabag/wallabag"
    container_name: "wallabag"
    restart: "unless-stopped"
    environment:
      MYSQL_ROOT_PASSWORD: "${WALLABAG_MYSQL_ROOT_PASSWORD}"
      SYMFONY__ENV__DATABASE_DRIVER: "pdo_mysql"
      SYMFONY__ENV__DATABASE_HOST: "db"
      SYMFONY__ENV__DATABASE_PORT: "3306"
      SYMFONY__ENV__DATABASE_NAME: "wallabag"
      SYMFONY__ENV__DATABASE_USER: "wallabag"
      SYMFONY__ENV__DATABASE_PASSWORD: "${WALLABAG_DB_PASSWORD}"
      SYMFONY__ENV__DATABASE_CHARSET: "utf8mb4"
      SYMFONY__ENV__DATABASE_TABLE_PREFIX: "wallabag_"
      SYMFONY__ENV__MAILER_DSN: "smtp://127.0.0.1"
      SYMFONY__ENV__FROM_EMAIL: "wallabag@example.com"
      SYMFONY__ENV__DOMAIN_NAME: "https://read.example.org"
      SYMFONY__ENV__SERVER_NAME: "Your wallabag instance"
      SYMFONY__ENV__SECRET: "${WALLABAG_SECRET}"
    volumes:
      - "./wallabag/images:/var/www/wallabag/web/assets/images"
    depends_on:
      - "wallabag-db"
      - "wallabag-redis"
    networks:
      proxy: {}
      wallabag-backend: {}
  wallabag-db:
    image: "mariadb"
    container_name: "wallabag-db"
    restart: "unless-stopped"
    environment:
      MYSQL_ROOT_PASSWORD: "${WALLABAG_MYSQL_ROOT_PASSWORD}"
    volumes:
      - "./wallabag/data:/var/lib/mysql"
    healthcheck:
      test:
        - "CMD"
        - "/usr/local/bin/healthcheck.sh"
        - "--innodb_initialized"
      interval: "20s"
      timeout: "3s"
    networks:
      wallabag-backend:
        aliases:
          - "db"
  wallabag-redis:
    image: "redis:alpine"
    container_name: "wallabag-redis"
    restart: "unless-stopped"
    healthcheck:
      test:
        - "CMD"
        - "redis-cli"
        - "ping"
      interval: "20s"
      timeout: "3s"
    networks:
      wallabag-backend:
        aliases:
          - "redis"

networks:
  # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact.
  # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's
  # ipv4_address and in every trusted-proxy value to a free 172.x.0 range.
  proxy:
    ipam:
      config:
        - subnet: "172.30.0.0/24"
          ip_range: "172.30.0.128/25"
          gateway: "172.30.0.1"
  wallabag-backend:
    internal: true

volumes:
  caddy-data:
  caddy-config:

Caddyfile save as caddy/Caddyfile

Caddy gets and renews the HTTPS certificate for read.example.org by itself once the DNS record points at your server and ports 80 and 443 reach it.

# Caddyfile built at dankhost.com. Save it as ./caddy/Caddyfile next to docker-compose.yml.
# Caddy gets and renews a Let's Encrypt certificate for each name below by itself,
# once the DNS records point at this server and ports 80 and 443 reach it.

# wallabag
read.example.org {
	reverse_proxy wallabag:80
}

Already running nginx, Nginx Proxy Manager, Caddy or Traefik? The reverse-proxy settings wallabag needs, for all four, each cited to wallabag's own docs.

.env

The secrets are left blank here on purpose: a password printed on a public page is the same for everyone who copies it. The builder fills them with random letters and digits made in your browser.

# .env for wallabag, from dankhost.com/app/wallabag/. Fill the blank secrets before starting.
# Keep this file private (chmod 600).

# wallabag
# 32 random letters and digits: the builder fills this in your browser
WALLABAG_MYSQL_ROOT_PASSWORD=
# 32 random letters and digits: the builder fills this in your browser
WALLABAG_DB_PASSWORD=
# 40 random letters and digits: the builder fills this in your browser
WALLABAG_SECRET=

Changes from the official file

Besides prefixing every service, container, volume, folder and variable with wallabag (so any set of apps can share one file), these are all the differences from what the project documents:

  • Removed the documented ports: "80" line; Caddy reaches wallabag:80 on the proxy network. The database and Redis stay on wallabag's own network, which has no internet access (wallabag itself fetches articles through the proxy network).
  • The README example's two passwords, for the MariaDB root user (used in both services) and for the wallabag database user, are generated values in .env.
  • Added SYMFONY__ENV__SECRET as a generated value: the README lists it with a fixed default ("defaults to" a published string), which would be the same on every server that keeps it.
  • The folders /opt/wallabag/images and /opt/wallabag/data become ./images and ./data next to this file, and SYMFONY__ENV__DOMAIN_NAME is https://read.example.org. The documented list-form values "wallabag_" and "Your wallabag instance" are written without the quote marks: they are also the README's defaults.

Notes for wallabag behind the proxy

  • Log in at https://read.example.org with wallabag / wallabag, the README's default login, and change that password at once (Config > User information and password): until you do, anyone who finds the address can log in.
  • Mail: SYMFONY__ENV__MAILER_DSN and SYMFONY__ENV__FROM_EMAIL are the README's example values; the README says you must fill them in for your mail server if you want wallabag to send email.
  • After an image update that needs a database migration, the README's command: docker compose exec wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
  • The README's example gives no tags: wallabag/wallabag and mariadb are pulled as latest, redis as alpine. Pin versions if you want updates only when you choose.

How to run it

  1. At your DNS provider, add an A record named read on your domain pointing at the server's public IP address, and forward TCP 80, TCP 443 and UDP 443 to it.
  2. Save the three files in one folder: docker-compose.yml and .env side by side, the Caddyfile at ./caddy/Caddyfile. Replace example.org with your domain in the Caddyfile, the compose file and the .env, or let the builder do it.
  3. Fill the blank WALLABAG_MYSQL_ROOT_PASSWORD, WALLABAG_DB_PASSWORD, WALLABAG_SECRET in .env. The builder generates them; on the server, tr -dc A-Za-z0-9 </dev/urandom | head -c 32 prints 32 random letters and digits. Then chmod 600 .env.
  4. Start it:
    docker compose up -d
    docker compose logs -f caddy   # watch the certificate arrive
  5. Open the new address (read. plus your domain) in a browser and follow the notes above.

Back it up

wallabag's Docker README publishes no backup procedure. Articles, tags and users are in the MariaDB database, dumped below; the ./images folder holds the pictures saved with articles.

Below is the BACKUP.md the builder writes next to the compose file above: which of its folders and volumes hold data, the dump command the project documents, rewritten for this file's service names, what to copy with which container stopped, and a restore check. Pick more apps in the builder and it covers them all in one file.

# BACKUP.md built at dankhost.com for: wallabag

What to copy from the docker-compose.yml built with this file, the database dump each project documents (rewritten for the service names in that file), what to copy with which container stopped, and how to check the result. Run every command in the folder that holds docker-compose.yml.

The folders are owned by the containers' users: put sudo in front of tar if it says "Permission denied". Named volumes live under /var/lib/docker/volumes, not next to the compose file, so they are copied through a throwaway ubuntu container (Docker's documented --volumes-from method). tar makes a full copy each run; for large folders an incremental tool (restic, borg, rsync) saves time and space.

Never run "docker compose down -v" on this file: it deletes the named volumes of every app in it.

## Before you start

    BACKUP=/mnt/backup/selfhost   # change this: a disk or machine other than this server's system disk
    mkdir -p "$BACKUP"

## Every time: the three stack files

    tar czf "$BACKUP/stack-files.tar.gz" docker-compose.yml .env caddy

.env holds the database passwords and secret keys the apps were set up with; keep this archive as private as the data.

## Caddy (the reverse proxy)

Caddy's docs: 'The data directory must not be treated as a cache.' It holds the TLS certificates and their private keys; without it Caddy has to ask Let's Encrypt for every certificate again.

- caddy-data (named volume, /data in caddy)
  BACK UP: TLS certificates, private keys, OCSP staples.
- caddy-config (named volume, /config in caddy)
  SKIP: the last active configuration, kept for 'caddy run --resume', which this setup does not use: it starts from the Caddyfile.
- ./caddy (/etc/caddy in caddy)
  IN stack-files.tar.gz: the Caddyfile, copied with the stack files above.

Copy (Caddy keeps serving while you copy):

    docker run --rm --volumes-from caddy -v "$BACKUP":/backup ubuntu tar cvf /backup/caddy-data.tar /data

Restore check:

    tar tf "$BACKUP/caddy-data.tar" > /dev/null && echo OK
    docker run --rm --volumes-from caddy -v "$BACKUP":/backup ubuntu bash -c "cd /data && tar xvf /backup/caddy-data.tar --strip 1"

Sources:
- Caddy docs: Conventions, Data directory: https://caddyserver.com/docs/conventions#data-directory (checked 2026-09-24)
- Docker docs: Volumes, Back up, restore, or migrate data volumes: https://docs.docker.com/engine/storage/volumes/#back-up-restore-or-migrate-data-volumes (checked 2026-09-24)

## wallabag

wallabag's Docker README publishes no backup procedure. Articles, tags and users are in the MariaDB database, dumped below; the ./images folder holds the pictures saved with articles.

What this compose mounts:
- ./wallabag/images (/var/www/wallabag/web/assets/images in wallabag)
  BACK UP: images downloaded with saved articles.
- ./wallabag/data (/var/lib/mysql in wallabag-db)
  COVERED BY THE COMMAND BELOW: MariaDB data files; copy them only with the database stopped.

1. Database dump for wallabag-db:

    docker compose exec -T wallabag-db sh -c 'mariadb-dump --single-transaction -u root -p"$MYSQL_ROOT_PASSWORD" wallabag' > "$BACKUP/wallabag.sql"

   wallabag's entrypoint creates the wallabag database with the root password, the only credential the db service has in its environment, so the dump runs as root inside the running container.

2. Copy (wallabag keeps running):
   mariadb-dump with --single-transaction takes a consistent snapshot while wallabag runs.

    tar czf "$BACKUP/wallabag-images.tar.gz" ./wallabag/images

Restore check:

    grep -c 'Dump completed' "$BACKUP/wallabag.sql"   # 1 means mariadb-dump finished
    tar tzf "$BACKUP/wallabag-images.tar.gz" > /dev/null && echo OK

Put a copy back (with wallabag stopped):

    tar xzf "$BACKUP/wallabag-images.tar.gz"   # recreates ./wallabag/images; move the old folder aside first

On a new server start only the database, load the dump, then start the rest:

    docker compose up -d wallabag-db
    docker compose exec -T wallabag-db sh -c 'mariadb -u root -p"$MYSQL_ROOT_PASSWORD" -e "CREATE DATABASE IF NOT EXISTS wallabag"'
    docker compose exec -T wallabag-db sh -c 'mariadb -u root -p"$MYSQL_ROOT_PASSWORD" wallabag' < "$BACKUP/wallabag.sql"
    docker compose up -d

Sources:
- wallabag Docker image README (docker-compose example, environment variables, default login, migrations, nginx): https://github.com/wallabag/docker (checked 2026-09-30)
- MariaDB docs: mariadb-dump: https://mariadb.com/docs/server/clients-and-utilities/backup-restore-and-import-clients/mariadb-dump (checked 2026-09-30)

Sources

Every page below was fetched on the date shown.

Add wallabag to the builder All sixty apps