Linux

Where Does Lychee Store Photos and Database?

Lychee keeps .env in the install root with uploads and database beside it. Back up env, uploads, and DB file together.

Last updated

Lychee follows Laravel layout with a photo twist. The .env file sets database driver, mail, and app URL. Uploads land in a dedicated folder with originals and variants. SQLite installs keep the database file right beside uploads.

Docker setups mount uploads and env from the host, keeping image swaps safe. The admin account seeds on first web setup into the same database. Live photo ingestion writes beside existing albums without rescans. Keep .env private since it holds the DB password. Album structure mirrors folders under uploads for direct browsing.

Where Lychee stores this, by platform

Linux
/var/www/lychee/.env

Driver, URL, and mail for the gallery. Copy from the example file before first setup wizard run.

Linux
/var/www/lychee/uploads

Originals plus generated sizes. The big disk user. Mount from the host in Docker installs.

Linux
/var/www/lychee/database/database.sqlite

SQLite database file for default installs. MySQL users dump instead. Never copy live without stopping first.

Frequently asked questions

How do I back up Lychee?

Archive .env, the uploads folder, and the sqlite file together. MySQL installs swap the file for a dump. Restore all three as a set.

Where is the Lychee config?

Copy .env.example to .env and set DB connection plus app URL. Docker images read the same file from a mounted deploy folder.

Notice an outdated path? Let us know.