Skip to content

Setup & Installation

This guide covers all deployment options in detail. For a quick start, see the Quick Start guide.

Deployment Options

MethodBest forDatabaseRedis
Docker ProductionSelf-hosting, trying it outIncludedIncluded
Docker DevelopmentContributing with DockerIncludedIncluded
Local DevelopmentContributing without DockerYou provideOptional
Cloud (Render/Heroku)Production hostingManagedManaged

Docker Production

Uses pre-built images from Docker Hub. No build step required.

Requirements

  • Docker 20+
  • Docker Compose v2

Setup

bash
git clone https://github.com/xprilion/OpenMLR.git
cd OpenMLR
cp .env.example .env
make up
# or: docker compose -f docker-compose.prod.yml up -d

Open http://localhost:3000. Create an account and configure API keys in Settings > Providers.

Commands

CommandDescription
make upStart production stack
make downStop production stack
make logsTail production logs
make restartRebuild and restart web + worker

Services

ServiceInternalExternalDescription
web:3000:3000FastAPI + React
worker--Celery background jobs
db:5432:5433PostgreSQL 16
redis:6379:6380Redis 7

External ports are mapped to non-standard ports to avoid conflicts with local services.


Docker Development

Development mode with live reload. Code changes are reflected immediately — both backend and frontend.

Setup

bash
git clone https://github.com/xprilion/OpenMLR.git
cd OpenMLR
cp .env.example .env
make dev-up
# or: docker compose up -d

Open http://localhost:5173 for the UI (Vite with hot module replacement).

http://localhost:3000 serves the backend API with interactive Swagger docs at /docs.

Commands

CommandDescription
make dev-upStart dev stack with live reload
make dev-downStop dev stack
make dev-logsTail dev logs
make dev-cleanStop and remove volumes
make dev-buildRebuild dev images

Services

ServicePortDescription
frontend:5173Vite dev server with HMR (proxies /api to backend)
web:3000FastAPI backend with Swagger docs at /docs
worker-Celery background jobs (auto-restarts on code changes)
docs:4000VitePress docs site (when running make docs-dev)
db:5433PostgreSQL 16
redis:6380Redis 7

How it works

The default docker-compose.yml is configured for development:

  • Frontend: Vite dev server with hot module replacement on port 5173. Edits to .tsx/.ts files reflect instantly in the browser. Proxies /api, /health, and /events to the backend.
  • Backend: Mounts backend/ into the container, runs uvicorn with --reload. In dev mode (DEV_MODE=true), Swagger UI is served at /docs and the stale static frontend is not served.
  • Worker: Uses watchmedo for auto-restart on code changes.

Local Development

Full native setup without Docker for the application (still uses Docker for Postgres/Redis).

Prerequisites

ToolVersionInstall
Python3.12+python.org
uvlatestcurl -LsSf https://astral.sh/uv/install.sh | sh
Node.js20+nodejs.org
pnpm9+npm i -g pnpm

Setup

bash
# Clone and install
git clone https://github.com/xprilion/OpenMLR.git
cd OpenMLR
make install

# Configure
cp .env.example .env

# Start infrastructure (Postgres + Redis in Docker)
make infra

# Create database tables
make db-fresh

# Run dev servers
make dev

Open http://localhost:5173 (frontend) or http://localhost:3000 (backend API).

Virtual environment location

Do not create a virtual environment at the project root. The backend manages its own venv at backend/.venv via uv. A root-level venv will cause import errors.

Dev server details

ServerPortDescription
Backend3000FastAPI API + Swagger docs at /docs (when DEV_MODE=true)
Frontend5173Vite with HMR (proxies /api to backend)

Open http://localhost:5173 for the UI. The Vite dev server proxies /api, /health, and /events requests to the backend.

With background jobs

To test Celery-based background processing locally:

bash
# Terminal 1: Infrastructure
make infra

# Terminal 2: Backend + Frontend
USE_BACKGROUND_JOBS=true USE_REDIS_PUBSUB=true make dev

# Terminal 3: Celery worker
make worker

Or use the combined command:

bash
make infra
make dev-full    # Runs backend + frontend + worker

Commands

CommandDescription
make installInstall all dependencies
make devRun backend + frontend
make dev-fullRun backend + frontend + worker
make workerRun Celery worker only
make infraStart Postgres + Redis in Docker
make db-freshDrop and recreate all tables
make db-upgradeRun Alembic migrations

Cloud Deployment

Render

Deploy to Render

Render deploys from the render.yaml blueprint which provisions:

  • Web service (FastAPI + React)
  • Background worker (Celery)
  • PostgreSQL database
  • Redis instance

After deployment, add your API keys in the Render dashboard under Environment Variables, or configure them in the OpenMLR Settings UI.

Heroku

Deploy to Heroku

Heroku deployment uses the app.json manifest. Add your API keys via Heroku's Config Vars or the OpenMLR Settings UI.


First Launch

  1. Open the app URL
  2. Create account — First user is automatically registered
  3. Configure providers — Go to Settings > Providers and add at least one LLM API key
  4. Start a conversation — You'll be in Plan mode by default
  5. Switch modes — Use Cmd+B (Plan) or Cmd+E (Execute) to toggle modes

Makefile Reference

Run make help for the full list. Key targets:

Development

TargetDescription
make installInstall all dependencies
make devRun backend + frontend dev servers
make dev-fullRun backend + frontend + Celery worker
make workerStart Celery worker only
make infraStart Postgres + Redis in Docker

Docker (Production)

TargetDescription
make upStart production stack
make downStop production stack
make logsTail production logs
make restartRebuild and restart web + worker

Docker (Development)

TargetDescription
make dev-upStart dev stack with live reload
make dev-downStop dev stack
make dev-logsTail dev logs
make dev-cleanStop and remove volumes

Database

TargetDescription
make db-freshDrop + recreate tables
make db-upgradeRun Alembic migrations
make db-migrate MSG="..."Generate new migration

Testing

TargetDescription
make testRun all tests
make test-backendBackend tests only
make test-frontendFrontend tests only
make lintRun all linters
make lint-fixAuto-fix linting issues

Docker Hub

TargetDescription
make docker-buildBuild production image
make docker-publishBuild, tag, and push to Docker Hub