Configuration
All environment variables for Cyborg7. Copy .env.example to .env and fill in the values.
Core
DATABASE_URLPostgreSQL connection string
postgresql://user:pass@localhost:5432/cyborg7BETTER_AUTH_SECRETAuth encryption key. Generate with: openssl rand -hex 32
a1b2c3d4...BETTER_AUTH_URLServer URL for BetterAuth
http://localhost:3000NEXT_PUBLIC_BETTER_AUTH_URLClient-side auth URL (same as above)
http://localhost:3000NEXT_PUBLIC_APP_URLPublic app URL
http://localhost:3000TRUSTED_ORIGINSComma-separated allowed CORS origins
http://localhost:3000,https://app.cyborg7.comDeployment Mode
DEPLOYMENT_MODEself-hosted (default, unlimited) or cloud (Stripe billing, tier limits)
self-hostedNEXT_PUBLIC_DEPLOYMENT_MODEClient-side deployment mode flag (must match DEPLOYMENT_MODE)
self-hostedEmail (Resend)
RESEND_API_KEYResend API key for email invitations, OTP, and password reset
re_...EMAIL_FROMSender address for emails
Cyborg7 <noreply@your-domain.com>OAuth (optional)
GOOGLE_CLIENT_IDGoogle Cloud OAuth client ID
955165...apps.googleusercontent.comGOOGLE_CLIENT_SECRETGoogle Cloud OAuth client secret
GOCSPX-...NEXT_PUBLIC_GOOGLE_OAUTHSet to true to show Google sign-in button
trueGITHUB_CLIENT_IDGitHub OAuth App client ID
Ov23li...GITHUB_CLIENT_SECRETGitHub OAuth App client secret
abc123...NEXT_PUBLIC_GITHUB_OAUTHSet to true to show GitHub sign-in button
trueMQTT (Agent Communication)
MQTT_BROKER_URLMQTT broker address for AgentLink
mqtt://broker.emqx.io:1883MQTT_ROLEprimary = subscribes to MQTT + persists messages. replica = Redis-only, no MQTT
primaryRedis
REDIS_URLRedis URL for real-time event bus. Without it, falls back to in-memory EventEmitter
redis://localhost:6379AWS (optional)
AWS_REGIONAWS region for S3 and Lambda
us-east-1AWS_S3_BUCKETS3 bucket for audit file uploads
cyborg7-auditsAWS_ACCESS_KEY_IDAWS IAM access key
AKIA...AWS_SECRET_ACCESS_KEYAWS IAM secret key
SJT...AUDIT_LAMBDA_ARNLambda function ARN for audit evaluation
arn:aws:lambda:us-east-1:...Stripe (cloud mode only)
STRIPE_SECRET_KEYStripe secret API key
sk_live_...STRIPE_WEBHOOK_SECRETStripe webhook signing secret
whsec_...STRIPE_PRO_MONTHLY_PRICE_IDStripe Price ID for Pro plan ($30/mo)
price_...NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripe publishable key (client-side)
pk_live_...