---
title: "Deploy PhotoView"
description: "Self-hosted photo gallery: albums, faces, sharing, WebDAV photo uploads"
category: "Other"
url: https://railway.com/deploy/photoview
---

# Deploy PhotoView

Self-hosted photo gallery: albums, faces, sharing, WebDAV photo uploads

**[Deploy PhotoView on Railway](https://railway.com/template/photoview)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/photoview/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### PhotoView https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/photoview.png

- **Source:** https://github.com/aalfath/photoview-railway-template
- **Health check:** /
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host PhotoView on Railway

PhotoView is an open-source, self-hosted photo gallery. It reads the photos and videos in a folder, keeps the folder structure as albums, makes thumbnails, shows EXIF data, plays videos and can group faces. You can share albums or single photos by link and give other users their own libraries.

## About Hosting PhotoView

PhotoView needs a database, a folder of photos and a cache folder for thumbnails and transcoded videos, and both folders must persist. This template runs PhotoView 2.4.0 from the official image with Railway Postgres and one volume at `/data` (photos in `/data/photos`, cache in `/data/cache`). The start script finishes PhotoView's setup itself before the public port opens, so the setup page is never exposed: you sign in as `admin` with the generated `ADMIN_PASSWORD` from the service's Variables tab. PhotoView has no upload button, so the template also serves the photo folder over WebDAV at `/webdav`, protected by the same login. New photos are picked up by an automatic scan every 15 minutes.

## Common Use Cases

* A private photo library you can browse from any browser or phone
* Sharing albums with family and friends through public or password-protected links
* Browsing a large archive of photos, RAW files and videos by folder, date or face

## Dependencies for PhotoView Hosting

* Railway Postgres (deployed with the template)
* A volume for photos and the thumbnail cache (deployed with the template)

### Deployment Dependencies

* PhotoView on GitHub: https://github.com/photoview/photoview
* PhotoView 2.4.0 release: https://github.com/photoview/photoview/releases/tag/v2.4.0
* PhotoView documentation: https://photoview.github.io/en/docs/
* Template source and changelog: https://github.com/aalfath/photoview-railway-template

### Implementation Details

**Sign in:** open the service's public URL and sign in as `admin` (or your `ADMIN_USERNAME`) with the `ADMIN_PASSWORD` value from the Variables tab. These set up PhotoView once; change the password later in PhotoView's Settings. WebDAV always uses the current variable values.

**Add photos over WebDAV** at `https://YOUR-DOMAIN/webdav/`:

* macOS Finder: Go, Connect to Server, then enter the address
* Windows: Map network drive, then enter the address
* rclone: `rclone copy ./Pictures :webdav,url=https://YOUR-DOMAIN/webdav,user=admin,pass=OBSCURED-PASSWORD: -P` (make `OBSCURED-PASSWORD` with `rclone obscure`)

Then wait for the next scan, or press Scan under Settings.

**Optional variables:** `MAPBOX_TOKEN` turns on the map view (a free token from mapbox.com). `PHOTOVIEW_DISABLE_FACE_RECOGNITION=1`, `PHOTOVIEW_DISABLE_VIDEO_ENCODING=1` and `PHOTOVIEW_DISABLE_RAW_PROCESSING=1` save CPU. `PERIODIC_SCAN_SECONDS` sets the first automatic scan interval (default 900).

**Size the volume** for your library: the thumbnail cache adds roughly 10 to 20 percent on top of the photos.

## Why Deploy PhotoView on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying PhotoView on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/photoview
