Your Photos Deserve Better Than a Folder Full of Thumbnails
You've got years of photos sitting on a drive somewhere, organized in folders that make sense to you and nobody else. You'd like to browse them from your phone or laptop, but every gallery app wants to import, reindex, and reorganize everything into its own database first. PiGallery2 takes the opposite approach: point it at your folder, and it shows you what's already there.
What It Does
PiGallery2 is a self-hosted photo gallery built specifically for low-resource servers like the Raspberry Pi. It's directory-first, meaning it displays your existing folder structure exactly as it is rather than importing everything into some proprietary library. And it's read-only, so your photo folder never gets modified—no renames, no reorganized files, no surprises.
Under the hood it's a web application you run in Docker (the supported path, with amd64 and arm64v8 images). It indexes your photos into its own database and serves a browsable interface over HTTP. The README mentions map, search, sharing, albums, and faces as features, with the full list living in the project's documentation. It's also a PWA, so you can install it on your phone right from the browser menu.
Why It's Cool
The read-only design is the thing that stands out. Most photo management tools treat your folder as raw material to be ingested and rearranged. PiGallery2 treats it as the source of truth and just adds a browsing layer on top. If you've ever migrated away from a photo app and spent a weekend untangling its folder structure, you'll appreciate how much this matters.
-
It respects your existing organization. If you've spent years sorting photos into folders by year, event, or person, PiGallery2 shows that structure rather than fighting it. No import step, no duplicate copies, no lock-in.
-
It's built for modest hardware. The README leads with "fast" and "optimized for low-end hardware," and the Raspberry Pi framing isn't marketing—it's the design target. You don't need a beefy NAS or a cloud subscription to run this.
-
The setup is genuinely simple. Four volume mounts and a port mapping, and you're running. The README's Docker command is short enough to paste and adapt in under a minute.
-
It's extensible where it counts. Community extensions can be installed from the settings page, and there's a community-made native Android (and Android TV) client if you want something more than the PWA.
One honest caveat the README makes clear: PiGallery2 doesn't rate limit requests itself. If you're exposing it beyond your local network, you need a reverse proxy in front of it—the docs include a docker-compose setup with nginx and HTTPS for exactly this.
How to Try It
Docker is the supported way to run it. You'll need to create four folders first (config, database, your photos, and temp), then:
docker run -d -p 80:80 \
-v <config folder>:/app/data/config \
-v <db folder>:/app/data/db \
-v <photos folder>:/app/data/images:ro \
-v <temp folder>:/app/data/tmp \
bpatrik/pigallery2:latest
Note the :ro on the photos mount—that's the read-only guarantee in action. Once it's running, open http://localhost, log in with admin / admin, and change that password immediately in settings.
If you'd rather kick the tires before committing, there's a live demo. Be patient with it—the demo server sleeps when idle, so the first load can take up to 60 seconds.
A native install is technically possible but explicitly not supported, so stick with Docker unless you have a good reason not to. The full setup details, including that nginx compose file, are in the Docker guide. The repository is at github.com/bpatrik/pigallery2.
Final Thoughts
PiGallery2 isn't trying to be your all-in-one photo ecosystem—it's a focused tool that does one thing well: browse your existing photos without touching them. If you've got a Raspberry Pi gathering dust and a drive full of photos you rarely look at, this is a low-risk way to make them accessible again. The project is maintained by a single developer (working in nap-time windows, per the README), so set your expectations accordingly—but the scope is deliberately contained, and the read-only design means there's little to lose by trying it.
Follow @githubprojects for more developer tools and open source projects.