Docs / Self-hosting
Deploy locally
Services, ports and development defaults for a trial on one machine.
The Community Edition runs on one machine as an API, an onboarding worker, the console, PostgreSQL and Redis.
cp .env.example .env
docker compose up --build| Service | Address | Notes |
|---|---|---|
| Console | http://localhost:3000 | Next.js production build |
| API | http://localhost:8001 | Interactive reference at /docs |
| PostgreSQL | localhost:5434 | User rai_user, database rai_gateway |
| Redis | localhost:6380 | No authentication |
All ports listen on 127.0.0.1 only. At startup the API applies database migrations and seeds the platform policy library. No sample systems or customer data are loaded.
The development administrator and database password in .env.example are for a private workstation only.
Start the events worker
Webhooks, alert channels and the scheduled expiry of approvals run in the runtime events worker. The base Compose file does not start it. Add this file next to docker-compose.yml:
services:
rai-events-worker:
extends:
file: docker-compose.yml
service: rai-onboarding-worker
command: ["rai-worker", "runtime-events", "--interval", "5"]
healthcheck:
disable: truedocker compose -f docker-compose.yml -f docker-compose.events.yml up -d --buildFor a single pass, run docker compose exec rai-gateway rai-worker runtime-events --once.
Develop with hot reload
This needs Python 3.12, uv, Node.js 22 and pnpm 9.
docker compose up postgres redis -d
uv sync
uv run alembic upgrade head
uv run uvicorn rai_gateway.main:app --reload --app-dir src --port 8001
# second terminal
pnpm --dir control-plane-ui install
pnpm --dir control-plane-ui devmake dev runs the same stack in containers with reload.
Stop
docker compose down