-
-
Notifications
You must be signed in to change notification settings - Fork 773
Expand file tree
/
Copy path.env.template
More file actions
244 lines (187 loc) · 9.79 KB
/
Copy path.env.template
File metadata and controls
244 lines (187 loc) · 9.79 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# ====================================================
# MiroTalk P2P v.1.9.34 - Environment Configuration
# ====================================================
# App environment
NODE_ENV=development #development or production
# Signaling Server
HOST='' # Default to http://localhost:port
PORT=3000
# Trust Proxy
TRUST_PROXY=false #true or false
# Time Zone corresponding to timezone identifiers from the IANA Time Zone Database es Europe/Rome default UTC
TZ=UTC
# Logs
LOGS_DEBUG=true # true or false
LOGS_COLORS=true # true or false
LOGS_JSON=false # true or false
LOGS_JSON_PRETTY=false # true or false
# Cors
# Origin: Allow specified origin es '["https://example.com", "https://subdomain.example.com", "http://localhost:3000"]' or
# all origins '*' if not specified as per default.
# Methods: Allow only GET and POST methods
CORS_ORIGIN='*'
CORS_METHODS='["GET", "POST"]'
# Embed (iframe) restrictions via CSP frame-ancestors (also mirrored to X-Frame-Options when possible).
# Comma-separated list of origins allowed to embed MiroTalk P2P in an <iframe>.
# Special values:
# empty = header NOT set, embedding allowed anywhere (default)
# 'none' = block ALL embedding
# 'self' = allow same-origin embedding only
# Example: ALLOWED_EMBED_ORIGINS=https://yourdomain.com,https://*.partner.com
# NOTE: This affects the MiroTalk widget too — list every host that should be able to embed the room.
ALLOWED_EMBED_ORIGINS=
# IP whitelist
# Restricts access to the listed IPs. Disabled by default.
# If behind a reverse proxy, set TRUST_PROXY=true so the real client IP is used.
# Otherwise set IP_WHITELIST_ALLOW_UNTRUSTED_PROXY=true to allow startup and match only the direct socket IP.
IP_WHITELIST_ENABLED=false # true or false
IP_WHITELIST_ALLOWED='["127.0.0.1", "::1"]'
IP_WHITELIST_ALLOW_UNTRUSTED_PROXY=false # true or false — only set true if no reverse proxy is in front and TRUST_PROXY=false
# OIDC - OpenID Connect
# 1. Sign up for an account at https://auth0.com.
# 2. Navigate to https://manage.auth0.com/ to create a new application tailored to your specific requirements.
# For those seeking an open-source solution, check out: https://github.com/panva/node-oidc-provider
OIDC_ENABLED=false # true or false
OIDC_ALLOW_ROOMS_CREATION_FOR_AUTH_USERS=true # Allow all authenticated users via OIDC to create their own rooms
OIDC_BASE_URL_DYNAMIC=false # Derive OIDC baseURL from incoming Host header (true|false). Requires OIDC_ALLOWED_DYNAMIC_BASE_URLS
OIDC_ALLOWED_DYNAMIC_BASE_URLS= # Comma-separated allowlist of origins permitted when OIDC_BASE_URL_DYNAMIC=true (e.g. https://p2p.mirotalk.com,https://meet.example.com)
OIDC_ISSUER_BASE_URL='https://server.example.com'
OIDC_BASE_URL='http://localhost:3000' # https://p2p.mirotalk.com
OIDC_CLIENT_ID='ClientID'
OIDC_CLIENT_SECRET='ClientSecret'
OIDC_AUTH_REQUIRED=false # set to true if authentication is required for all routes
OIDC_AUTH_LOGOUT=true # controls automatic logout from both your app and Auth0 when set to true
SESSION_SECRET='mirotalk-p2p-oidc-secret'
# Show active rooms
SHOW_ACTIVE_ROOMS=false # true or false
# Maximum participants per room
ROOM_MAX_PARTICIPANTS=1000
# Host protection
# HOST_PROTECTED:
# - When set to true, it requires a valid username and password from the HOST_USERS list to initialize or join a room.
# - When OIDC_ENABLED is utilized alongside host protection, the authenticated user will be recognized as valid.# HOST_USER_AUTH: When set to true, it also requires a valid username and password for joining the room.
# HOST_USERS: This is the list of valid users along with their credentials.
HOST_PROTECTED=false # true or false
HOST_USER_AUTH=false # true or false
HOST_USERS='[{"username": "admin", "password": "admin"},{"username": "guest", "password": "guest"}]'
HOST_MAX_LOGIN_ATTEMPTS=5 # Maximum login attempts before temporary block
HOST_MIN_LOGIN_BLOCK_TIME=15 # Block duration in minutes after max attempts exceeded
# JWT token config
JWT_KEY=mirotalkp2p_jwt_secret
JWT_EXP=1h
# Presenters list
# In our virtual room, the first participant to join will assume the role of the presenter.
# Additionally, we have the option to include more presenters and co-presenters, each identified by their username.
# WARNING: without host protection / user auth the username is unverified: treat each entry as a
# shared secret, use unique non-guessable values (never a real name or email). Empty by default.
PRESENTERS='[]'
# Ngrok
# 1. Goto https://ngrok.com
# 2. Get started for free
# 3. Copy YourNgrokAuthToken: https://dashboard.ngrok.com/get-started/your-authtoken
NGROK_ENABLED=false # true or false
NGROK_AUTH_TOKEN=YourNgrokAuthToken
# Stun
# About: https://bloggeek.me/webrtcglossary/stun/
# Check: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
STUN_SERVER_ENABLED=true # true or false
STUN_SERVER_URL=stun:stun.l.google.com:19302
# Turn
# About: https://bloggeek.me/webrtcglossary/turn/
# Recommended: https://github.com/coturn/coturn
# Installation: https://github.com/miroslavpejic85/mirotalk/blob/master/docs/coturn.md
# Free one: https://www.metered.ca/tools/openrelay/ (Please, create your own account)
# Check: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
TURN_SERVER_ENABLED=true # true or false
TURN_SERVER_URL=turn:a.relay.metered.ca:443
TURN_SERVER_USERNAME=e8dd65b92c62d3e36cafb807
TURN_SERVER_CREDENTIAL=uWdWNmkhvyqTEswO
# IP lookup
# Using GeoJS to get more info about peer by IP
# Doc: https://www.geojs.io/docs/v1/endpoints/geo/
IP_LOOKUP_ENABLED=false # true or false
# API
# The response will give you a entrypoint / Room URL for your meeting.
# curl -X POST "http://localhost:3000/api/v1/meeting" -H "authorization: mirotalkp2p_default_secret" -H "Content-Type: application/json"
API_KEY_SECRET=mirotalkp2p_default_secret
API_DISABLED='["token", "meetings"]'
# Custom Noise Suppression
# Enable custom noise suppression using RNNoise. If disabled, the default WebRTC noise suppression will be used.
CUSTOM_NOISE_SUPPRESSION_ENABLED=true # true or false
# Survey URL
# Using to redirect the client after close the call (feedbacks, website...)
SURVEY_ENABLED=true # true or false
SURVEY_URL=https://www.questionpro.com/t/AUs7VZq00L
# Redirect URL on leave room
# Upon leaving the room, users who either opt out of providing feedback or if the survey is disabled
# will be redirected to a specified URL. If enabled false the default '/newrcall' URL will be used.
REDIRECT_ENABLED=false # true or false
REDIRECT_URL='https://p2p.mirotalk.com'
# Sentry (optional)
# 1. Goto https://sentry.io/
# 2. Create account
# 3. Goto Settings/Projects/YourProjectName/Client Keys (DSN)
SENTRY_ENABLED=false # true or false
SENTRY_LOG_LEVELS=error # Log levels to capture in Sentry (e.g., error,warn)
SENTRY_DSN=YourClientKeyDSN
SENTRY_TRACES_SAMPLE_RATE=0.5
# Slack Integration (optional)
# 1. Goto https://api.slack.com/apps/
# 2. Create your app
# 3. On Settings - Basic Information - App Credentials chose your Signing Secret
# 4. Create a Slash Commands and put as Request URL: https://your.domain.name/slack
SLACK_ENABLED=false # true or false
SLACK_SIGNING_SECRET=YourSlackSigningSecret
# Mattermost Integration (optional)
# 1. Navigate to Main Menu > Integrations > Slash Commands in Mattermost.
# 2. Click on Add Slash Command and configure the following settings:
# - Title: Enter a descriptive title (e.g., `P2P Command`).
# - Command Trigger Word: Set the trigger word to `p2p`.
# - Callback URLs: Enter the URL for your Express server (e.g., `https://yourserver.com/mattermost`).
# - Request Method: Select POST.
# - Enable Autocomplete: Check the box for Autocomplete.
# - Autocomplete Description: Provide a brief description (e.g., `Get MiroTalk P2P meeting room`).
# 3. Save the slash command and copy the generated token here as MATTERMOST_TOKEN.
MATTERMOST_ENABLED=false # true or false
MATTERMOST_SERVER_URL=YourMattermostServerUrl
MATTERMOST_USERNAME=YourMattermostUsername
MATTERMOST_PASSWORD=YourMattermostPassword
MATTERMOST_TOKEN=YourMattermostToken
MATTERMOST_ROOM_TOKEN_EXPIRE=15m
# ChatGPT/OpenAI
# 1. Goto https://platform.openai.com/
# 2. Create your account
# 3. Generate your APIKey https://platform.openai.com/account/api-keys
CHATGPT_ENABLED=false # true or false
CHATGPT_BASE_PATH=https://api.openai.com/v1/
CHATGPT_APIKEY=YourOpenAiApiKey
CHATGPT_MODEL=gpt-3.5-turbo
CHATGPT_MAX_TOKENS=1000
CHATGPT_TEMPERATURE=0
# Whisper Speech-to-Text (OpenAI API or self-hosted OpenAI-compatible server)
# Server-side transcription used as an ASYNC SIDE-CHANNEL only: it never sits in
# the WebRTC audio path. Text is distributed to peers over the WebRTC DataChannel.
# The API key is used server-side only and is NEVER exposed to the browser.
WHISPER_ENABLED=false # Enable Whisper transcription (true|false)
WHISPER_BASE_PATH=https://api.openai.com/v1/ # OpenAI-compatible base path (self-hosted e.g. http://localhost:8000/v1/)
WHISPER_API_KEY= # API key (may be empty for self-hosted servers)
WHISPER_MODEL=whisper-1 # Whisper model name
WHISPER_LANGUAGE= # Optional ISO-639-1 language hint (empty = auto-detect)
WHISPER_SEGMENT_SECONDS=3 # Length of each recorded audio segment
WHISPER_MAX_AUDIO_BYTES=26214400 # Reject audio segments larger than this (bytes)
# Email configuration for notifications and alerts
# For testing, you can use Mailpit: run `npm run mailpit:up` or `npm run mailpit:down`
# For Gmail, refer to: https://support.google.com/mail/answer/185833?hl=en
EMAIL_ALERT=false # true or false
EMAIL_HOST=localhost
EMAIL_PORT=1025
EMAIL_USERNAME=test
EMAIL_PASSWORD=test
EMAIL_FROM=test@mirotalk.com
EMAIL_SEND_TO=test@mirotalk.com
# Stats
# Umami: https://github.com/umami-software/umami
# We use our Self-hosted Umami to track aggregated usage statistics in order to improve our service.
STATS_ENABLED=true # true or false
STATS_SCR=https://stats.mirotalk.com/script.js
STATS_ID=b3dc4db6-e6bd-468f-ab4d-58e93b23c6a8