Deployment
Kodit is packaged as a Docker container so you can run it on any popular orchestration platform. This page describes how to deploy Kodit as a service.
Deploying With Docker Compose
Create a docker-compose file that specifies Kodit and Vectorchord containers. Replace the latest tag with a version. Replace any API keys with your own or configure internal endpoints.
Then run Kodit with docker compose -f docker-compose.yaml up -d
. For more instructions see the Docker Compose documentation.
Here is an example:
version: "3.9"
services:
kodit:
image: registry.helix.ml/helix/kodit:latest # Replace with a version
ports:
- "8080:8080" # You may wish to pick a less common port
# Start the Kodit MCP server and bind to all interfaces
command: ["serve", "--host", "0.0.0.0", "--port", "8080"]
restart: unless-stopped
depends_on:
- vectorchord # Wait for VectorChord to start before Kodit
# Configure Kodit
environment:
# Configure data storage
DATA_DIR: /data
DB_URL: postgresql+asyncpg://postgres:mysecretpassword@vectorchord:5432/kodit
DEFAULT_SEARCH_PROVIDER: vectorchord
# External embedding provider
EMBEDDING_ENDPOINT_TYPE: openai
EMBEDDING_ENDPOINT_BASE_URL: https://api.openai.com/v1
EMBEDDING_ENDPOINT_API_KEY: ${OPENAI_API_KEY:-}
EMBEDDING_ENDPOINT_MODEL: text-embedding-3-small
# External enrichment provider
ENRICHMENT_ENDPOINT_TYPE: openai
ENRICHMENT_ENDPOINT_BASE_URL: https://api.openai.com/v1
ENRICHMENT_ENDPOINT_API_KEY: ${OPENAI_API_KEY:-}
ENRICHMENT_ENDPOINT_MODEL: o3-mini
# Auto-indexing configuration
AUTO_INDEXING_SOURCES_0_URI: https://github.com/helixml/kodit
AUTO_INDEXING_SOURCES_1_URI: https://github.com/helixml/helix
# Sync configuration
SYNC_PERIODIC_ENABLED: true
SYNC_PERIODIC_INTERVAL_SECONDS: 1800 # 30 minutes
SYNC_PERIODIC_RETRY_ATTEMPTS: 3
# Logging configuration
LOG_LEVEL: INFO # Set to DEBUG for more detailed logging
LOG_FORMAT: json
# API Key Configuration
API_KEYS: ${KODIT_API_KEYS:-}
volumes:
- ${KODIT_DATA:-kodit-data}:/data
vectorchord:
image: tensorchord/vchord-suite:pg17-20250601
environment:
- POSTGRES_DB=kodit
- POSTGRES_PASSWORD=mysecretpassword
volumes:
- ${VECTORCHORD_DATA:-kodit-vectorchord}:/var/lib/postgresql/data
ports:
- "5432"
restart: unless-stopped
volumes:
kodit-data:
kodit-vectorchord:
Deploying With Kubernetes
To deploy with Kubernetes we recommend using a templating solution like Helm or Kustomize.
Here is a simple raw Kubernetes manifest to help get you started. Remember to pin the Kodit container at a specific version and update the required API keys.
Deploy with kubectl -n kodit apply -f kubernetes.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: vectorchord
labels:
app: vectorchord
spec:
replicas: 1
selector:
matchLabels:
app: vectorchord
template:
metadata:
labels:
app: vectorchord
spec:
containers:
- name: vectorchord
image: tensorchord/vchord-suite:pg17-20250601
env:
- name: POSTGRES_DB
value: "kodit"
- name: POSTGRES_PASSWORD
value: "mysecretpassword"
ports:
- containerPort: 5432
---
apiVersion: v1
kind: Service
metadata:
name: vectorchord
spec:
selector:
app: vectorchord
ports:
- port: 5432
targetPort: 5432
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kodit
labels:
app: kodit
spec:
replicas: 1
selector:
matchLabels:
app: kodit
template:
metadata:
labels:
app: kodit
spec:
containers:
- name: kodit
image: registry.helix.ml/helix/kodit:latest # Replace with a version
args: ["serve", "--host", "0.0.0.0", "--port", "8080"]
env:
- name: DB_URL
value: "postgresql+asyncpg://postgres:mysecretpassword@vectorchord:5432/kodit"
- name: DEFAULT_SEARCH_PROVIDER
value: "vectorchord"
- name: EMBEDDING_ENDPOINT_TYPE
value: "openai"
- name: EMBEDDING_ENDPOINT_BASE_URL
value: "https://api.openai.com/v1"
- name: EMBEDDING_ENDPOINT_API_KEY
value: "REPLACE_WITH_YOUR_API_KEY"
- name: EMBEDDING_ENDPOINT_MODEL
value: "text-embedding-3-large"
- name: ENRICHMENT_ENDPOINT_TYPE
value: "openai"
- name: ENRICHMENT_ENDPOINT_BASE_URL
value: "https://api.openai.com/v1"
- name: ENRICHMENT_ENDPOINT_API_KEY
value: "REPLACE_WITH_YOUR_API_KEY"
- name: ENRICHMENT_ENDPOINT_MODEL
value: "o3-mini"
- name: AUTO_INDEXING_SOURCES_0_URI
value: "https://github.com/pydantic/pydantic"
- name: AUTO_INDEXING_SOURCES_1_URI
value: "https://github.com/helix-ml/kodit"
- name: SYNC_PERIODIC_ENABLED
value: "true"
- name: SYNC_PERIODIC_INTERVAL_SECONDS
value: "1800" # 30 minutes
- name: SYNC_PERIODIC_RETRY_ATTEMPTS
value: "3"
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: kodit
spec:
type: LoadBalancer
selector:
app: kodit
ports:
- port: 8080
targetPort: 8080
Deploying With a Kind Kubernetes Cluster
Kind is a k8s cluster that runs in a Docker container. So it’s great for k8s development.
kind create cluster
kubectl -n kodit apply -f kubernetes.yaml
Remote CLI Access
Once you have Kodit deployed as a server, you can connect to it remotely using the REST API or the Kodit CLI (which uses the REST API).
Configuration
Remote mode is activated when you configure a server URL. You can do this via environment variables or CLI flags:
Environment Variables:
export REMOTE_SERVER_URL=https://your-kodit-server.com
export REMOTE_API_KEY=your-api-key-here # Optional: Only if you have API key's enabled
export REMOTE_TIMEOUT=60.0 # Optional: request timeout in seconds
export REMOTE_MAX_RETRIES=5 # Optional: max retry attempts
export REMOTE_VERIFY_SSL=true # Optional: verify SSL certificates
Security
- Always use HTTPS in production environments
- Store API keys securely and never commit them to version control
- Use environment variables or secure credential stores for API keys
- The CLI verifies SSL certificates by default (can be disabled with
REMOTE_VERIFY_SSL=false
)