-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.example
More file actions
169 lines (145 loc) · 4.81 KB
/
.env.example
File metadata and controls
169 lines (145 loc) · 4.81 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# ================================
# LMRing Environment Variables
# ================================
#
# Quick Start:
# 1. Copy this file: cp .env.example .env
# 2. Update the values with your actual credentials
# 3. For local dev: cp .env apps/web/.env
# 4. For Docker: docker compose up -d
#
# ================================
# ================================
# Deployment Mode
# ================================
# Options: saas | selfhost
# - saas: Vercel + Supabase with OAuth support
# - selfhost: Docker + PostgreSQL with optional OAuth
DEPLOYMENT_MODE=saas
NEXT_PUBLIC_DEPLOYMENT_MODE=saas
# ================================
# Better Auth Configuration
# ================================
# Generate a random 32+ character secret:
# openssl rand -base64 32
BETTER_AUTH_SECRET=your-random-secret-here-min-32-chars
BETTER_AUTH_URL=http://localhost:3000
# ================================
# Database
# ================================
# SaaS mode: Use Supabase connection string
# Selfhost mode: Use Docker PostgreSQL (see Docker section below)
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
# Encryption key for API keys (64-character hex string)
# Generate: openssl rand -hex 32
ENCRYPTION_KEY=your-64-character-hex-encryption-key-here-32bytes
# Supabase (SaaS mode only)
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_STORAGE_BUCKET=lmring-files
# Signed URL expiration in seconds (default: 3600 = 1 hour)
SUPABASE_SIGNED_URL_EXPIRATION=3600
# ================================
# AI Image Configuration
# ================================
# When set to 1, images are converted to base64 before sending to AI
# Required for selfhost mode where AI cannot access MinIO URLs directly
LLM_IMAGE_BASE64=0
# ================================
# OAuth Providers
# ================================
# SaaS mode: Required
# Selfhost mode: Optional (leave empty to disable)
# GitHub OAuth
# Create at: https://github.com/settings/developers
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Google OAuth
# Create at: https://console.cloud.google.com/apis/credentials
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# ================================
# Linux.do OAuth (Optional)
# ================================
# Enable Linux.do forum authentication
# Set to 'true' to enable, requires CLIENT_ID and CLIENT_SECRET
# Available in both SaaS and selfhost modes
NEXT_PUBLIC_LINUXDO_AUTH_ENABLED=false
LINUXDO_CLIENT_ID=
LINUXDO_CLIENT_SECRET=
# ================================
# Email Configuration (Optional)
# ================================
# Enable email sending for OTP verification and password reset
# When NEXT_PUBLIC_EMAIL_ENABLED=false:
# - Registration does not require email verification
# - Forgot password feature is not available
# When NEXT_PUBLIC_EMAIL_ENABLED=true:
# - Requires RESEND_API_KEY
# - Users must verify email after registration
# - Forgot password via email OTP is available
NEXT_PUBLIC_EMAIL_ENABLED=false
RESEND_API_KEY=
EMAIL_FROM=noreply@lmring.com
# ================================
# Docker Self-hosted Configuration
# ================================
# Only needed when using docker-compose.yml
# PostgreSQL settings
POSTGRES_USER=lmring
POSTGRES_PASSWORD=lmring
POSTGRES_DB=lmring
# Application port
PORT=3000
# ================================
# Optional: Monitoring & Analytics
# ================================
# Sentry Error Tracking
SENTRY_ORGANIZATION=
SENTRY_PROJECT=
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_SENTRY_DISABLED=true
# PostHog Analytics
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
# Better Stack Logging
NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN=
NEXT_PUBLIC_BETTER_STACK_INGESTING_HOST=
# ================================
# Optional: Vercel (SaaS mode)
# ================================
# Auto-populated by Vercel
VERCEL_ENV=
VERCEL_URL=
VERCEL_PROJECT_PRODUCTION_URL=
VERCEL_BYPASS_TOKEN=
# ================================
# Optional: WebDev Preview (Vercel Sandbox)
# ================================
# Enables AI-powered web development with live preview.
# On Vercel deployments: authentication is automatic (no config needed).
# For local dev: run `vercel link && vercel env pull .env.local` (token valid 12hr).
# For non-Vercel environments: set all three values below.
# VERCEL_TOKEN=
# VERCEL_TEAM_ID=
# VERCEL_PROJECT_ID=
# ================================
# Optional: Security
# ================================
# Arcjet rate limiting
ARCJET_KEY=
# ================================
# Optional: Build & CI
# ================================
ANALYZE=false
CI=
# Checkly monitoring
CHECKLY_EMAIL_ADDRESS=
CHECKLY_PROJECT_NAME=
CHECKLY_LOGICAL_ID=
ENVIRONMENT_URL=
# ================================
# App Configuration
# ================================
NEXT_PUBLIC_APP_URL=http://localhost:3000