RaiCentral

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.

bash
cp .env.example .env
docker compose up --build
ServiceAddressNotes
Consolehttp://localhost:3000Next.js production build
APIhttp://localhost:8001Interactive reference at /docs
PostgreSQLlocalhost:5434User rai_user, database rai_gateway
Redislocalhost:6380No 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:

docker-compose.events.yml
services:
  rai-events-worker:
    extends:
      file: docker-compose.yml
      service: rai-onboarding-worker
    command: ["rai-worker", "runtime-events", "--interval", "5"]
    healthcheck:
      disable: true
bash
docker compose -f docker-compose.yml -f docker-compose.events.yml up -d --build

For 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.

bash
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 dev

make dev runs the same stack in containers with reload.

Stop

bash
docker compose down