dankhostself-host anything

Tandoor Recipes with Docker Compose

The recipe manager that allows you to manage your ever growing collection of digital recipes. In the project's words: Tandoor Recipes docs, front page checked 2026-09-26

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

Add Tandoor Recipes 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 Tandoor Recipes needs

Only figures Tandoor Recipes'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
RAMNot published by the project
CPUNot published by the project
DiskNot published by the project

On top of this, Caddy (the reverse proxy in the file) is a single small container. Tandoor Recipes itself runs as 2 containers: tandoor-db_recipes, tandoor-web_recipes.

Which hardware Tandoor Recipes 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.

ServiceImagePlatforms in the manifestDigestRegistryChecked
db_recipespostgres:16-alpineamd64, arm/v6, arm/v7, arm64, 386, ppc64le, riscv64, s390xsha256:721873c34ceb9f8d8fc265984940dc982404c105f19ad51be9fdc5970a6080earegistry-1.docker.io2026-09-26
web_recipesvabene1111/recipesamd64, arm64sha256:2e759dd1478a2ed119ee474e28522079fb1cfa50b3fd25cba89f6b9a67abad72registry-1.docker.io2026-09-26

A manifest says an image exists for a CPU, not how well Tandoor Recipes 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 Tandoor Recipes 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 Tandoor Recipes alone on example.org: the official definition with its published ports removed and Caddy added in front. The time zone is Etc/UTC here; the builder uses your browser's. Every ${VARIABLE} is defined in the .env below.

# docker-compose.yml built at dankhost.com for: Tandoor Recipes
# 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"

  # ---- Tandoor Recipes (tandoor.example.org) ----
  # Source: https://docs.tandoor.dev/install/docker/ (checked 2026-09-26)
  # Source: https://docs.tandoor.dev/system/configuration/ (checked 2026-09-26)
  # Changed: Removed the '80:80' port of the plain example; Caddy reaches web_recipes:80, the integrated nginx, on the proxy network.
  #          env_file: ./.env is replaced by explicit environment entries: the ones .env.template marks required (SECRET_KEY, ALLOWED_HOSTS set to your hostname, POSTGRES_PASSWORD, generated) and its database settings; the Postgres container gets the same database, user and password.
  #          TZ is your time zone instead of the template's Europe/Berlin.
  tandoor-db_recipes:
    restart: "always"
    image: "postgres:16-alpine"
    container_name: "tandoor-db_recipes"
    volumes:
      - "./tandoor/postgresql:/var/lib/postgresql/data"
    environment:
      POSTGRES_DB: "djangodb"
      POSTGRES_USER: "djangouser"
      POSTGRES_PASSWORD: "${TANDOOR_POSTGRES_PASSWORD}"
    networks:
      tandoor-backend:
        aliases:
          - "db_recipes"
  tandoor-web_recipes:
    restart: "always"
    image: "vabene1111/recipes"
    container_name: "tandoor-web_recipes"
    environment:
      SECRET_KEY: "${TANDOOR_SECRET_KEY}"
      TZ: "Etc/UTC"
      ALLOWED_HOSTS: "tandoor.example.org"
      DB_ENGINE: "django.db.backends.postgresql"
      POSTGRES_HOST: "db_recipes"
      POSTGRES_DB: "djangodb"
      POSTGRES_PORT: "5432"
      POSTGRES_USER: "djangouser"
      POSTGRES_PASSWORD: "${TANDOOR_POSTGRES_PASSWORD}"
    volumes:
      - "tandoor-staticfiles:/opt/recipes/staticfiles"
      - "./tandoor/mediafiles:/opt/recipes/mediafiles"
    depends_on:
      - "tandoor-db_recipes"
    networks:
      proxy: {}
      tandoor-backend:
        aliases:
          - "web_recipes"

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"
  tandoor-backend:
    internal: true

volumes:
  caddy-data:
  caddy-config:
  tandoor-staticfiles:

Caddyfile save as caddy/Caddyfile

Caddy gets and renews the HTTPS certificate for tandoor.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.

# Tandoor Recipes
tandoor.example.org {
	reverse_proxy tandoor-web_recipes:80
}

.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 Tandoor Recipes, from dankhost.com/app/tandoor/. Fill the blank secrets before starting.
# Keep this file private (chmod 600).

# Tandoor Recipes
# 50 random letters and digits: the builder fills this in your browser
TANDOOR_SECRET_KEY=
# 32 random letters and digits: the builder fills this in your browser
TANDOOR_POSTGRES_PASSWORD=

Changes from the official file

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

Notes for Tandoor Recipes behind the proxy

How to run it

  1. At your DNS provider, add an A record named tandoor 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 TANDOOR_SECRET_KEY, TANDOOR_POSTGRES_PASSWORD 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 (tandoor. plus your domain) in a browser and follow the notes above.

Back it up

Tandoor's backup page: the only data apart from the database are the media files (recipe images) in mediafiles, and the Postgres database is saved with pg_dumpall.

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: Tandoor Recipes

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)

## Tandoor Recipes

Tandoor's backup page: the only data apart from the database are the media files (recipe images) in mediafiles, and the Postgres database is saved with pg_dumpall.

What this compose mounts:
- ./tandoor/postgresql (/var/lib/postgresql/data in tandoor-db_recipes)
  COVERED BY THE COMMAND BELOW: Postgres data files; the page warns a copy of them restores only on the same PostgreSQL version.
- tandoor-staticfiles (named volume, /opt/recipes/staticfiles in tandoor-web_recipes)
  SKIP: CSS and JavaScript the image writes into it when it starts.
- ./tandoor/mediafiles (/opt/recipes/mediafiles in tandoor-web_recipes)
  BACK UP: recipe images and other uploads.

1. Stop tandoor-web_recipes. Stopping Tandoor (not Postgres) keeps new recipes and images from arriving between the dump and the copy.

    docker compose stop tandoor-web_recipes

2. Database dump for tandoor-db_recipes:

    docker compose exec -T tandoor-db_recipes pg_dumpall -U djangouser > "$BACKUP/pgdump.sql"

   The backup page gives sudo docker exec -t docker_db_recipes_1 pg_dumpall -U djangouser > pgdump.sql; here the container is tandoor-db_recipes, and -T (no terminal) keeps carriage returns out of the file.

3. Copy while tandoor-web_recipes is stopped:

    tar czf "$BACKUP/tandoor-mediafiles.tar.gz" ./tandoor/mediafiles

4. Start it again:

    docker compose start tandoor-web_recipes

Restore check:

    grep -c 'PostgreSQL database cluster dump complete' "$BACKUP/pgdump.sql"   # 1 means pg_dumpall finished
    tar tzf "$BACKUP/tandoor-mediafiles.tar.gz" > /dev/null && echo OK

Put a copy back (with tandoor-web_recipes stopped):

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

The backup page restores with cat pgdump.sql | docker exec -i <db container> psql postgres -U djangouser, connecting to the postgres database so the dump can recreate djangodb. With this file's names:

    docker compose up -d tandoor-db_recipes
    docker compose exec -T tandoor-db_recipes psql postgres -U djangouser < "$BACKUP/pgdump.sql"
    docker compose up -d

Sources:
- Tandoor docs: Backup (pg_dumpall, mediafiles): https://docs.tandoor.dev/system/backup/ (checked 2026-09-26)
- PostgreSQL docs: SQL Dump: https://www.postgresql.org/docs/current/backup-dump.html (checked 2026-09-26)
- 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-26)

Sources

Every page below was fetched on the date shown.

Add Tandoor Recipes to the builder All forty apps