# ==================================================== # MiroTalk SFU - Environment Configuration # ==================================================== # config.js - Main configuration with: # - All default values and documentation # - Complex logic and validations # - Safe to commit to version control # # .env - Environment overrides with: # - Secrets and sensitive data (NEVER commit) # - Environment-specific settings # - Simple key=value format # # Why this works best: # 1. SECURITY: Secrets stay out of codebase # 2. FLEXIBILITY: Change settings without redeploy # 3. SAFETY: Built-in defaults prevent crashes # 4. DOCS: config.js explains all options # # Best practice: # - Keep DEFAULT values in config.js # - Keep SECRETS/ENV-SPECIFIC in .env # - Add .env to .gitignore # ==================================================== # ---------------------------------------------------- # 1. Core System Configuration # ---------------------------------------------------- NODE_ENV=development # Runtime environment: development|production SFU_ANNOUNCED_IP= # Set your public IP address or domain for WebRTC announcements SFU_LISTEN_IP=0.0.0.0 # Bind to all interfaces SFU_MIN_PORT=40000 # Minimum WebRTC port range SFU_MAX_PORT=40100 # Maximum WebRTC port range SFU_NUM_WORKERS= # Number of worker processes (defaults to CPU count) SFU_SERVER=false # Enable/disable WebRTC server (true|false) # ---------------------------------------------------- # 2. Server Configuration # ---------------------------------------------------- SERVER_HOST_URL= # Public server URL (e.g., https://yourdomain.com) SERVER_LISTEN_IP=0.0.0.0 # Server bind IP SERVER_LISTEN_PORT=3010 # Port to listen on TRUST_PROXY=false # Trust proxy headers (true in production behind reverse proxy) SERVER_SSL_CERT=../ssl/cert.pem # Path to SSL certificate SERVER_SSL_KEY=../ssl/key.pem # Path to SSL private key CORS_ORIGIN=* # Allowed CORS origins (comma-separated) # ---------------------------------------------------- # 3. Logging Configuration # ---------------------------------------------------- LOGS_JSON=false # Log output in JSON format (true|false) LOGS_JSON_PRETTY=false # Pretty-print JSON logs (true|false) # ---------------------------------------------------- # 4. Media Handling # ---------------------------------------------------- # Recording RECORDING_ENABLED=false # Enable recording functionality (true|false) RECORDING_UPLOAD_TO_S3=false # Upload recording to AWS S3 bucket [true/false] RECORDING_ENDPOINT= # Recording service endpoint es http://localhost:8080 # Rtmp streaming RTMP_ENABLED=false # Enable RTMP streaming (true|false) RTMP_FROM_FILE=true # Enable local file streaming RTMP_FROM_URL=true # Enable URL streaming RTMP_FROM_STREAM=true # Enable live stream (camera, microphone, screen, window) RTMP_MAX_STREAMS=1 # Max simultaneous RTMP streams RTMP_USE_NODE_MEDIA_SERVER=true # Use Node Media Server mirotalk-nms Docker image RTMP_SERVER=rtmp://localhost:1935 # RTMP server URL RTMP_APP_NAME=live # RTMP application name RTMP_STREAM_KEY= # RTMP stream key (optional) RTMP_SECRET=mirotalkRtmpSecret # RTMP API secret (Must match node-media-server config.js) RTMP_API_SECRET=mirotalkRtmpApiSecret # RTMP internal secret RTMP_EXPIRATION_HOURS=4 # RTMP URL validity duration (hours) RTMP_FFMPEG_PATH= # RTMP Custom path to FFmpeg binary (auto-detected if empty) # ---------------------------------------------------- # 5. Security & Authentication # ---------------------------------------------------- # Middleware IP_WHITELIST_ENABLED=false # Restrict access by IP (true|false) IP_WHITELIST_ALLOWED=127.0.0.1,::1 # Allowed IPs (comma-separated) # Token JWT_SECRET=mirotalksfu_jwt_secret # Secret for JWT tokens JWT_EXPIRATION=1h # JWT token expiration (e.g., 1h, 7d) # OIDC OIDC_ENABLED=false # Enable OpenID Connect (true|false) OIDC_ALLOW_ROOMS_CREATION_FOR_AUTH_USERS=true # Allow all authenticated users via OIDC to create their own rooms OIDC_ISSUER=https://server.example.com # OIDC provider URL OIDC_BASE_URL= # OIDC base URL es https://yourdomain.com OIDC_CLIENT_ID=clientID # OIDC client ID OIDC_CLIENT_SECRET=clientSecret # OIDC client secret OIDC_SECRET=mirotalksfu-oidc-secret # OIDC secret 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 (true|false) OIDC_USERNAME_FORCE=true # Force the username to match OIDC email or name (true|false) OIDC_USERNAME_AS_EMAIL=true # Set username as email from OIDC (true|false) OIDC_USERNAME_AS_NAME=false # Set username as name from OIDC (true|false) # Host protection HOST_PROTECTED=false # Enable host protection (true|false) HOST_USER_AUTH=false # Enable user authentication (true|false) # Host users - Define host users in the format: username:password:displayName:allowedRooms (room1,room2...) HOST_USERS="username:password:User:*|admin:admin:Admin:room1,room2|guest:guest:Guest:room1,room2" # Endpoints HOST_USERS_FROM_DB=false # Use DB for user auth (true|false) USERS_API_SECRET=mirotalkweb_default_secret # Users API secret key USERS_API_ENDPOINT=http://localhost:9000/api/v1/user/isAuth # User auth endpoint USERS_ROOM_ALLOWED_ENDPOINT=http://localhost:9000/api/v1/user/isRoomAllowed # Room permission endpoint USERS_ROOMS_ALLOWED_ENDPOINT=http://localhost:9000/api/v1/user/roomsAllowed # Allowed rooms endpoint ROOM_EXISTS_ENDPOINT=http://localhost:9000/api/v1/room/exists # Room exists endpoint # Presenters PRESENTERS=Miroslav Pejic,miroslav.pejic.85@gmail.com, # Presenter usernames (comma-separated) PRESENTER_JOIN_FIRST=true # First joiner becomes presenter (true|false) # ---------------------------------------------------- # 6. API Configuration # ---------------------------------------------------- API_KEY_SECRET=mirotalksfu_default_secret # Secret for API authentication API_ALLOW_STATS=true # Enable stats API (true|false) API_ALLOW_MEETINGS=false # Allow meetings API endpoint (true|false) API_ALLOW_MEETING=true # Allow single meeting API endpoint (true|false) API_ALLOW_JOIN=true # Allow join API endpoint (true|false) API_ALLOW_TOKEN=false # Allow token-based API authentication (true|false) API_ALLOW_SLACK=true # Allow Slack integration via API (true|false) API_ALLOW_MATTERMOST=true # Allow Mattermost integration via API (true|false) # ---------------------------------------------------- # 7. Third-Party Integrations # ---------------------------------------------------- # ChatGPT Integration CHATGPT_ENABLED=false # Enable ChatGPT integration (true|false) CHATGPT_BASE_PATH=https://api.openai.com/v1/ # OpenAI base path CHATGPT_API_KEY= # OpenAI API key CHATGPT_MODEL=gpt-3.5-turbo # Model to use (gpt-3.5-turbo, gpt-4, etc.) CHATGPT_MAX_TOKENS=1024 # Max response tokens CHATGPT_TEMPERATURE=0.7 # Creativity level (0-1) # DeepSeek Integration DEEP_SEEK_ENABLED=false # Enable DeepSeek integration (true|false) DEEP_SEEK_BASE_PATH=https://api.deepseek.com/v1/ # DeepSeek base path DEEP_SEEK_API_KEY= # DeepSeek API key DEEP_SEEK_MODEL=deepseek-chat # Model to use (deepseek-chat, deepseek-coder, etc.) DEEP_SEEK_MAX_TOKENS=1024 # Max response tokens DEEP_SEEK_TEMPERATURE=0.7 # Creativity level (0-1) # Video AI (HeyGen) Integration VIDEOAI_ENABLED=false # Enable video AI avatars (true|false) VIDEOAI_API_KEY= # HeyGen API key VIDEOAI_SYSTEM_LIMIT= # AI system prompt # Email Alerts EMAIL_ALERTS_ENABLED=false # Enable email alerts (true|false) EMAIL_NOTIFICATIONS=false # Enable email notifications (true|false) EMAIL_HOST=smtp.gmail.com # SMTP server host EMAIL_PORT=587 # SMTP port EMAIL_USERNAME=your_username # SMTP username EMAIL_PASSWORD=your_password # SMTP password EMAIL_FROM= # Sender email address EMAIL_SEND_TO=sfu.mirotalk@gmail.com # Notification recipient # Slack Integration SLACK_ENABLED=false # Enable Slack integration (true|false) SLACK_SIGNING_SECRET= # Slack app signing secret # Mattermost Integration MATTERMOST_ENABLED=false # Enable Mattermost (true|false) MATTERMOST_SERVER_URL=YourMattermostServerUrl # Mattermost server URL MATTERMOST_USERNAME=YourMattermostUsername # Mattermost username MATTERMOST_PASSWORD=YourMattermostPassword # Mattermost password MATTERMOST_TOKEN=YourMattermostToken # Mattermost slash command token MATTERMOST_COMMAND_NAME=/sfu # Mattermost command name MATTERMOST_DEFAULT_MESSAGE=Here is your meeting room: # Mattermost default message # Discord Integration DISCORD_ENABLED=false # Enable Discord bot (true|false) DISCORD_TOKEN= # Discord bot token DISCORD_COMMAND_NAME=/sfu # Discord command name DISCORD_DEFAULT_MESSAGE=Here is your SFU meeting room: # Discord default message DISCORD_BASE_URL=https://sfu.mirotalk.com/join/ # Discord Base URL for meeting rooms # Ngrok Tunnel NGROK_ENABLED=false # Enable Ngrok tunneling (true|false) NGROK_AUTH_TOKEN= # Ngrok authentication token # Sentry Error Tracking SENTRY_ENABLED=false # Enable Sentry error tracking (true|false) SENTRY_LOG_LEVELS=error # Log levels to capture (comma-separated) SENTRY_DSN= # Sentry DSN URL SENTRY_TRACES_SAMPLE_RATE=0.2 # Error sampling rate (0-1) # Webhook Notifications WEBHOOK_ENABLED=false # Enable webhook notifications (true|false) WEBHOOK_URL=https://your-site.com/webhook-endpoint # Webhook endpoint URL # IP Geolocation IP_LOOKUP_ENABLED=false # Enable IP lookup functionality (true|false) # AWS S3 Configuration AWS_S3_ENABLED=false # Enable AWS S3 storage (true|false) AWS_S3_BUCKET_NAME=mirotalk # Name of your S3 bucket (must exist) AWS_ACCESS_KEY_ID= # AWS Access Key ID (leave empty for IAM roles) AWS_SECRET_ACCESS_KEY= # AWS Secret Access Key (leave empty for IAM roles) AWS_REGION= # AWS region (e.g., us-east-2, eu-west-2) # ---------------------------------------------------- # 8. UI Customization # ---------------------------------------------------- # Branding injection BRAND_HTML_INJECTION=true # Enable HTML injection for branding (true|false) # Widget Configuration WIDGET_ENABLED=false # Enable branding widget (true|false) WIDGET_ROOM_ID=support-room # Widget room ID (default: support-room) WIDGET_THEME=dark # Widget theme (dark|light) WIDGET_STATE=minimized # Widget initial state (normal|minimized|closed) WIDGET_TYPE=support # Widget type (support) WIDGET_SUPPORT_POSITION=top-right # Support widget position (top-right|top-left|bottom-right|bottom-left) WIDGET_SUPPORT_EXPERT_IMAGES= # Comma-separated expert image URLs comma-separated WIDGET_SUPPORT_BUTTON_AUDIO=true # Show audio button in support widget (false|false) WIDGET_SUPPORT_BUTTON_VIDEO=true # Show video button in support widget (false|false) WIDGET_SUPPORT_BUTTON_SCREEN=true # Show screen share button in support widget (false|false) WIDGET_SUPPORT_BUTTON_CHAT=true # Show chat button in support widget (false|false) WIDGET_SUPPORT_BUTTON_JOIN=true # Show join button in support widget (false|false) WIDGET_SUPPORT_CHECK_ONLINE_STATUS=false # Check online room status (true|false) WIDGET_SUPPORT_IS_ONLINE=true # Is support online (true|false) WIDGET_SUPPORT_HEADING=Need Help? # Support widget heading WIDGET_SUPPORT_SUBHEADING=Get instant support from our expert team! # Support widget subheading WIDGET_SUPPORT_CONNECT_TEXT=connect in < 5 seconds # Connect text WIDGET_SUPPORT_ONLINE_TEXT=We are online # Online text WIDGET_SUPPORT_OFFLINE_TEXT=We are offline # Offline text WIDGET_SUPPORT_POWERED_BY=Powered by MiroTalk SFU # Powered by text # Widget Alert Notifications WIDGET_ALERT_ENABLED=false # Enable alert notifications (true|false) WIDGET_ALERT_TYPE=email # Alert notification type (email) need EMAIL_ALERTS_ENABLED=true and configuration # App UI_LANGUAGE=en # Interface language (en, es, fr, etc.) APP_NAME=MiroTalk SFU # Application name APP_TITLE= # Custom HTML title (leave empty for default) APP_DESCRIPTION= # Application description JOIN_DESCRIPTION= # Join screen description JOIN_BUTTON_LABEL=JOIN ROOM # Join button text JOIN_LAST_LABEL=Your recent room: # Recent room label text # Site SITE_TITLE= # Website title SITE_ICON_PATH=../images/logo.svg # Favicon path APPLE_TOUCH_ICON_PATH=../images/logo.svg # Apple touch icon path NEW_ROOM_TITLE= # New room title NEW_ROOM_DESC= # New room description # Meta META_DESCRIPTION= # HTML meta description META_KEYWORDS= # HTML meta keywords # OG OG_TYPE=app-webrtc # OpenGraph type OG_SITE_NAME=MiroTalk SFU # OG site name OG_TITLE= # OG title OG_DESCRIPTION= # OG description OG_IMAGE_URL=https://sfu.mirotalk.com/images/mirotalksfu.png # OG image OG_URL=https://sfu.mirotalk.com # OG URL # HTML SHOW_TOP_SPONSORS=true # Show top sponsors section (true|false) SHOW_FEATURES=true # Show features section (true|false) SHOW_TEAMS=true # Show teams section (true|false) SHOW_TRY_EASIER=true # Show "try easier" section (true|false) SHOW_POWERED_BY=true # Show powered by (true|false) SHOW_SPONSORS=true # Show sponsors (true|false) SHOW_ADVERTISERS=true # Show advertisers (true|false) SHOW_SUPPORT_US=true # Show support us section (true|false) SHOW_FOOTER=true # Show footer (true|false) # Who Are You WHO_ARE_YOU_TITLE="Who are you?" # Title WHO_ARE_YOU_DESCRIPTION="If you're the presenter, please log in now.
Otherwise, kindly wait for the presenter to join." # Description WHO_ARE_YOU_BUTTON_LOGIN_LABEL="LOGIN" # Login button label WHO_ARE_YOU_JOIN_LABEL="JOIN ROOM" # Join button label # About ABOUT_IMAGE_URL=../images/mirotalk-logo.gif # About section image SUPPORT_URL=https://codecanyon.net/user/miroslavpejic85 # Support link URL SUPPORT_TEXT=Support # Support button text AUTHOR_LABEL=Author # Author label text AUTHOR_NAME=Miroslav Pejic # Author name LINKEDIN_URL=https://www.linkedin.com/in/miroslav-pejic-976a07101/ # LinkedIn profile CONTACT_EMAIL=miroslav.pejic.85@gmail.com # Contact email EMAIL_SUBJECT=MiroTalk SFU info # Email subject COPYRIGHT_TEXT=MiroTalk SFU, all rights reserved # Copyright text # ---------------------------------------------------- # 9. UI Button Configuration # ---------------------------------------------------- # Active Rooms SHOW_ACTIVE_ROOMS=false # Show active rooms feature (true|false) # Popup Configuration SHOW_SHARE_ROOM_POPUP=true # Show share room popup (true|false) SHOW_SHARE_ROOM_QR_ON_HOVER=true # Show share room QR popup on mouse hover (true|false) # Main Control Buttons SHOW_SHARE_BUTTON=true # Show share button (true|false) SHOW_HIDE_ME=true # Show hide me button (true|false) SHOW_FULLSCREEN_BUTTON=true # Show fullscreen button (true|false) SHOW_AUDIO_BUTTON=true # Show audio button (true|false) SHOW_VIDEO_BUTTON=true # Show video button (true|false) SHOW_SCREEN_BUTTON=true # Show screen share button (true|false) SHOW_SWAP_CAMERA=true # Show camera swap button (true|false) SHOW_CHAT_BUTTON=true # Show chat button (true|false) SHOW_POLL_BUTTON=true # Show poll button (true|false) SHOW_EDITOR_BUTTON=true # Show editor button (true|false) SHOW_RAISE_HAND=true # Show raise hand button (true|false) SHOW_TRANSCRIPTION=true # Show transcription button (true|false) SHOW_WHITEBOARD=true # Show whiteboard button (true|false) SHOW_DOCUMENT_PIP=true # Show document PiP button (true|false) SHOW_SNAPSHOT=true # Show snapshot button (true|false) SHOW_EMOJI=true # Show emoji button (true|false) SHOW_SETTINGS=true # Show settings button (true|false) SHOW_ABOUT=true # Show about button (true|false) SHOW_EXIT_BUTTON=true # Show exit button (true|false) SHOW_EXTRA_BUTTON=true # Show extra buttons (true|false) # Settings Panel SHOW_ROOMS=true # Show rooms (true|false) ENABLE_FILE_SHARING=true # Enable file sharing (true|false) SHOW_LOCK_ROOM=true # Show lock room button (true|false) SHOW_UNLOCK_ROOM=true # Show unlock room button (true|false) SHOW_BROADCASTING=true # Show broadcasting button (true|false) SHOW_LOBBY=true # Show lobby button (true|false) SHOW_EMAIL_INVITE=true # Show email invitation button (true|false) SHOW_MIC_OPTIONS=true # Show mic options button (true|false) SHOW_RTMP_TAB=true # Show RTMP tab (true|false) SHOW_NOTIFICATIONS_TAB=true # Show notifications tab (true|false) SHOW_MODERATOR_TAB=true # Show moderator tab (true|false) SHOW_RECORDING_TAB=true # Show recording tab (true|false) HOST_ONLY_RECORDING=true # Only host can record (true|false) ENABLE_PUSH_TO_TALK=true # Enable push-to-talk (true|false) SHOW_KEYBOARD_SHORTCUTS=true # Show keyboard shortcuts (true|false) SHOW_VIRTUAL_BACKGROUND=true # Show virtual background (true|false) # Video Controls ENABLE_PIP=true # Enable picture-in-picture (true|false) SHOW_MIRROR_BUTTON=true # Show mirror button (true|false) SHOW_FULLSCREEN=true # Show fullscreen button (true|false) SHOW_SNAPSHOT_BUTTON=true # Show snapshot button (true|false) SHOW_MUTE_AUDIO=true # Show mute audio button (true|false) SHOW_PRIVACY_TOGGLE=true # Show privacy toggle (true|false) SHOW_VOLUME_CONTROL=true # Show volume control (true|false) SHOW_FOCUS_BUTTON=true # Show focus button (true|false) SHOW_SEND_MESSAGE=true # Show send message button (true|false) SHOW_SEND_FILE=true # Show send file button (true|false) SHOW_SEND_VIDEO=true # Show send video button (true|false) SHOW_MUTE_VIDEO=true # Show mute video button (true|false) SHOW_GEO_LOCATION=true # Show geoLocation button (true|false) SHOW_BAN_BUTTON=true # Show ban button (true|false) SHOW_EJECT_BUTTON=true # Show eject button (true|false) # Chat Controls SHOW_CHAT_PIN=true # Show chat pin button (true|false) SHOW_CHAT_MAXIMIZE=true # Show chat maximize button (true|false) SHOW_CHAT_SAVE=true # Show chat save button (true|false) SHOW_CHAT_EMOJI=true # Show chat emoji button (true|false) SHOW_CHAT_MARKDOWN=true # Show chat markdown button (true|false) SHOW_CHAT_SPEECH=true # Show chat speech button (true|false) ENABLE_CHAT_GPT=true # Enable ChatGPT in chat (true|false) ENABLE_DEEP_SEEK=true # Enable DeepSeek in chat (true|false) # Poll Controls SHOW_POLL_PIN=true # Show poll pin button (true|false) SHOW_POLL_MAXIMIZE=true # Show poll maximize button (true|false) SHOW_POLL_SAVE=true # Show poll save button (true|false) # Participants Controls SHOW_SAVE_INFO=true # Show save info button (true|false) SHOW_SEND_FILE_ALL=true # Show send file to all button (true|false) SHOW_EJECT_ALL=true # Show eject all button (true|false) # Whiteboard Controls SHOW_WB_LOCK=true # Show whiteboard lock button (true|false) # ---------------------------------------------------- # 10. Feature Flags # ---------------------------------------------------- SURVEY_ENABLED=false # Enable post-call survey (true|false) SURVEY_URL= # Survey URL # Redirect REDIRECT_ENABLED=false # Enable post-call redirect (true|false) REDIRECT_URL= # Redirect URL # Stats STATS_ENABLED=true # Enable usage statistics (true|false) STATS_SRC=https://stats.mirotalk.com/script.js # Stats script URL STATS_ID=41d26670-f275-45bb-af82-3ce91fe57756 # Stats tracking ID # Custom noise suppression CUSTOM_NOISE_SUPPRESSION_ENABLED=true # Enable custom noise suppression, default one will still work if this is disabled (true|false) # ----------------------------------------------------- # 11. Global Moderation Configuration # ----------------------------------------------------- ROOM_MAX_PARTICIPANTS=1000 # Maximum participants per room ROOM_LOBBY=false # Enable room lobby (true|false) # ---------------------------------------------------- # 12. Mediasoup Configuration # ---------------------------------------------------- MEDIASOUP_ROUTER_AUDIO_LEVEL_OBSERVER_ENABLED=true # Enable audio level observer (true|false) MEDIASOUP_ROUTER_ACTIVE_SPEAKER_OBSERVER_ENABLED=false # Enable active speaker observer (true|false) MEDIASOUP_LOG_LEVEL=error # Mediasoup log level (debug, warn, error)