Why Self-Host Your Photo Gallery?
Commercial cloud photo storage services — Google Photos, iCloud, Amazon Photos — charge $2–$10 per month for storage tiers and retain full access to your image metadata. Self-hosting a photo gallery gives you:
- Complete data ownership — your photos never leave your server or NAS
- Zero subscription fees — run unlimited galleries with only hardware costs
- Full-resolution originals — no compression or quality loss from cloud providers
- Privacy control — no automated photo scanning, no facial recognition on third-party servers, no targeted ads
- Hardware acceleration — use your server’s GPU for fast video transcoding and thumbnail generation
While full-featured platforms like Immich and PhotoPrism offer comprehensive photo management with automated tagging and machine learning features, they require significant resources. For users who want a focused, lightweight gallery that indexes existing photo libraries and serves them quickly, Photoview is an excellent choice. With 6,400+ GitHub stars and active development as of April 2026, it is one of the most popular self-hosted photo gallery options available.
What Is Photoview?
Photoview is an open-source, self-hosted photo gallery built for personal servers and homelabs. Unlike cloud-sync platforms that manage your entire photo lifecycle, Photoview indexes photos from directories you specify on your server and generates a browsable web gallery with thumbnails, EXIF data, and video playback.
Key Features
- Fast thumbnail generation — uses libvips for rapid image processing, significantly faster than ImageMagick-based alternatives
- Video transcoding — converts videos to browser-friendly formats with hardware acceleration support (Intel QSV, Nvidia NVENC, AMD VA-API)
- EXIF metadata — extracts and displays camera model, aperture, ISO, focal length, GPS coordinates, and shooting date
- Map integration — displays photos on an interactive map using EXIF GPS data (requires free Mapbox token)
- User accounts — multi-user support with per-user media libraries and sharing capabilities
- Multiple database backends — SQLite for simple setups, MySQL/MariaDB or PostgreSQL for production
- Read-only media access — the original photo files are never modified, only indexed and cached
Photoview vs Other Photo Galleries
| Feature | Photoview | Piwigo | Lychee | Immich |
|---|---|---|---|---|
| Focus | Gallery/indexer | Traditional gallery | Minimal gallery | Full photo management |
| Storage model | Read-only index | Upload/import | Upload/import | Cloud-sync with mobile app |
| Thumbnail engine | libvips (fast) | ImageMagick | Imagick | Custom + ML |
| Video support | Yes (transcoding) | Limited | No | Yes |
| Multi-user | Yes | Yes | No (single) | Yes |
| Mobile app | No (PWA) | Yes (3rd party) | No | Yes (official) |
| Smart features | None | Plugins | None | Facial recognition, search |
| Resource usage | Low (~200MB RAM) | Low (~150MB RAM) | Low (~100MB RAM) | High (~2GB+ RAM) |
| Map view | Yes (Mapbox) | Plugin | No | Yes |
| Database | SQLite/MySQL/PostgreSQL | MySQL | PostgreSQL/SQLite | PostgreSQL |
| GitHub Stars | 6,400+ | 3,200+ | 10,000+ | 50,000+ |
Photoview occupies a unique niche: it is lighter than Immich and PhotoPrism (no machine learning dependencies, no mobile sync) but more modern and faster than Piwigo’s traditional gallery approach. If you have a large collection of photos already stored on a NAS or file server and want a web gallery to browse them, Photoview is purpose-built for that workflow.
For a broader comparison of self-hosted photo management platforms, see our Immich vs LibrePhotos vs PhotoPrism guide. If you are looking for a simpler gallery focused on curated albums rather than full library indexing, our Piwigo vs Lychee vs Chevereto comparison covers those options in detail.
Installation and Deployment
Prerequisites
- Docker and Docker Compose installed on your server
- At least 512 MB RAM (more for large libraries)
- Storage space for media cache (thumbnails and video transcodes)
- Your photo collection on a local drive or mounted network share
Docker Compose Setup
Photoview provides an official production-ready Docker Compose configuration. The following setup uses MariaDB as the database backend and includes automatic updates via Watchtower:
| |
Create a .env file alongside the compose file with your configuration:
| |
Deploy with:
| |
After the first run, access Photoview at http://your-server:8000 and complete the initial setup wizard. You will need to specify the media path inside the container — by default this is /photos, which maps to your HOST_PHOTOVIEW_MEDIA_ROOT directory.
SQLite Simplified Setup
For smaller collections or testing, you can use SQLite instead of MariaDB. This removes the database service entirely:
| |
This single-service setup uses about 150 MB of RAM and is ideal for libraries under 50,000 photos.
Reverse Proxy Configuration
For production use behind a reverse proxy, configure your web server to forward traffic to Photoview. Here is an Nginx example:
| |
If you need a full-featured reverse proxy with a web-based management UI, consider Nginx Proxy Manager or SWAG for easier SSL certificate management.
Hardware Acceleration for Video Transcoding
Photoview can leverage GPU hardware acceleration to speed up video transcoding. This is especially useful for servers with large video libraries. Three acceleration methods are supported:
Intel QuickSync (QSV)
| |
Nvidia NVENC
| |
AMD VA-API
| |
Performance Tuning
Thumbnail Cache Location
Photoview stores generated thumbnails in the media-cache directory. For large libraries (100,000+ photos), place this on an SSD for fast access:
| |
Database Optimization
For MySQL/MariaDB, the default innodb-buffer-pool-size in Photoview’s compose file is set to 512 MB. Increase this to 1-2 GB for libraries over 200,000 photos:
| |
Initial Scan Time
The first scan of a large photo library can take hours. Photoview processes photos sequentially for thumbnail generation and EXIF extraction. You can monitor progress in the web UI. Subsequent scans only process new files and are much faster.
For automated container updates that handle Photoview upgrades alongside your other services, see our Watchtower vs Diun vs DockCheck guide.
FAQ
Is Photoview free to use?
Yes, Photoview is fully open-source under the GNU General Public License v3.0. There are no paid tiers, premium features, or subscription requirements. You can run it on any hardware you own.
Does Photoview sync photos from my phone?
No, Photoview does not have a mobile app or automatic photo sync. It indexes photos from directories already stored on your server. For automatic mobile sync, consider platforms like Immich or Nextcloud Photos, which upload new photos from your device to the server.
What database should I use?
For libraries under 50,000 photos, SQLite is sufficient and requires no additional services. For larger collections, MariaDB or PostgreSQL provides better concurrency and performance. Photoview’s official Docker Compose includes MariaDB by default.
Can Photoview handle RAW image files?
Yes, Photoview supports RAW formats from major camera manufacturers including Canon (.CR2, .CR3), Nikon (.NEF), Sony (.ARW), Fujifilm (.RAF), and Adobe DNG. Thumbnails are generated from the embedded JPEG preview in the RAW file.
Does Photoview support video files?
Yes, Photoview can transcode video files (MP4, MKV, MOV, AVI) to browser-friendly formats using FFmpeg. Hardware acceleration via Intel QuickSync, Nvidia NVENC, or AMD VA-API significantly speeds up transcoding.
How does Photoview compare to Immich?
Immich is a full photo management platform with mobile sync, facial recognition, and automated search. Photoview is a focused gallery indexer — it reads existing photo directories and serves them via a web interface. Choose Immich if you want a Google Photos replacement; choose Photoview if you want a lightweight gallery for a server-based photo collection.
Can multiple users access Photoview?
Yes, Photoview supports multi-user accounts. Each user has their own media library, and administrators can share albums across users. User management is handled through the web interface.
Does Photoview modify my original photos?
No, Photoview accesses your media in read-only mode. All generated thumbnails, video transcodes, and EXIF data are stored separately in the media-cache directory. Your original files remain untouched.