---
title: "Deploy Lychee"
description: "Self-hosted photo gallery: albums, sharing, EXIF and map, on Postgres"
category: "Storage"
url: https://railway.com/deploy/lychee-1
---

# Deploy Lychee

Self-hosted photo gallery: albums, sharing, EXIF and map, on Postgres

**[Deploy Lychee on Railway](https://railway.com/template/lychee-1)**

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

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

## Template content

### Lychee https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/lychee.png

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

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

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

## Documentation

# Deploy and Host Lychee on Railway

Lychee is a free, open-source, self-hosted photo management and sharing gallery (MIT licence). You upload photos from the browser, organise them into albums, tag and search them, and share public or password-protected albums. It reads EXIF data, shows photos on a map and makes thumbnails in several sizes.

## About Hosting Lychee

This template runs Lychee v7.13.1 from the official LycheeOrg image, pinned by version and digest and built from our public GitHub repo. It deploys two services: **Lychee** (the web app on FrankenPHP/Laravel Octane, with Lychee's queue worker running in the same container to make thumbnails and process uploads) and **Postgres** (albums, photo metadata, users, settings and the job queue). Photos, pending uploads, login sessions and logs live on a volume at `/data`, so they survive redeploys and restarts. The encryption key and database password are generated for each deploy, and the database runs only on Railway's private network. There is nothing to fill in.

## Common Use Cases

* A private photo library for you or your family, reachable from any browser
* Sharing albums with friends or clients through public or password-protected links
* A portfolio or event gallery on your own domain

## Dependencies for Lychee Hosting

* Lychee web app and queue worker (built from `aalfath/lychee-railway-template`, official `ghcr.io/lycheeorg/lychee` image)
* PostgreSQL (Railway Postgres) for the database and job queue

### Deployment Dependencies

* [Lychee on GitHub](https://github.com/LycheeOrg/Lychee) and its [release v7.13.1](https://github.com/LycheeOrg/Lychee/releases/tag/v7.13.1)
* [Lychee documentation](https://lycheeorg.dev/docs/)
* [Template repo](https://github.com/aalfath/lychee-railway-template)

### Implementation Details

**After deploy:** open the public URL. Lychee asks you to create the first admin account (there is no default password). Then upload photos from the web UI. Upload size per file is limited to 128 MB by the image.

**Services:** `Lychee` serves the gallery on the public domain (health check `/up`) and runs the queue worker; set `LYCHEE_WORKER=false` to turn the worker off. `Postgres` holds all metadata on its own volume.

**Optional settings** (add them as variables on the Lychee service): SMTP (`MAIL_*`), S3 photo storage (`AWS_*`), LDAP or OAuth login, `TIMEZONE`. If you attach a custom domain, set `APP_URL` to `https://YOUR-DOMAIN`.

**Updates:** the Lychee service builds from our GitHub repo, so Railway shows you an "update available" notice when we bump the Lychee version. Read the repo's `CHANGELOG.md` before applying it. Database migrations run automatically on start.

## Why Deploy Lychee 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 Lychee 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

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/lychee-1
