-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathenv.example
More file actions
110 lines (90 loc) · 4.71 KB
/
env.example
File metadata and controls
110 lines (90 loc) · 4.71 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
# =============================================================================
# marchat Server Environment Configuration
# =============================================================================
#
# Copy this file to .env and customize the values for your deployment:
# cp env.example .env
#
# Environment variables take precedence over .env files, which take precedence
# over legacy JSON config files.
#
# For Docker deployments, set these variables in your Docker run command
# or use the env_file directive to mount this .env file.
# =============================================================================
# =============================================================================
# Server Configuration
# =============================================================================
# Server port for WebSocket connections (default: 8080)
# Change this if you need to use a different port or have conflicts
MARCHAT_PORT=8080
# Admin authentication key (REQUIRED)
# This key is used to authenticate admin users when they connect with --admin flag
# IMPORTANT: Change this to a secure value in production!
MARCHAT_ADMIN_KEY=your-secret-admin-key-change-this
# Comma-separated list of admin usernames (REQUIRED)
# These users can use admin commands like :cleardb when authenticated
# No spaces between usernames, case-insensitive
MARCHAT_USERS=Cody,Crystal,Alice
# =============================================================================
# Database Configuration
# =============================================================================
# SQLite database file path (default: $CONFIG_DIR/marchat.db)
# The database stores messages, user sessions, and server state
# Use absolute paths for production deployments
# MARCHAT_DB_PATH=./config/marchat.db
# =============================================================================
# Logging Configuration
# =============================================================================
# Log level for server output (default: info)
# Options: debug, info, warn, error
# Use debug for troubleshooting, info for normal operation
MARCHAT_LOG_LEVEL=info
# =============================================================================
# JWT Configuration (Future Use)
# =============================================================================
# JWT secret for authentication (auto-generated randomly if not set)
# This will be used for enhanced authentication features in future releases
MARCHAT_JWT_SECRET=your-jwt-secret
# =============================================================================
# Advanced Configuration (Optional)
# =============================================================================
# Custom config directory path (optional)
# Override the default config directory location
# Default: ./config (development) or $XDG_CONFIG_HOME/marchat (production)
# MARCHAT_CONFIG_DIR=/custom/config/path
# =============================================================================
# Advanced Features (Optional)
# =============================================================================
# Ban history gaps feature (default: false)
# When enabled, shows gaps in message history for banned users
# MARCHAT_BAN_HISTORY_GAPS=false
# TLS certificate and key files (optional, enables HTTPS/WSS)
# MARCHAT_TLS_CERT_FILE=/path/to/cert.pem
# MARCHAT_TLS_KEY_FILE=/path/to/key.pem
# Maximum file size for file transfers (default: 1MB)
# Can be specified in bytes or with MB suffix
# MARCHAT_MAX_FILE_BYTES=1048576
# MARCHAT_MAX_FILE_MB=1
# Username allowlist (optional, comma-separated)
# When set, only these users can connect to the server
# MARCHAT_ALLOWED_USERS=alice,bob,charlie
# Global E2E encryption key (optional, base64-encoded)
# When set, enables global end-to-end encryption for all messages
# MARCHAT_GLOBAL_E2E_KEY=base64-encoded-key
# Plugin registry URL (default: GitHub registry)
# Custom plugin registry for downloading plugins
# MARCHAT_PLUGIN_REGISTRY_URL=https://raw.githubusercontent.com/Cod-e-Codes/marchat-plugins/main/registry.json
# =============================================================================
# Docker-Specific Notes
# =============================================================================
#
# For Docker deployments, you may want to use these paths:
# MARCHAT_DB_PATH=/marchat/config/marchat.db
# MARCHAT_CONFIG_DIR=/marchat/config
#
# For production deployments, consider:
# - Using Docker secrets for sensitive values
# - Setting MARCHAT_LOG_LEVEL=warn or error
# - Using absolute paths for MARCHAT_DB_PATH
# - Changing all default secrets to secure values
# =============================================================================