cookbooks
Self-Hosted Stack
Walk through a production self-hosted deployment on a single VM with Docker Compose and Caddy — suitable for teams, enterprises, and air-gapped environments.
Requirements
- A Linux VM with Docker and Docker Compose installed
- A domain pointed at your server's IP (for Caddy HTTPS)
- Ports 80 and 443 open
Deploy
Bash
# Download
curl -O https://raw.githubusercontent.com/NinetrixAI/Ninetrix/main/infra/compose/docker-compose.self-host.yml
curl -O https://raw.githubusercontent.com/NinetrixAI/Ninetrix/main/infra/compose/.env.example
# Configure
cp .env.example .env
nano .env # set domain, secrets, API keys
# Start
docker compose -f docker-compose.self-host.yml up -d
# Check health
curl https://your-domain.com/health
.env configuration
.env
NINETRIX_DOMAIN=agents.yourcompany.com
# Generate with: openssl rand -hex 32
AGENTFILE_API_SECRET=abc123...
AGENTFILE_ENCRYPTION_KEY=xyz789...
POSTGRES_PASSWORD=strong-password-here
# LLM keys
ANTHROPIC_API_KEY=sk-ant-...
Point your CLI at it
.env (in your project)
AGENTFILE_API_URL=https://agents.yourcompany.com
AGENTFILE_RUNNER_TOKEN=<your AGENTFILE_API_SECRET>
Bash
# Build and run — telemetry goes to your self-hosted instance
ninetrix build
ninetrix run
Dashboard
Your dashboard is at
https://agents.yourcompany.com/dashboard — all runs, traces, and approvals are visible there.