Main features
- Shows your folders as they are and never modifies the photo directory
- Map from photo locations, with OpenStreetMap or Mapbox and GPX tracks
- Search language with boolean logic, ranges, distance and relative dates
- Saved searches as logical albums
- Folder share links with optional password
- Video playback for MP4, WebM and Ogg
- Face regions shown from XMP metadata
- Per-user allow and block filters
- Photo frame and random-photo links
- Markdown files in folders shown as blog posts
What PiGallery2 does
PiGallery2 is a photo gallery website with a narrow, clear goal: show a directory of photos quickly, even on a Raspberry Pi. You point it at a folder and it presents the folder tree as it is. It is read-only, so it never changes, moves or deletes anything in your photo directory, which makes it safe to run on top of an archive that other tools or backups depend on.
On top of that simple model it adds more than its size suggests. Photos with location data appear on a map, using OpenStreetMap or Mapbox by default or another tile provider, and GPX files in a folder are drawn as tracks with icons for the type of activity. A Markdown file placed in a folder is shown alongside the photos as a short blog post, which suits travel albums.
Search and albums
Search uses a small query language with boolean logic, negation, exact and wildcard matches and autocomplete. You can filter by person, keyword, caption, directory, file name, rating, resolution, orientation, distance from a place (“5 km from New York”) and relative dates such as the same week in every past year. Any search can be saved as a logical album, so albums exist without copying files.
Faces are not detected by machine learning: PiGallery2 reads face regions that other software (for example a photo editor) wrote into XMP metadata and shows them over the images. Folders can be shared with a link and an optional password, per-user filters can hide parts of the gallery, and a photo frame link loops through a folder or search result on a spare screen.
Self-hosting PiGallery2
Docker Compose is the official and recommended install. Images exist for amd64 and arm64 (arm32v7 is deprecated), and the example Compose file puts nginx in front for HTTPS. A native Node.js install is possible but not officially supported. Configuration and the database live in separate volumes; the app can use SQLite or MySQL. Thumbnails are generated with sharp and videos handled with FFmpeg. The docs warn that some upgrades of the edge builds may require resetting the database or config, which happens less often on stable tags.
Hosted version
There is no hosted service. A live demo runs on a free hosting tier and may take up to a minute to start.
Limitations
PiGallery2 is a viewer. It cannot upload, edit or back up photos from a phone, and it does not detect faces or objects itself. If you need a full library with backup, it is not a substitute for Google Photos or iCloud Photos.
Who it suits
PiGallery2 suits anyone who wants to share a well-organized folder archive with family on modest hardware, without letting the gallery touch the files. Run it next to a backup tool, or choose Photoview if you want face detection and RAW conversion, or Immich for a full Google Photos-style library.
Technical details
Self-hosting needs
- SQLite or MySQL
Built with
- TypeScript
- Node.js
- Angular
GitHub topics
- angular2
- gallery
- heroku
- node-js
- photo-gallery
- photo-gallery-website
- photos
- pigallery2
- raspberry-pi
- self-hosted
Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.