#+title: gallery Self-hosted photo gallery. Albums are folders; resized copies are generated on request with ImageMagick and cached on disk. * Requirements Go 1.27, ImageMagick 7 (=magick=), exiftool. * Photos #+begin_example photos/ about.org optional; rendered as the Info page tokyo/ album.org optional DSCF0412.jpg ... #+end_example =album.org= keywords, all optional: | Keyword | Meaning | Default | |------------+-------------------------------------------+--------------------| | =#+title= | album title | folder name | | =#+date= | =YYYY=, =YYYY-MM= or =YYYY-MM-DD= | newest photo | | =#+cover= | file name of the cover photo | first photo | | =#+order= | integer; ordered albums come first | unset | | =#+sort= | =taken= or =name= | =taken= | Text below the keywords is shown as the album description. * Run #+begin_src sh go build -o gallery ./cmd/gallery ./gallery -photos ./photos -cache ./cache -addr :8080 #+end_src | Flag | Env | Default | |--------------+---------------------+-----------| | =-photos= | =GALLERY_PHOTOS= | required | | =-cache= | =GALLERY_CACHE= | required | | =-addr= | =GALLERY_ADDR= | =:8080= | | =-theme= | =GALLERY_THEME= | embedded | | =-templates= | =GALLERY_TEMPLATES= | embedded | | =-title= | =GALLERY_TITLE= | =gallery= | =-theme= replaces [[file:internal/web/assets/theme.css]]. =-templates= points at a directory with the same file names as [[file:internal/web/templates]]. See [[file:docs/specs/2026-09-25-gallery-design.org][the design spec]]. * Deploy #+begin_src sh git clone https://gitbay.org/cmc/gallery.git ~/docker/gallery cd ~/docker/gallery GALLERY_PHOTOS_DIR=/path/to/photos docker compose up -d --build #+end_src The container listens on =127.0.0.1:8003=; put a reverse proxy in front of it. Photos are mounted read-only; derivatives and =meta.json= live in =./cache=. The container runs as UID/GID 1000, so =./cache= must be writable by that user and the photos readable by it.