-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.selfhost.example
More file actions
98 lines (83 loc) · 2.81 KB
/
.env.selfhost.example
File metadata and controls
98 lines (83 loc) · 2.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
# ================================
# LMRing Self-hosted Docker Configuration
# ================================
#
# Quick Start:
# 1. Copy this file: cp .env.selfhost.example .env
# 2. Update BETTER_AUTH_SECRET and ENCRYPTION_KEY with secure values
# 3. Run: docker compose up -d
# 4. Run migrations: docker compose exec app pnpm db:migrate
# 5. Access: http://localhost:3000
#
# Generate secure keys:
# BETTER_AUTH_SECRET: openssl rand -base64 32
# ENCRYPTION_KEY: openssl rand -hex 32
#
# ================================
# ================================
# Deployment Mode (Required)
# ================================
DEPLOYMENT_MODE=selfhost
NEXT_PUBLIC_DEPLOYMENT_MODE=selfhost
# ================================
# Better Auth (Required)
# ================================
# Minimum 32 characters - generate with: openssl rand -base64 32
BETTER_AUTH_SECRET=change-me-to-a-secure-random-string-at-least-32-chars
# URL where the app is accessible
BETTER_AUTH_URL=http://localhost:3000
# ================================
# Encryption (Required)
# ================================
# 64-character hex string - generate with: openssl rand -hex 32
ENCRYPTION_KEY=change-me-to-a-64-character-hex-string-use-openssl-rand-hex-32
# ================================
# PostgreSQL Database (Docker)
# ================================
# These configure the PostgreSQL container
# DATABASE_URL is auto-generated by docker-compose.yml
POSTGRES_USER=lmring
POSTGRES_PASSWORD=lmring
POSTGRES_DB=lmring
# ================================
# Application
# ================================
PORT=3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
# ================================
# OAuth Providers (Optional)
# ================================
# Leave empty to disable OAuth (email/password only)
# To enable, create OAuth apps and fill in credentials
# GitHub OAuth - https://github.com/settings/developers
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Google OAuth - https://console.cloud.google.com/apis/credentials
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# ================================
# Monitoring (Optional)
# ================================
# Sentry Error Tracking
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_SENTRY_DISABLED=true
# PostHog Analytics
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
# ================================
# MinIO Object Storage (Docker)
# ================================
# MinIO root credentials (keep secure!)
MINIO_ROOT_USER=lmring
MINIO_ROOT_PASSWORD=lmring_minio_password
# MinIO endpoint for application
MINIO_ENDPOINT=minio
MINIO_PORT=9000
MINIO_USE_SSL=false
MINIO_ACCESS_KEY=lmring
MINIO_SECRET_KEY=lmring_minio_password
MINIO_BUCKET=lmring-files
# Signed URL expiration in seconds (default: 3600 = 1 hour)
MINIO_SIGNED_URL_EXPIRATION=3600
# AI Image - must be 1 for selfhost (AI cannot access MinIO URLs)
LLM_IMAGE_BASE64=1