Strongly Recommended: Docker provides critical security isolation, ensuring Claude Code operates only with container user permissions.
cp .env.example .env
# Edit .env with your keys
docker compose up -d
curl http://localhost:3100/healthBy default, this pulls the pre-built image from ghcr.io/pattern-zones-co/koine:latest.
Pin to a specific version for stability:
# In .env or inline
KOINE_VERSION=1.2.3 docker compose up -d
# Or set in .env file:
# KOINE_VERSION=1.2.3Available version formats:
1.2.3- Exact version1.2- Latest patch of minor version1- Latest minor/patch of major versionlatest- Most recent release (default)
Build from source instead of pulling the pre-built image:
docker compose up --buildThis builds locally from the Dockerfile. See CONTRIBUTING.md for development setup.
See docker-compose.yml and Dockerfile in the repo root. These can be adapted for your orchestration setup.
The gateway limits concurrent requests to prevent resource exhaustion. Configure via environment variables:
environment:
KOINE_MAX_STREAMING_CONCURRENT: 3 # default
KOINE_MAX_NONSTREAMING_CONCURRENT: 5 # defaultSee Environment Variables for all configuration options.
The included configuration uses:
- Multi-stage build (smaller image, no build tools in production)
- Non-root user (
bun, UID 1000) - Dropped capabilities and
no-new-privileges
These patterns are recommended for any orchestration that includes Koine.
Bind to localhost to prevent bypassing UFW firewalls:
ports:
- "127.0.0.1:3100:3100"