Skip to content

Your own proxy and S3

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
  1. In deploy/.env, take https out of COMPOSE_PROFILES, so Caddy doesn’t start.
  2. Set LYRA_PORT to the address and port your proxy reaches Lyra on, like 10.0.0.5:8080.
  3. Set TRUSTED_PROXIES to your proxy’s address or range, like 10.0.0.0/8.
  4. 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 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.

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.