Self-host PiGallery2 with Levelrail
A directory-first photo gallery that shows your folders as they are on disk, with search, maps and thumbnails. Photos are read from a volume, so you copy them in or mount a folder.
- Authorbpatrik
- LicenceMIT
- Memory512 MiB
- Services1
How to self-host PiGallery2
-
Pull the images
One image is pulled on your server.
Show images
bpatrik/pigallery2:3.5.2-alpine
-
Create the app
One service starts in a single Compose app, with 4 named volume mounts for your data, on port 80.
-
Fill in the secrets
1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Open the address, create the admin account, then add photos to the images volume and rescan from the settings.
PiGallery2 requirements
- Memory
- About 512 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 80
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then PiGallery2. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the PiGallery2 docs page.
Deploy PiGallery2 your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy PiGallery2 from the CLI
levelrail-cli templates deploy pigallery2 --name my-pigallery2 Deploy PiGallery2 with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/pigallery2/deploy PiGallery2 configuration
PiGallery2 services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| pigallery2 | bpatrik/pigallery2:3.5.2-alpine | 80 | config -> /app/data/configdb -> /app/data/dbimages -> /app/data/imagestmp -> /app/data/tmp |
PiGallery2 environment variables
| Variable | Service | Value |
|---|---|---|
| NODE_ENV | pigallery2 | Preset by the template |
Ports and volumes
- Ports
- 80
- Volumes
- 4 named mounts: config -> /app/data/config, db -> /app/data/db, images -> /app/data/images, tmp -> /app/data/tmp
PiGallery2 FAQ
How much memory does PiGallery2 need?
The catalog lists about 512 MiB of memory for PiGallery2.
Does PiGallery2 run on arm64?
For PiGallery2, arm64 support is not confirmed; amd64 is unknown.
What licence is PiGallery2 under?
PiGallery2 is licensed under MIT, which is permissive, with few conditions on reuse.
Does PiGallery2 need configuration before it starts?
No. The template fills in its own defaults.
Which ports does PiGallery2 use?
PiGallery2 listens on port 80 inside the stack.
Where does PiGallery2 keep its data?
In named volumes: config mounted at /app/data/config, db mounted at /app/data/db, images mounted at /app/data/images and tmp mounted at /app/data/tmp.
Can I deploy PiGallery2 on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for PiGallery2, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image bpatrik/pigallery2:3.5.2-alpine is what you deploy there.