Deploy LibrePhotos
Self-hosted photo library with faces, places and search. Needs 2 GB RAM
Just deployed
/var/lib/postgresql/data
LibrePhotos
Just deployed
/librephotos
Deploy and Host LibrePhotos on Railway
LibrePhotos is an open-source, self-hosted photo and video library (MIT licence). It imports your pictures, builds thumbnails, reads EXIF data and places photos on a map. Its machine-learning features recognise faces, tag scenes, write captions and let you search your library by content, all on your own server.
About Hosting LibrePhotos
This template runs LibrePhotos 1.6.0 from the official reallibrephotos/librephotos-unified image, pinned by digest and built from a public GitHub repo, next to Railway PostgreSQL. One volume holds your photos, thumbnails, ML models and logs, so everything survives redeploys. The admin account is created on first start with a generated password, so nobody else can claim the instance. The image is sized for small plans: one web worker, one job worker and one thread per model. LibrePhotos still needs about 2 GB of RAM (the first face and tag scan peaks near 1.9 GB and downloads about 1 GB of models), so it does not run on Railway's Free plan.
Common Use Cases
- A private Google Photos alternative for a family or a small team
- Finding photos by person, place, date or what is in the picture
- Sharing albums with other users or by public link without a third-party cloud
Dependencies for LibrePhotos Hosting
- PostgreSQL (Railway's PostgreSQL service, included)
- A Railway volume for the photo library and LibrePhotos' internal media
Deployment Dependencies
- LibrePhotos source: https://github.com/LibrePhotos/librephotos (release 1.6.0)
- Docs: https://docs.librephotos.com
- Template repo: https://github.com/aalfath/librephotos-railway-template
Implementation Details
Services:
- LibrePhotos: the web app, API, background job queue and ML helpers in one container, on a public Railway domain. Health check
/api/healthz/ready. Volume at/librephotos(photos in/librephotos/data). - Postgres: Railway PostgreSQL 18 with its own volume, reached over the private network.
After deploy: open the public URL and sign in as admin with the ADMIN_PASSWORD value from the LibrePhotos service's Variables tab. Upload photos from the web app; they are stored in /librephotos/data and imported automatically. The admin password is reset to ADMIN_PASSWORD on every start, so to change it, edit that variable rather than the in-app setting. Optional features such as email, OpenID Connect sign-in or a map tile provider are set in the app or with the variables in the LibrePhotos docs.
Updates: when a new LibrePhotos release is pinned in the template repo, Railway shows "update available" on your LibrePhotos service, and you choose when to apply it. Database migrations run on start, and the health check passes only once they are done. Read the repo's CHANGELOG.md first and back up Postgres before big upgrades.
Why Deploy LibrePhotos 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 LibrePhotos 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.
Template Content
