Configuration
Environment variables and configuration options for self-hosted ArchiCore.
Environment Variables
Required
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | postgresql://user:pass@host:5432/db |
JWT_SECRET | Secret for JWT tokens (min 32 chars) | your-very-secure-secret-key |
JINA_API_KEY | Jina AI API key for embeddings | jina_xxxx |
AI Providers
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Anthropic Claude API key |
OPENAI_API_KEY | OpenAI API key |
DEEPSEEK_API_KEY | DeepSeek API key |
LLM_PROVIDER | Which LLM to use: anthropic, openai, deepseek |
LLM_MODEL | Model name (e.g., claude-sonnet-4-20250514) |
Services
| Variable | Default | Description |
|---|---|---|
REDIS_URL | - | Redis connection URL |
QDRANT_URL | http://localhost:6333 | Qdrant vector DB URL |
PORT | 3000 | HTTP server port |
HOST | 0.0.0.0 | HTTP server host |
GitHub Integration
| Variable | Description |
|---|---|
GITHUB_CLIENT_ID | GitHub OAuth App client ID |
GITHUB_CLIENT_SECRET | GitHub OAuth App client secret |
GITHUB_WEBHOOK_SECRET | Secret for webhook verification |
Security
| Variable | Default | Description |
|---|---|---|
HELMET_ENABLED | false | Enable Helmet security headers |
CORS_RESTRICT | false | Restrict CORS to whitelist |
CORS_ORIGINS | * | Comma-separated allowed origins |
RATE_LIMIT_WINDOW | 60000 | Rate limit window (ms) |
RATE_LIMIT_MAX | 100 | Max requests per window |
Admin
| Variable | Description |
|---|---|
ADMIN_SECRET | Secret key for admin API access |
ADMIN_EMAIL | Default admin email |
ADMIN_PASSWORD | Default admin password |
Example .env File
# Database
DATABASE_URL=postgresql://archicore:secure_password@localhost:5432/archicore
# Security
JWT_SECRET=your-very-secure-secret-key-at-least-32-characters-long
ADMIN_SECRET=admin-api-secret-key
# AI Services
JINA_API_KEY=jina_xxxxxxxxxxxxxxxxxxxx
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxx
LLM_PROVIDER=anthropic
LLM_MODEL=claude-sonnet-4-20250514
# Optional Services
REDIS_URL=redis://localhost:6379
QDRANT_URL=http://localhost:6333
# GitHub (optional)
GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxx
GITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxx
GITHUB_WEBHOOK_SECRET=webhook-secret
# Server
PORT=3000
NODE_ENV=production
# Security (production)
HELMET_ENABLED=true
CORS_RESTRICT=true
CORS_ORIGINS=https://archicore.yourdomain.com
Configuration Files
Server Configuration
Create config/production.json:
{
"server": {
"port": 3000,
"host": "0.0.0.0",
"trustProxy": true
},
"limits": {
"maxFileSize": 104857600,
"maxProjectSize": 524288000,
"maxFilesPerProject": 10000
},
"indexing": {
"batchSize": 100,
"concurrency": 4,
"timeout": 300000
},
"cache": {
"ttl": 3600,
"maxSize": 1000
}
}
Tier Configuration
Customize tier limits:
{
"tiers": {
"free": {
"projects": 3,
"requestsPerDay": 100,
"maxFileSize": 1048576
},
"pro": {
"projects": 25,
"requestsPerDay": 10000,
"maxFileSize": 10485760
},
"enterprise": {
"projects": -1,
"requestsPerDay": -1,
"maxFileSize": 104857600
}
}
}
Logging
| Variable | Default | Description |
|---|---|---|
LOG_LEVEL | info | Log level: debug, info, warn, error |
LOG_FORMAT | json | Log format: json, pretty |
LOG_FILE | - | Path to log file |
Health Checks
ArchiCore exposes health endpoints:
# Basic health
curl http://localhost:3000/health
# Detailed health (with dependencies)
curl http://localhost:3000/health/detailed
Response:
{
"status": "ok",
"version": "0.1.0",
"uptime": 3600,
"dependencies": {
"database": "ok",
"redis": "ok",
"qdrant": "ok"
}
}