Documentation / self-hosting

Run one small API and PostgreSQL.

PACT Team 0.1 needs no Redis, vector database, WebSocket broker, or access to your source repository. The API is stateless; PostgreSQL is the durable coordination record.

Docker Compose

Create a private environment file from the deployment example and replace both placeholders.

cd deploy/team-server
cp .env.example .env

# Generate independent values
openssl rand -hex 32
openssl rand -base64 36

docker compose up --build -d
docker compose ps
curl http://127.0.0.1:4772/healthz

The expected health response is {"status":"ok","protocol":"pact-team/0.1"}.

Production boundary

Public

TLS reverse proxy

Expose HTTPS and route Team API requests to loopback port 4772.

Private

PostgreSQL

Keep port 5432 inside the Compose network and back up its persistent volume.

Operate the service

docker compose logs -f pact-team
docker compose exec postgres psql -U pact -d pact
docker compose restart pact-team

# Preserves the PostgreSQL volume
docker compose down

Removing the named volume deletes Team data and is intentionally not part of the normal shutdown path. Treat volume removal as a separate destructive operation.

Update safely

# Back up PostgreSQL first
docker compose build --pull pact-team
docker compose up -d
docker compose ps
curl http://127.0.0.1:4772/healthz

The first API start applies the current idempotent migration. Verify health before allowing clients to reconnect.

Stored server data

The service stores projects, members, invitation hashes, sessions, leases, ordered events, operations, handoffs, and evidence references. It rejects known private fields such as prompts, conversations, chain-of-thought, API keys, and tokens—even when nested.