# Self-host Lychee

> A self-hosted photo management and gallery app with albums, sharing and public links. MIT licensed. Runs on SQLite in one container. On first open, the setup page asks you to create the admin login.

- Page: https://levelrail.com/templates/lychee/
- JSON: https://levelrail.com/templates/lychee.json
- Category: Applications
- Licence: MIT (Permissive license)
- Source: https://github.com/LycheeOrg/Lychee
- Upstream docs: https://lycheeorg.dev/docs/

## Requirements
- Memory: about 384 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: v7.12.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| lychee | ghcr.io/lycheeorg/lychee | v7.12.0 | 8000 | data -> /data; uploads -> /app/public/uploads; storage -> /app/storage/app |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| lychee | APP_DEBUG | preset |
| lychee | APP_ENV | preset |
| lychee | APP_KEY | generated |
| lychee | APP_URL | preset |
| lychee | DB_CONNECTION | preset |
| lychee | DB_DATABASE | preset |
| lychee | PHP_TZ | preset |
| lychee | TIMEZONE | preset |
| lychee | TRUSTED_PROXIES | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install lychee --name my-lychee
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain lychee=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/lychee/install \
  -d '{
    "name": "my-lychee"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Lychee on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Lychee, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/lycheeorg/lychee:v7.12.0 is what you deploy there.

Self-host Lychee, Lychee docker compose file, deploy Lychee on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
