Deploy Lychee
Self-hosted photo gallery: albums, sharing, EXIF and map, on Postgres
Just deployed
/data
Just deployed
/var/lib/postgresql/data
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, officialghcr.io/lycheeorg/lycheeimage) - PostgreSQL (Railway Postgres) for the database and job queue
Deployment Dependencies
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.
Template Content
