Your own proxy and S3
Using your own proxy instead of Caddy
Section titled “Using your own proxy instead of Caddy”By default, Caddy sits in front of Lyra and gets its HTTPS certificates. If a load balancer or proxy already handles HTTPS for you, use it instead:
docs.acme.com ──▶ your proxy (HTTPS) ──▶ Lyra on 10.0.0.5:8080- In
deploy/.env, takehttpsout ofCOMPOSE_PROFILES, so Caddy doesn’t start. - Set
LYRA_PORTto the address and port your proxy reaches Lyra on, like10.0.0.5:8080. - Set
TRUSTED_PROXIESto your proxy’s address or range, like10.0.0.0/8. - Run
docker compose up -d.
Then set up the proxy:
| Domains | Send APP_URL’s domain, and SHARE_URL’s if you set one, to that port |
The Host header |
Pass it on as the browser sent it. Lyra only shows the app on APP_URL’s host, and reads it from Host, never from X-Forwarded-Host |
| The client’s address | Send it in X-Forwarded-For. Lyra reads that header only from the addresses in TRUSTED_PROXIES, and uses it for rate limits |
| WebSockets | Allow them on /collab, which live editing uses |
| Long-lived responses | Don’t buffer /api/live, which sends live updates as server-sent events and stays open. Lyra sends X-Accel-Buffering: no, which nginx follows |
Uploaded files in S3
Section titled “Uploaded files in S3”Uploaded files are kept in the files Docker volume. To keep them in an S3-compatible bucket instead, such as AWS S3, Cloudflare R2, Garage or MinIO, set these in deploy/.env:
| Setting | What to put |
|---|---|
S3_BUCKET |
The bucket’s name |
S3_REGION |
Its region. The default is us-east-1 |
S3_ENDPOINT |
For anything other than AWS, the service’s address |
S3_FORCE_PATH_STYLE |
true for anything other than AWS |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
The credentials. Leave them out when the machine has a role that can use the bucket |
Then run docker compose up -d.
You need a bucket when Lyra runs on more than one machine, since each machine has its own volumes. See More than one machine.
Desktop app downloads from the bucket
Section titled “Desktop app downloads from the bucket”Lyra serves desktop app downloads and updates at /desktop/ from the desktop volume. To serve them from the bucket instead, set DESKTOP_RELEASES_S3_PREFIX to a prefix in it, like desktop/. See Building the desktop app.