Skip to content

Self-hosting

You can run Lyra on a server of your own. It’s the same app as Lyra at app.lyra-docs.com, without billing: a self-hosted server has no plans and no limits on members or files. Your pages, files and accounts stay on your server, and nothing is sent to the Lyra team.

Lyra runs on one machine with Docker. deploy/start.sh asks a few questions, writes the settings and starts everything below. Caddy gets an HTTPS certificate for your domain by itself.

┌──▶ Postgres
docs.acme.com ──▶ Caddy ──▶ Lyra ─────────┼──▶ Redis
(HTTPS) └──▶ uploaded files (a Docker volume, or S3)
Part What it does
Caddy Answers on ports 80 and 443, gets the HTTPS certificates and passes requests to Lyra
Lyra One container that serves the web app, the API, live editing and the MCP endpoint for AI agents, and runs background jobs
Postgres 17 Keeps every page, database, comment and account
Redis 7 Passes live events between parts of Lyra and counts rate limits. It holds nothing that can’t be lost
Uploaded files A Docker volume called files, or an S3-compatible bucket

Published pages are served on the same address as the app, unless you give them a domain of their own with SHARE_URL. People who aren’t signed in see them read-only.

A server Linux with Docker and Compose 2.23.1 or newer, git, and 2 GB of memory. Lyra uses about 450 MB once it’s running; building it takes about 1.2 GB
A domain Where people open Lyra, like docs.acme.com, pointing at the server. You can add a second one just for published pages, like share.acme.com
A way to sign in A mail server (SMTP) for emailed sign-in links and passwords, Google, or single sign-on. Sign-in lists every option
  1. Point the domain at the server’s public address, and open ports 80 and 443.
  2. On the server, get Lyra and run its setup script:
  1. Answer the questions:

    Question Example
    Domain docs.acme.com
    Domain for published pages Leave it empty to serve them on docs.acme.com too
    Mail server smtps://lyra%40acme.com:password@smtp.acme.com:465
    Send emails from Lyra <lyra@acme.com>

    The mail server is a URL, so characters like @, : and / in the user name or password are written as %40, %3A and %2F. Leave it empty if your team signs in with Google or single sign-on, and set that up first (see Sign-in).

  2. Open https://docs.acme.com, sign in with your work email and create your organization. You become its admin. To let your team join it when they sign in, add your email domain under Settings → Email domains.

The script saves your answers and new random secrets in deploy/.env, builds Lyra and starts it. The first build takes a few minutes. When you run the script again, it keeps those settings and skips the questions.

Press Enter at the domain question and Lyra runs at http://localhost:8080, with a mail catcher at http://localhost:8025 that shows every sign-in email. Sign in with any email address and create an organization.

Lyra only shows the app at the address in APP_URL, so on a server, open it through an SSH tunnel instead of the server’s address:

Terminal window
ssh -L 8080:localhost:8080 -L 8025:localhost:8025 you@your-server

To set it up again for a real domain, delete the trial and its data, then answer the questions again:

Terminal window
cd deploy
docker compose down -v
rm .env
./start.sh

Agents connect to your server the same way they connect to Lyra cloud, with your address instead:

Terminal window
claude mcp add --transport http lyra https://docs.acme.com/mcp

The agent opens Lyra in your browser and asks for permission. See Connect an AI agent for other agents, and AI agents (MCP) for what they can do. Scripts can use a personal API token instead, as the API docs describe.

Page What it covers
Day to day Updating, logs, and the commands for people and organizations
Backups Backing up and restoring the database, files and settings
Sign-in Who may sign up, how people join, and every sign-in method
Settings Every setting in deploy/.env
Your own proxy and S3 Using a proxy you already have instead of Caddy, and keeping files in S3
Monitoring Logs, health checks, Sentry and Datadog
Running on Fly Running Lyra on Fly.io with Neon and Tigris
More than one machine Splitting Lyra into parts that run on their own
Troubleshooting What to do when something goes wrong
Building the desktop app A desktop app that opens your server on first launch