swadhinbiswas feat: implement air-gapped mode, UI fixes, and project management integrations · 7/9/2026
e3bd4a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# OpenCodeHub Configuration
# ============================================================
# Copy this file to .env and configure your settings.
# For production, run: bash scripts/prod-setup.sh
# ============================================================
# ── Server Configuration ─────────────────────────────────────
HOST=0.0.0.0
PORT=4321
SITE_URL=http://localhost:4321
APP_NAME=OpenCodeHub
# ── Database Configuration ───────────────────────────────────
# Supported drivers: postgres (required for production), sqlite (dev only), turso (libsql)
# IMPORTANT: All schemas use pgTable — PostgreSQL is REQUIRED for production
DATABASE_DRIVER=postgres
DATABASE_URL=postgresql://opencodehub:opencodehub@localhost:5432/opencodehub
# Connection pool size (default: 10, increase for high traffic)
DATABASE_POOL_SIZE=10
# PostgreSQL SSL (enable when connecting to remote/cloud databases)
DATABASE_SSL=false
DATABASE_SSL_REJECT_UNAUTHORIZED=true
# ── PostgreSQL Credentials (for Docker Compose) ─────────────
# CRITICAL: Change these for production! Generate with: openssl rand -base64 24
POSTGRES_USER=opencodehub
POSTGRES_PASSWORD=change-me-in-production
POSTGRES_DB=opencodehub
# ── Redis Configuration ─────────────────────────────────────
# Required in production for distributed locking, rate limiting, sessions
# CRITICAL: Change the password for production!
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=change-me-in-production
# Upstash Redis (for Vercel/edge deployments):
# UPSTASH_REDIS_REST_URL=https://your-redis.upstash.io
# UPSTASH_REDIS_REST_TOKEN=your-token
# ── Authentication ───────────────────────────────────────────
# CRITICAL: Generate with: openssl rand -base64 32
JWT_SECRET=change-this-to-a-very-long-random-secret-key-in-production
JWT_EXPIRES_IN=7d
# CRITICAL: Generate with: openssl rand -base64 32
SESSION_SECRET=change-this-session-secret-too
# ── Security Secrets (CRITICAL for production) ──────────────
# All must be unique. Generate each with: openssl rand -hex 32
# Protects git hooks from unauthorized access
INTERNAL_HOOK_SECRET=change-this-internal-hook-secret-in-production
# Protects cron endpoints (gc, mirror sync, etc.)
CRON_SECRET=change-this-cron-secret-in-production
# Encryption key for AI provider keys at rest
AI_CONFIG_ENCRYPTION_KEY=change-this-ai-config-encryption-key-in-production
# Encryption key for workflow/repo secrets at rest
WORKFLOW_SECRET_ENCRYPTION_KEY=change-this-workflow-secret-encryption-key-in-production
# Shared secret between server and CI runners
RUNNER_SECRET=change-this-runner-secret-in-production
# ── OAuth Providers (optional) ──────────────────────────────
OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=
OAUTH_GITHUB_CLIENT_ID=
OAUTH_GITHUB_CLIENT_SECRET=
OAUTH_GITLAB_CLIENT_ID=
OAUTH_GITLAB_CLIENT_SECRET=
# ── Git Configuration ───────────────────────────────────────
GIT_REPOS_PATH=./data/repositories
GIT_SSH_PORT=2222
GIT_SSH_HOST_KEY=./data/ssh/host_key
SSH_PORT=2222
# ── Storage Configuration ───────────────────────────────────
# Supported backends: local, s3
STORAGE_TYPE=local
STORAGE_PATH=./data/storage
# S3 Configuration (required when STORAGE_TYPE=s3)
# Works with AWS S3, MinIO, Cloudflare R2, Garage, SeaweedFS,
# Ceph RGW, Wasabi, Backblaze B2, etc.
STORAGE_BUCKET=
STORAGE_REGION=us-east-1
STORAGE_ENDPOINT=
STORAGE_ACCESS_KEY_ID=
STORAGE_SECRET_ACCESS_KEY=
# ── CI/CD Runner Configuration ──────────────────────────────
RUNNER_ENABLED=true
RUNNER_DOCKER_SOCKET=/var/run/docker.sock
RUNNER_WORKSPACE_PATH=./data/runner/workspaces
RUNNER_ARTIFACTS_PATH=./data/runner/artifacts
RUNNER_CONCURRENT_JOBS=2
RUNNER_TIMEOUT=3600
RUNNER_REGISTRATION_TOKEN_TTL_DAYS=90
# ── Email Configuration (optional) ──────────────────────────
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
[email protected]
# ── Logging ─────────────────────────────────────────────────
LOG_LEVEL=info
LOG_FILE=./data/logs/opencodehub.log
# ── Rate Limiting ───────────────────────────────────────────
RATE_LIMIT_ENABLED=true
RATE_LIMIT_AUTH=5 # Auth endpoints: 5 req/15min
RATE_LIMIT_API=100 # API endpoints: 100 req/min
RATE_LIMIT_GIT=200 # Git operations: 200 req/min
RATE_LIMIT_GENERAL=60 # General: 60 req/min
RATE_LIMIT_SKIP_DEV=false
CSRF_SKIP_DEV=false
# ── CORS ────────────────────────────────────────────────────
ALLOWED_ORIGINS=http://localhost:4321
# ── Request Limits ──────────────────────────────────────────
# Maximum request body size in MB (default: 10)
MAX_REQUEST_BODY_MB=10
# Maximum git pack file size in MB (default: 500)
MAX_PACK_SIZE_MB=500
# Timeout for git processes in seconds (default: 300)
GIT_PROCESS_TIMEOUT_SECS=300
# ── Feature Flags ───────────────────────────────────────────
ENABLE_REGISTRATION=true
ENABLE_WIKI=true
ENABLE_ISSUES=true
ENABLE_ACTIONS=true
ENABLE_PACKAGES=false
ENABLE_AI_ASSISTANT=true
# ── AI Providers (optional) ─────────────────────────────────
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GROQ_API_KEY=
BYTEZ_API_KEY=
OPENROUTER_API_KEY=
TOGETHER_API_KEY=
GOOGLE_AI_API_KEY=
# ── External Review Agent (optional) ────────────────────────
EXTERNAL_AGENT_WEBHOOK_URL=
EXTERNAL_AGENT_API_KEY=
EXTERNAL_AGENT_CALLBACK_SECRET=
# ── Backup Configuration ────────────────────────────────────
# Generate with: openssl rand -hex 32
BACKUP_ENCRYPTION_KEY=
BACKUP_S3_BUCKET=
BACKUP_S3_PREFIX=opencodehub-backups
BACKUP_RETENTION_DAYS=30
BACKUP_DIR=./backups
# ── Air-gapped / Offline Mode ──────────────────────────────
AIR_GAPPED_MODE=false
# ── Observability (optional) ────────────────────────────────
# Grafana Cloud OTLP
GRAFANA_OTLP_ENDPOINT=
GRAFANA_INSTANCE_ID=
GRAFANA_API_KEY=