CLI & Server Options
Complete reference for all configuration options and CLI commands.
CLI Commands (Coming Soon)
Section titled “CLI Commands (Coming Soon)”The MikroRoom CLI provides installation and management commands.
mikroroom install
Section titled “mikroroom install”Download and install the latest MikroRoom version.
mikroroom installDownloads from https://releases.mikroroom.com/mikroroom_latest.zip.
mikroroom init
Section titled “mikroroom init”Initialize MikroRoom in the current directory.
mikroroom initCreates:
mikroroom.config.json- Frontend configurationapp/- Web application files (if available)
mikroroom start [options]
Section titled “mikroroom start [options]”Start the MikroRoom server.
# Basic startmikroroom start
# With custom portPORT=8080 mikroroom start
# Pass arguments to Node.jsmikroroom start --inspectmikroroom upgrade
Section titled “mikroroom upgrade”Upgrade to the latest version.
mikroroom upgradeChecks for updates and installs if available.
mikroroom version
Section titled “mikroroom version”Show installed version.
mikroroom version# Output: MikroRoom v1.0.0mikroroom uninstall
Section titled “mikroroom uninstall”Remove MikroRoom from your system.
mikroroom uninstallRemoves installation files but preserves your configuration.
mikroroom docs
Section titled “mikroroom docs”Open documentation in your browser.
mikroroom docsEnvironment Variables
Section titled “Environment Variables”Configure the server via .env file or environment variables.
Server Configuration
Section titled “Server Configuration”Server port number.
- Type: Number
- Default:
3000 - Example:
PORT=8080
PORT=8080 npm startUSE_HTTPS
Section titled “USE_HTTPS”Enable HTTPS server.
- Type: Boolean (
trueorfalse) - Default:
false - Requires:
SSL_CERT_PATHandSSL_KEY_PATH
USE_HTTPS=trueSSL_CERT_PATH
Section titled “SSL_CERT_PATH”Path to SSL certificate file.
- Type: String (file path)
- Required when:
USE_HTTPS=true - Example:
/etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSL_CERT_PATH=/path/to/cert.pemSSL_KEY_PATH
Section titled “SSL_KEY_PATH”Path to SSL private key file.
- Type: String (file path)
- Required when:
USE_HTTPS=true - Example:
/etc/letsencrypt/live/yourdomain.com/privkey.pem
SSL_KEY_PATH=/path/to/key.pemTURN Server Configuration
Section titled “TURN Server Configuration”TURN_SERVER_URL
Section titled “TURN_SERVER_URL”TURN server URL for NAT traversal.
- Type: String (URL)
- Format:
turn:hostname:portorturns:hostname:port - Example:
turn:turn.example.com:3478
TURN_SERVER_URL=turn:turn.yourdomain.com:3478TURN_SERVER_USERNAME
Section titled “TURN_SERVER_USERNAME”TURN server authentication username.
- Type: String
- Required with:
TURN_SERVER_URL
TURN_SERVER_USERNAME=mikroroomTURN_SERVER_CREDENTIAL
Section titled “TURN_SERVER_CREDENTIAL”TURN server authentication password.
- Type: String
- Required with:
TURN_SERVER_URL - Security: Keep secret, don’t commit to git
TURN_SERVER_CREDENTIAL=your-secure-passwordRoom Management
Section titled “Room Management”MAX_LATENT_ROOMS
Section titled “MAX_LATENT_ROOMS”Maximum number of pre-created empty rooms.
- Type: Number
- Default:
10 - Range: 1-1000
MAX_LATENT_ROOMS=20LATENT_ROOM_MAX_AGE_HOURS
Section titled “LATENT_ROOM_MAX_AGE_HOURS”Hours before empty pre-created rooms are cleaned up.
- Type: Number (hours)
- Default:
24 - Range: 1-168 (1 week)
LATENT_ROOM_MAX_AGE_HOURS=48Frontend Configuration
Section titled “Frontend Configuration”Configure via static/mikroroom.config.json or dist/app/mikroroom.config.json.
apiUrl
Section titled “apiUrl”WebSocket URL for signaling server.
- Type: String (WebSocket URL)
- Required: Yes
- Format:
ws://orwss://
{ "apiUrl": "wss://api.yourdomain.com/ws"}Examples:
- Development:
"ws://localhost:3000/ws" - Production:
"wss://yourdomain.com/ws" - Separate API:
"wss://api.yourdomain.com/ws"
iceServers
Section titled “iceServers”Array of STUN/TURN servers for WebRTC.
- Type: Array of ICE server objects
- Optional: Yes (uses default STUN if omitted)
{ "iceServers": [ { "urls": "stun:stun.cloudflare.com:3478" }, { "urls": "turn:turn.yourdomain.com:3478", "username": "mikroroom", "credential": "password" } ]}ICE Server Object:
urls(string or array): STUN/TURN server URLsusername(string, optional): Authentication usernamecredential(string, optional): Authentication password
Common STUN servers:
stun:stun.cloudflare.com:3478stun:stun.l.google.com:19302stun:stun1.l.google.com:19302
NPM Scripts
Section titled “NPM Scripts”Available scripts for development and production.
Development
Section titled “Development”# Watch mode (auto-rebuild on changes)npm run dev
# Watch client onlynpm run dev:client
# Watch server onlynpm run dev:serverBuilding
Section titled “Building”# Full production buildnpm run build
# Development build (no minification)npm run build:dev
# Build client onlynpm run build:client
# Build server onlynpm run build:serverQuality
Section titled “Quality”# Run all testsnpm test
# Tests with coveragenpm run test:coverage
# Check code stylenpm run lint
# Fix code style issuesnpm run lint:fix
# TypeScript type checkingnpm run typecheckRelease
Section titled “Release”# Create release bundlesnpm run release
# Clean build artifactsnpm run cleanDeployment
Section titled “Deployment”# Start production servernpm start
# Build Docker imagenpm run docker:build
# Run Docker containernpm run docker:runConfiguration Examples
Section titled “Configuration Examples”Development
Section titled “Development”.env:
PORT=3000mikroroom.config.json:
{ "apiUrl": "ws://localhost:3000/ws"}Production (Basic)
Section titled “Production (Basic)”.env:
PORT=8080mikroroom.config.json:
{ "apiUrl": "wss://meet.yourdomain.com/ws"}Production (With TURN)
Section titled “Production (With TURN)”.env:
PORT=443USE_HTTPS=trueSSL_CERT_PATH=/etc/letsencrypt/live/yourdomain.com/fullchain.pemSSL_KEY_PATH=/etc/letsencrypt/live/yourdomain.com/privkey.pemTURN_SERVER_URL=turn:turn.yourdomain.com:3478TURN_SERVER_USERNAME=mikroroomTURN_SERVER_CREDENTIAL=strong-password-hereMAX_LATENT_ROOMS=20LATENT_ROOM_MAX_AGE_HOURS=48mikroroom.config.json:
{ "apiUrl": "wss://meet.yourdomain.com/ws", "iceServers": [ { "urls": "stun:stun.cloudflare.com:3478" }, { "urls": "turn:turn.yourdomain.com:3478", "username": "mikroroom", "credential": "strong-password-here" } ]}Behind Reverse Proxy
Section titled “Behind Reverse Proxy”.env (Server runs on HTTP internally):
PORT=3000TURN_SERVER_URL=turn:turn.yourdomain.com:3478TURN_SERVER_USERNAME=mikroroomTURN_SERVER_CREDENTIAL=passwordmikroroom.config.json (Public-facing is HTTPS):
{ "apiUrl": "wss://meet.yourdomain.com/ws", "iceServers": [ { "urls": "stun:stun.cloudflare.com:3478" }, { "urls": "turn:turn.yourdomain.com:3478", "username": "mikroroom", "credential": "password" } ]}Security Considerations
Section titled “Security Considerations”Environment Variables
Section titled “Environment Variables”- Never commit
.envto git (already in.gitignore) - Use strong passwords for TURN credentials
- Rotate credentials regularly
- Use environment-specific
.envfiles
SSL/TLS
Section titled “SSL/TLS”- Use TLS 1.2+ only
- Keep certificates up to date
- Use Let’s Encrypt for auto-renewal
- Configure HSTS headers
Rate Limiting
Section titled “Rate Limiting”Built-in rate limits:
- WebSocket: 10 connections/minute per IP
- Room creation: 10 requests/minute per IP
For additional protection, use:
- Reverse proxy rate limiting (Nginx, Cloudflare)
- CDN with DDoS protection
- IP allowlisting for admin endpoints
Performance Tuning
Section titled “Performance Tuning”Node.js Options
Section titled “Node.js Options”# Increase memory limitNODE_OPTIONS="--max-old-space-size=4096" npm start
# Enable debuggingnode --inspect dist/api/mikroroom.mjsPM2 Configuration
Section titled “PM2 Configuration”module.exports = { apps: [{ name: 'mikroroom', script: './dist/api/mikroroom.mjs', instances: 'max', exec_mode: 'cluster', env: { NODE_ENV: 'production', PORT: 3000 } }]}Start with PM2:
pm2 start ecosystem.config.jsNext Steps
Section titled “Next Steps”- API Reference - HTTP and WebSocket API documentation
- Configuration Guide - Detailed configuration examples