Self-hosting
Run Lyra on your own infrastructure with Docker Compose, Kubernetes, K3s or an offline bundle.
Lyra is open source under the Apache-2.0 license. Every deployment option lives in the deploy/ directory of the repository; this page summarises them. Follow the linked guides for the full procedure.
What Lyra needs
- MySQL and Redis. Docker Compose and K3s can run both for you.
- Object storage: a local filesystem volume or any S3-compatible service.
- OpenSandbox for agent sandboxes.
- LiveKit for calls, with its media ports open.
- HTTPS in front of the web app.
Docker Compose
The simplest option: one Linux host with Docker, the docker compose plugin and OpenSSL.
git clone https://github.com/AstraFoundry/Lyra.git && cd Lyra
cp .env.example .env # set production secrets and public URLs
bash deploy/docker/lyra/deploy.sh build
bash deploy/docker/lyra/deploy.sh preflight
bash deploy/docker/lyra/deploy.sh up
up never rebuilds images, so upgrades are explicit: build or load the images you want, then recreate the stack. Day-to-day commands:
bash deploy/docker/lyra/deploy.sh status
bash deploy/docker/lyra/deploy.sh logs lyra
bash deploy/docker/lyra/deploy.sh restart
When calls are enabled, open 7881/tcp, 50100-50200/udp and 3478 (TCP and UDP) for LiveKit and STUN.
Offline delivery
For networks with no registry access, build and pack on a connected host:
bash deploy/docker/lyra/deploy.sh build
bash deploy/docker/lyra/deploy.sh pack
Copy deploy/docker/lyra/generated/lyra-deploy.tar.gz to the target host, then:
tar -xzf lyra-deploy.tar.gz && cd lyra
cp .env.example .env
bash deploy/docker/lyra/deploy.sh load
bash deploy/docker/lyra/deploy.sh preflight
bash deploy/docker/lyra/deploy.sh up
Runtime images for MySQL, Redis and LiveKit are included unless you set INCLUDE_RUNTIME_IMAGES=false.
Kubernetes
Manifests in deploy/k8s/ install the Lyra API, agent runtime and web images into an existing namespace. MySQL, Redis, LiveKit, OpenSandbox and optional S3 storage are managed separately; the repository includes guides for installing OpenSandbox and LiveKit on the same cluster.
K3s
deploy/k3s/ turns a fresh Ubuntu or Debian host into a single-node production environment: K3s and Helm, MySQL and Redis, OpenSandbox, LiveKit, Lyra and TLS ingress, finished with an end-to-end sandbox smoke test.
Configuration
All settings are environment variables documented in .env.example. Before going to production, at minimum:
- replace
AUTH_SESSION_SECRETwith a strong secret; - point
DATABASE_URLandREDIS_URLat your services; - set
WEB_ORIGINto the public URL of the web app.
Model provider keys and object storage can be configured after deployment in Lyra's settings, where secrets are stored encrypted.