Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
152 lines (133 loc) · 6.49 KB
/
Copy path.env.example
File metadata and controls
152 lines (133 loc) · 6.49 KB
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
# =============================================================================
# Commonly — environment variables reference
#
# `./dev.sh up` copies this root template to `.env` for local development when
# that file is missing.
# It is not the single-machine self-hosting configuration; use `./install.sh`
# for that path, which creates a minimal ignored `.env` with a strong JWT key.
#
# Then start the stack:
# ./dev.sh up
#
# REQUIRED = must be set for the service to start
# OPTIONAL = has a safe default or only needed for specific features
# =============================================================================
# -----------------------------------------------------------------------------
# Database — MongoDB (REQUIRED)
# -----------------------------------------------------------------------------
# Local dev (host tools / scripts outside Docker):
MONGO_URI=mongodb://commonly:commonly_dev@localhost:27017/commonly?authSource=admin
#
# Docker Compose backend uses an internal default automatically. Override only if needed:
# DOCKER_MONGO_URI=mongodb://commonly:commonly_dev@mongo:27017/commonly?authSource=admin
# Self-hosted production example:
# MONGO_URI=mongodb://user:pass@your-mongo-host:27017/commonly?authSource=admin
# -----------------------------------------------------------------------------
# Database — PostgreSQL (OPTIONAL, falls back to MongoDB if not set)
# -----------------------------------------------------------------------------
# Used for chat message storage. Falls back to MongoDB if PG_HOST is unset.
PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=commonly
PG_USER=commonly
PG_PASSWORD=password
PG_SSL_ENABLED=false
# Docker Compose backend uses `postgres` internally by default. Override only if needed:
# DOCKER_PG_HOST=postgres
# PG_SSL_CA_PATH=/app/certs/ca.pem # required when PG_SSL_ENABLED=true
# -----------------------------------------------------------------------------
# Auth (REQUIRED)
# -----------------------------------------------------------------------------
# Generate a strong secret: openssl rand -hex 32
JWT_SECRET=change-me-in-production-use-openssl-rand-hex-32
# Docker dev stack convenience login (OPTIONAL)
# When LOCAL_DEV_LOGIN_ENABLED=true, the backend ensures this user exists on startup.
LOCAL_DEV_LOGIN_ENABLED=true
LOCAL_DEV_LOGIN_EMAIL=dev@commonly.local
LOCAL_DEV_LOGIN_PASSWORD=password123
LOCAL_DEV_LOGIN_USERNAME=localdev
# -----------------------------------------------------------------------------
# Server (OPTIONAL)
# -----------------------------------------------------------------------------
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
# Agent push webhooks and App webhooks are delivered only to public addresses.
# If your webhook receivers run on this machine or a private network (a
# docker-compose dev stack, a self-hosted LAN), allow loopback and private
# ranges. Link-local and the cloud metadata host stay refused either way.
# OUTBOUND_WEBHOOK_ALLOW_PRIVATE_ADDRESSES=true
BACKEND_URL=http://localhost:5000
# -----------------------------------------------------------------------------
# LLM providers (OPTIONAL — only needed to run AI agents)
# -----------------------------------------------------------------------------
# Anthropic Claude (agents using Claude API)
ANTHROPIC_API_KEY=
# OpenAI / Codex
OPENAI_API_KEY=
OPENAI_BASE_URL=
# OpenRouter (multi-model fallback)
OPENROUTER_API_KEY=
OPENROUTER_BASE_URL=
# Google Gemini (direct, not via OpenRouter)
GEMINI_API_KEY=
# LiteLLM proxy
# LITELLM_API_KEY = virtual key for the shared dev LiteLLM or another proxy
# LITELLM_MASTER_KEY = operator-only admin key for self-hosting/admin tasks
LITELLM_API_KEY=
LITELLM_BASE_URL=
LITELLM_MASTER_KEY=
# -----------------------------------------------------------------------------
# Agent runtime (OPTIONAL — only needed if running the OpenClaw/Clawdbot gateway)
# -----------------------------------------------------------------------------
# Phase 2 target gate for local clawdbot parity. Keep off unless you are
# actively working on the local OpenClaw runtime path.
COMMONLY_LOCAL_CLAWDBOT=0
CLAWDBOT_GATEWAY_TOKEN= # token for the gateway's Commonly account
# Brave Search (used by agents that do web searches)
# Get a free API key at https://api.search.brave.com/
BRAVE_API_KEY=
TAVILY_API_KEY=
FIRECRAWL_API_KEY=
DEEPGRAM_API_KEY=
# GitHub PAT (used by dev agents to clone/fetch/push/create PRs)
# Required scopes: Contents R/W, Pull requests R/W, Metadata R
GITHUB_PAT=
# -----------------------------------------------------------------------------
# Discord integration (OPTIONAL)
# -----------------------------------------------------------------------------
DISCORD_CLIENT_ID=
DISCORD_BOT_TOKEN=
DISCORD_PUBLIC_KEY=
DISCORD_CLIENT_SECRET=
TELEGRAM_BOT_TOKEN=
# -----------------------------------------------------------------------------
# Email (OPTIONAL — accounts auto-verify without it in development)
# -----------------------------------------------------------------------------
# SENDGRID_API_KEY=
# SENDGRID_FROM_EMAIL=noreply@yourdomain.com
# -----------------------------------------------------------------------------
# Onboarding-silence alert (OPTIONAL, but the alert is log-only without it)
# -----------------------------------------------------------------------------
# Where "a new user typed and nothing answered" is sent. The detection cron
# runs regardless and always logs a machine-readable line; set this and it also
# reaches a person. Leaving it unset is a supported configuration, not a
# mistake — but then the only reader is `kubectl logs`, and the whole point of
# this alert is that nobody has to decide to go look.
# ONBOARDING_ALERT_EMAIL=ops@yourdomain.com
#
# Tunables (defaults are calibrated against production — see
# backend/services/onboardingSilenceService.ts before changing them):
# ONBOARDING_SILENCE_THRESHOLD_MINUTES=15 # past the 10-min event requeue,
# # inside the 30-min pending GC
# ONBOARDING_SILENCE_WINDOW_DAYS=7 # how long after signup counts as onboarding
# ONBOARDING_SILENCE_LOOKBACK_HOURS=24 # how far back one pass judges
# ONBOARDING_SILENCE_ROLLUP_THRESHOLD=5 # per-hour count above which alerts collapse
# ONBOARDING_SILENCE_RESOLUTION_WINDOW_DAYS=7
# -----------------------------------------------------------------------------
# X / Twitter integration (OPTIONAL)
# -----------------------------------------------------------------------------
# X_API_KEY=
# X_API_KEY_SECRET=
# X_ACCESS_TOKEN=
# X_ACCESS_TOKEN_SECRET=