Skip to content

Configuration

SlimRMM is configured through environment variables. This page documents all available options.

Environment Variables

Core Settings

VariableRequiredDefaultDescription
SECRET_KEYYes-JWT signing key. Generate with python -c "import secrets; print(secrets.token_urlsafe(32))"
AGENT_INSTALL_KEYYes-Agent registration key
DEBUGNofalseEnable debug mode (never in production!)
ENVIRONMENTNoproductiondevelopment, staging, or production

Database

VariableRequiredDefaultDescription
DATABASE_URLYes-Database connection string

PostgreSQL (Recommended):

DATABASE_URL=postgresql+asyncpg://user:password@host:5432/dbname

SQLite (Development only):

DATABASE_URL=sqlite+aiosqlite:///./rmm.db

Redis

VariableRequiredDefaultDescription
REDIS_URLYes*-Redis connection string

*Required for production. SQLite mode can work without Redis.

REDIS_URL=redis://localhost:6379/0
REDIS_URL=redis://:password@host:6379/0

JWT & Authentication

VariableRequiredDefaultDescription
JWT_ALGORITHMNoHS256JWT algorithm
ACCESS_TOKEN_EXPIRE_MINUTESNo15Access token lifetime
REFRESH_TOKEN_EXPIRE_DAYSNo7Refresh token lifetime

CORS & Frontend

VariableRequiredDefaultDescription
CORS_ORIGINSNo["*"]Allowed CORS origins (JSON array)
FRONTEND_URLYes-Frontend URL for email links
bash
CORS_ORIGINS=["https://rmm.example.com"]
FRONTEND_URL=https://rmm.example.com

MFA / WebAuthn

VariableRequiredDefaultDescription
MFA_ISSUER_NAMENoSlimRMMTOTP issuer name
WEBAUTHN_RP_IDNo-WebAuthn Relying Party ID (domain)
WEBAUTHN_RP_NAMENoSlimRMMWebAuthn RP display name
bash
WEBAUTHN_RP_ID=rmm.example.com
WEBAUTHN_RP_NAME=SlimRMM Dashboard

PKI / Certificates

VariableRequiredDefaultDescription
PKI_CA_CERT_PATHNo./certs/ca.crtCA certificate path
PKI_CA_KEY_PATHNo./certs/ca.keyCA private key path
PKI_CA_VALIDITY_DAYSNo3650CA certificate validity
PKI_CERT_VALIDITY_DAYSNo365Agent certificate validity

WebRTC / TURN

Required for remote desktop through NAT:

VariableRequiredDefaultDescription
TURN_SERVER_URLNo-TURN server URL
TURN_SERVER_USERNAMENo-TURN username
TURN_SERVER_CREDENTIALNo-TURN password
STUN_SERVERSNo-STUN servers (JSON array)
bash
TURN_SERVER_URL=turn:turn.example.com:3478
TURN_SERVER_USERNAME=user
TURN_SERVER_CREDENTIAL=password
STUN_SERVERS=["stun:stun.l.google.com:19302"]

Rate Limiting

VariableRequiredDefaultDescription
RATE_LIMIT_PER_MINUTENo60Requests per minute per IP

Logging

VariableRequiredDefaultDescription
LOG_LEVELNoINFOLog level: DEBUG, INFO, WARNING, ERROR
LOG_FORMATNojsonLog format: json or text

Example Configuration

Development

bash
# .env
SECRET_KEY=dev-secret-key-change-in-production
AGENT_INSTALL_KEY=dev-agent-key
DATABASE_URL=sqlite+aiosqlite:///./rmm.db
DEBUG=true
ENVIRONMENT=development
FRONTEND_URL=http://localhost:5173
CORS_ORIGINS=["http://localhost:5173"]
LOG_LEVEL=DEBUG

Production

bash
# .env
SECRET_KEY=your-32-char-secret-key-here
AGENT_INSTALL_KEY=your-agent-install-key

DATABASE_URL=postgresql+asyncpg://rmm:password@postgres:5432/rmm
REDIS_URL=redis://redis:6379/0

DEBUG=false
ENVIRONMENT=production

FRONTEND_URL=https://rmm.example.com
CORS_ORIGINS=["https://rmm.example.com"]

MFA_ISSUER_NAME=Your Company RMM
WEBAUTHN_RP_ID=rmm.example.com
WEBAUTHN_RP_NAME=Your Company RMM

PKI_CA_VALIDITY_DAYS=3650
PKI_CERT_VALIDITY_DAYS=365

RATE_LIMIT_PER_MINUTE=60
LOG_LEVEL=INFO
LOG_FORMAT=json

Frontend Configuration

The frontend uses environment variables at build time:

VariableDescription
VITE_API_URLBackend API URL
bash
VITE_API_URL=https://rmm.example.com/api

Agent Configuration

Agent configuration is stored locally after installation:

Linux/macOS: /var/lib/slimrmm/.slimrmm_config.jsonWindows: Registry

json
{
  "server": "https://rmm.example.com",
  "uuid": "agent-uuid-here",
  "mtls_enabled": true,
  "log_level": "info"
}

Security Recommendations

Production Checklist

  1. Generate unique keys - Never use default or example keys
  2. Use PostgreSQL - SQLite is for development only
  3. Enable HTTPS - Required for WebSocket and security
  4. Restrict CORS - Set specific origins, not ["*"]
  5. Set DEBUG=false - Never run debug in production
  6. Configure rate limiting - Prevent abuse
  7. Enable MFA - Require for admin accounts

Validating Configuration

Check if your configuration is valid:

bash
# Docker
docker compose exec backend python -c "from app.core.config import settings; print(settings)"

# Manual
python -c "from app.core.config import settings; print(settings)"

Released under the MIT License.