Installation
OpenPR supports three installation methods. Docker Compose is the fastest way to get a fully working instance.
Recommended
Docker Compose brings up all services (API, frontend, worker, MCP server, PostgreSQL) with a single command. No Rust toolchain or Node.js required.
Prerequisites
| Requirement | Minimum | Notes |
|---|---|---|
| Docker | 20.10+ | Or Podman 3.0+ with podman-compose |
| Docker Compose | 2.0+ | Included with Docker Desktop |
| Rust (source build) | 1.75.0 | Not needed for Docker install |
| Node.js (source build) | 20+ | For building the SvelteKit frontend |
| PostgreSQL (source build) | 15+ | Docker method includes PostgreSQL |
| Disk Space | 500 MB | Images + database |
| RAM | 1 GB | 2 GB+ recommended for production |
Method 1: Docker Compose (Recommended)
Clone the repository and start all services:
git clone https://github.com/openprx/openpr.git
cd openpr
cp .env.example .env
docker-compose up -dThis starts five services:
| Service | Container | Port | Description |
|---|---|---|---|
| PostgreSQL | openpr-postgres | 5432 | Database with auto-migration |
| API | openpr-api | 8081 (maps to 8080) | REST API server |
| Worker | openpr-worker | -- | Background task processor |
| MCP Server | openpr-mcp-server | 8090 | MCP tool server |
| Frontend | openpr-frontend | 3000 | SvelteKit web UI |
Verify all services are running:
docker-compose psFirst User
The first user to register automatically becomes the admin. Make sure to register your admin account before sharing the URL with others.
Environment Variables
Edit .env to customize your deployment:
# Database
DATABASE_URL=postgres://openpr:openpr@localhost:5432/openpr
POSTGRES_DB=openpr
POSTGRES_USER=openpr
POSTGRES_PASSWORD=openpr
# JWT (change in production!)
JWT_SECRET=change-me-in-production
JWT_ACCESS_TTL_SECONDS=2592000
JWT_REFRESH_TTL_SECONDS=604800
# Frontend
VITE_API_URL=http://localhost:8080
# MCP Server
MCP_SERVER_PORT=8090Security
Always change JWT_SECRET and database passwords before deploying to production. Use strong, random values.
Method 2: Podman
OpenPR works with Podman as a Docker alternative. The key difference is that Podman requires --network=host for builds due to DNS resolution:
git clone https://github.com/openprx/openpr.git
cd openpr
cp .env.example .env
# Build images with network access
sudo podman build --network=host --build-arg APP_BIN=api -f Dockerfile.prebuilt -t openpr_api .
sudo podman build --network=host --build-arg APP_BIN=worker -f Dockerfile.prebuilt -t openpr_worker .
sudo podman build --network=host --build-arg APP_BIN=mcp-server -f Dockerfile.prebuilt -t openpr_mcp-server .
sudo podman build --network=host -f frontend/Dockerfile -t openpr_frontend frontend/
# Start services
sudo podman-compose up -dPodman DNS
The frontend Nginx container uses 10.89.0.1 as the DNS resolver (Podman's default network DNS), not 127.0.0.11 (Docker's default). This is already configured in the included Nginx config.
Method 3: Build from Source
Backend
# Prerequisites: Rust 1.75+, PostgreSQL 15+
git clone https://github.com/openprx/openpr.git
cd openpr
# Configure
cp .env.example .env
# Edit .env with your PostgreSQL connection string
# Build all binaries
cargo build --release -p api -p worker -p mcp-serverThe binaries are located at:
target/release/api-- REST API servertarget/release/worker-- Background workertarget/release/mcp-server-- MCP tool server
Frontend
cd frontend
npm install # or: bun install
npm run build # or: bun run buildThe build output is in frontend/build/. Serve it with Nginx or any static file server.
Database Setup
Create the database and run migrations:
# Create database
createdb -U postgres openpr
# Migrations run automatically on first API start
# Or apply manually:
psql -U openpr -d openpr -f migrations/0001_initial.sql
# ... apply remaining migrations in orderStart Services
# Terminal 1: API server
./target/release/api
# Terminal 2: Worker
./target/release/worker
# Terminal 3: MCP server
./target/release/mcp-server --transport http --bind-addr 0.0.0.0:8090Verify Installation
Once all services are running, verify each endpoint:
# API health check
curl http://localhost:8080/health
# MCP server health
curl http://localhost:8090/health
# Frontend
curl -s http://localhost:3000 | head -5Open http://localhost:3000 in your browser to access the web UI.
Uninstalling
Docker Compose
cd openpr
docker-compose down -v # -v removes volumes (database data)
docker rmi $(docker images 'openpr*' -q)Source Build
# Stop running services (Ctrl+C in each terminal)
# Remove binaries
rm -f target/release/api target/release/worker target/release/mcp-server
# Drop database (optional)
dropdb -U postgres openprNext Steps
- Quick Start -- Create your first workspace and project in 5 minutes
- Docker Deployment -- Production Docker configuration
- Production Deployment -- Caddy, PostgreSQL, and security hardening