Voice engine status

The self-hosted release currently uses LiveKit as the voice engine. We are building a custom voice engine internally and will transition self-host to it once feature-complete. LiveKit is battle-tested and production-ready - your deployment will work well today and the migration path will be seamless.

Self Host

Run Lag on your own stack

Single container, zero external dependencies. PostgreSQL, voice server, API, and web UI all bundled in one image. Pick your container runtime, run one command, and you have a fully functional voice server at localhost:3000.

Single Container

Everything runs in one container - web UI, API, PostgreSQL, and voice server. No orchestration needed. Works with Docker, Podman, or nerdctl.

Full Control

Your data stays on your hardware. Own authentication, storage, and infrastructure policies. No external calls, no telemetry, no platform lock-in.

Data Persistence

User sessions, rooms, and messages persist in a named volume across restarts. Built-in backup and restore commands for database portability.

Get Started

One command to launch

Clone the repo and run the script for your container runtime. Access the web interface at http://localhost:3000 and enter a nickname to begin.

Podman
./scripts/podman.sh up
Docker
./scripts/docker.sh up
nerdctl
./scripts/nerdctl.sh up

Or build from source: git clone https://github.com/lag-app/self-host.git && cd self-host && ./scripts/docker.sh build

1

Container

0

External Dependencies

3

Container Runtimes

MIT

License

Network Ports

Open these ports on your firewall for remote access. All voice media uses UDP for the lowest possible latency.

3000 TCP Web interface
7880 TCP Voice signaling (HTTP)
7881 TCP Voice signaling (TCP)
50000-50200 UDP Voice media streams

Configuration

Override defaults with environment variables. Most values auto-configure for local development - only set what you need to change.

SESSION_SECRET Auto-generated

Session token signing key

EXTERNAL_IP Auto-detected

Public IP for voice connectivity

LAG_VOICE_KEY devkey

Voice server API key

LAG_VOICE_SECRET secret

Voice server API secret

LAG_IMAGE ghcr.io/lag-app/self-host:latest

Container image reference

LAG_NAME lag

Container identifier

Commands

All management through a single script. Replace <runtime> with podman, docker, or nerdctl.

up Pull and start the container
down Stop container, preserves data
restart Stop then restart
build Compile from source and launch
logs Stream container output
status Display container state and port mappings
shell Access bash terminal inside container
backup [file] Export PostgreSQL database
restore <file> Import database from backup
nuke Remove container and data permanently

Voice not connecting?

Set EXTERNAL_IP to your server's public address. Verify UDP port forwarding for 50000-50200 and check container logs.

Container won't start?

Confirm ports 3000 and 7880 are not already in use. Run the status command to check container state.

Need a clean slate?

Run nuke followed by up for a full factory reset. This removes all data permanently.

Open source, MIT licensed

Lag self-host is fully open source. Read the code, fork it, contribute back. Issues, pull requests, and feature discussions all happen on GitHub.

Contribute