Skip to main content

Lychee Hosting on Hostim.dev

Lychee is an open-source photo management app. You upload photos, sort them into albums and share albums with a link or a password. Lychee makes thumbnails and smaller versions of every photo, and reads the EXIF data: camera, lens, date and GPS position.

Lychee is a PHP (Laravel) app. It keeps its data in a database (MySQL, PostgreSQL or SQLite) and the photo files in a folder.

Self-host Lychee with Docker Compose (minimal)​

services:
lychee:
image: ghcr.io/lycheeorg/lychee:v7.13.1
restart: unless-stopped
ports:
- "127.0.0.1:8000:8000"
volumes:
- ./lychee/uploads:/app/public/uploads
- ./lychee/storage/app:/app/storage/app
environment:
APP_URL: http://localhost:8000
APP_KEY: base64:REPLACE_ME # openssl rand -base64 32
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: "3306"
DB_DATABASE: lychee
DB_USERNAME: lychee
DB_PASSWORD: change-me
depends_on:
- db

db:
image: mariadb:11
restart: unless-stopped
volumes:
- ./lychee/db:/var/lib/mysql
environment:
MARIADB_DATABASE: lychee
MARIADB_USER: lychee
MARIADB_PASSWORD: change-me
MARIADB_RANDOM_ROOT_PASSWORD: "1"

Generate the key with openssl rand -base64 32 and put it after base64:. Lychee refuses to start without a valid key. On the first start the container creates the database tables. Then create your admin user with docker compose exec lychee php artisan lychee:create_user admin YOUR_PASSWORD. The first user you create becomes the admin. For HTTPS you need a reverse proxy with a certificate in front of port 8000. More stacks are in our Docker Compose library.


Deploy Lychee on Hostim.dev (One-Click)

The hosted route: no VPS, no proxy, no certificates. The template runs the official image with a MySQL database, two persistent volumes, a domain and HTTPS. It creates the admin account for you.

Try it Yourself

Guest project runs for 1 hour. Log in to save and extend to 5 days.

Why Host Lychee on Hostim.dev?​

  • One-click deployment of the official Lychee image
  • Managed MySQL database, photos on a persistent volume
  • Admin account with a random password, ready when the app starts
  • Automatic HTTPS and domain

What's included​

ResourceDetails
Appghcr.io/lycheeorg/lychee:v7.13.1 Docker image
DatabaseMySQL
Volumes/app/public/uploads (photos), /app/storage/app (app files)
DomainFree *.hostim.dev subdomain
SSLLet’s Encrypt (auto-enabled)
Port8000

The template sets these environment variables:

VariableValue
ADMIN_USERadmin, the name of the first account
ADMIN_PASSWORDRandom, generated at deploy
APP_KEY_SEEDRandom, generated at deploy. The app key is made from it at start
APP_URLYour app URL with https://
APP_FORCE_HTTPStrue: links use https://
TRUSTED_PROXIES*: Lychee trusts the HTTPS proxy in front of it
TIMEZONEUTC
QUEUE_CONNECTIONsync: photos are processed during the upload
SESSION_DRIVERcookie: you stay logged in when the app restarts
DB_*Connection to the MySQL database

How to Deploy​

  1. Go to your Hostim.dev dashboard.
  2. Click Create Project → Use a Template.
  3. Select Lychee.
  4. Choose a resource plan.
  5. Deploy.
  6. Open the app's environment variables and copy ADMIN_PASSWORD.
  7. Open the app URL and log in as admin with that password.
  8. Change the password in your profile settings.

FAQ​

Where does Lychee store its data?

Albums, users, settings and photo metadata are in the MySQL database. The photo files and all their smaller versions are in /app/public/uploads. /app/storage/app holds other app files. Both are persistent volumes. We uploaded photos, then restarted the app three times. The photos, the albums and the login session were all still there.

How big can my photos be?

We uploaded a 48-megapixel JPEG of 35 MB. Lychee made all its smaller versions during the upload, in about 9 seconds, on the smallest plan. In this setup a request can run for up to 30 seconds, on every plan. Very large files or videos may need more time. A larger plan processes them faster. The full fix is a separate worker, as described in the Lychee Docker docs.

I changed ADMIN_PASSWORD and the login did not change. Why?

The admin account is created only once, on the first start. After that, ADMIN_USER and ADMIN_PASSWORD are not read again. Change the password in your Lychee profile settings instead.

Can I change APP_KEY_SEED?

Do not change it. Lychee encrypts sessions and passkeys (WebAuthn) with the key made from it. A new seed logs everyone out, and every passkey has to be registered again. Photos, albums and settings are not encrypted, so they stay as they are.

How do I use my own domain?

Add the domain to the app in the Hostim.dev dashboard and point a DNS record at it. HTTPS is set up for it automatically. Then change APP_URL to the new address, with https://, and redeploy. Lychee uses it to build the links to your photos.

How do I back up Lychee?

Back up the MySQL database and the /app/public/uploads volume. You need both: the database knows the albums and the volume holds the files.

How do I update Lychee?

Read the release notes, back up the database and the photos, change the image tag to a newer v7 release and redeploy. Lychee updates the database tables on start.


Alternatives​

  • PhotoPrism — photo library with AI tagging and face recognition
  • PictShare — simple image hosting and sharing
  • Immich — self-hosted backup for photos and videos from your phone

Source + Docs​


Looking for something else? Browse all templates →


Try it now​

Deploy Lychee Now – in less than 60 seconds