Skip to content

Self-Hosting Guide

This guide covers running DMOps.ai on your own infrastructure — either locally with Docker Compose or on AWS Fargate for production.

For the quick Docker Compose instructions, see Deployment & Self-Hosting in the Admin guide. This page covers advanced configuration.


Docker Compose — advanced configuration

Full .env reference

bash
# ── Required ───────────────────────────────────────────────────
HERMES_ACP_API_KEY=your_api_key           # REST API authentication key
HERMES_ACP_MASTER_KEY=your_master_key     # Encryption key for integration credentials

# ── Database ───────────────────────────────────────────────────
PG_ENABLED=0                              # Set to 1 to use PostgreSQL
DATABASE_URL=postgresql://user:pass@host:5432/dbname

# ── Dispatcher ─────────────────────────────────────────────────
ACP_MAX_CONCURRENT=4                      # Max concurrent agent tasks
ACP_DISPATCH_INTERVAL_S=10               # Seconds between dispatch polls

# ── LLM providers ──────────────────────────────────────────────
# Set at least one provider key
ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=sk-or-...
# For AWS Bedrock, use IAM role — no key needed

# ── Storage ────────────────────────────────────────────────────
S3_BUCKET=your-artefacts-bucket           # S3 bucket for artefact storage
AWS_REGION=eu-central-1

# ── Dev options ────────────────────────────────────────────────
ACP_DEV_RELOAD=0                          # Set to 1 for hot-reload in dev (NOT for production)

Running the database migrations

DMOps.ai runs schema migrations automatically on startup. No manual migration step is needed.

If you are running a self-managed PostgreSQL instance, ensure the application user has the following privileges:

sql
GRANT CONNECT ON DATABASE your_db TO acp_user;
GRANT ALL ON SCHEMA public TO acp_user;
GRANT ALL ON ALL TABLES IN SCHEMA public TO acp_user;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO acp_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO acp_user;

Hermes dependency

DMOps.ai depends on Hermes Agent. The Docker image bundles Hermes in a shared virtual environment. If you are running outside Docker, install Hermes first:

bash
pip install hermes-agent

DMOps.ai must run inside the Hermes virtual environment (or with Hermes on PYTHONPATH).


Health checks

EndpointExpected response
GET /api/ping{"status": "ok"}
GET /api/statsJSON with dispatcher_running: true, db_ok: true

Upgrading

For Docker Compose:

bash
git pull origin main
docker compose pull
docker compose up -d

For Fargate (managed by partners):

bash
./deployments/rollout-image.ps1 -ImageTag <new_tag>

See the Partner provisioning guide for full Fargate rollout instructions.


Logs

LevelWhat's logged
INFOTask lifecycle, dispatcher polls, agent spawns
WARNINGDispatch failures, integration errors, budget warnings
ERRORUnhandled exceptions, DB errors, startup failures

For CloudWatch (Fargate): logs are in /ecs/acp/<tenant_id>.

For Docker Compose: docker compose logs api -f