Self-Hosted Deployment
Deploy M00N Report on your own infrastructure. Choose from Docker Compose for simplicity, cloud providers for managed infrastructure, or Kubernetes for enterprise scale.
Deployment Options
We provide ready-to-use deployment examples for various platforms. Choose based on your team size, infrastructure, and requirements:
Docker Compose
Simplest option. Single server deployment with all services.
DigitalOcean
Droplet + Spaces. Simple, predictable pricing for startups.
AWS (Simple)
EC2 + S3. Single-server deployment with Terraform.
AWS (Enterprise)
ECS Fargate + RDS + ElastiCache. Multi-AZ, auto-scaling, HA.
Kubernetes / Helm
Enterprise-grade with auto-scaling, HA, and GitOps support.
Prerequisites
- Subscription Token - Get yours at m00nreport.com/self-hosted (30-day free trial included)
- Domain Name - For SSL certificates and accessing the dashboard
- Server / Cloud Account - Based on your chosen deployment option
Installation Guide
The simplest way to get started. Runs all services on a single machine using Docker Compose.
Quick Start
- Get your subscription token from m00nreport.com/self-hosted
- Clone the self-hosted repository
- Configure your environment variables
- Run
docker compose up -d
Example docker-compose.yml
# Simplified example - download the full version for production use
services:
nginx:
image: nginx:alpine
ports:
- "80:80"
depends_on:
- api
- ingest
api:
image: m00nsolutions/m00n-report-api:latest
environment:
SUBSCRIPTION_TOKEN: m00n_sh_your_token_here
DATABASE_URL: postgresql://app_user:app_password@postgres:5432/pwdb
DATABASE_ADMIN_URL: postgresql://pw:your-admin-pass@postgres:5432/pwdb
REDIS_URL: redis://redis:6379
JWT_SECRET: your-secret-key-change-me
APP_BASE_URL: https://m00n.yourcompany.com
# MinIO (S3-compatible storage)
MINIO_ENDPOINT: minio
MINIO_PORT: "9000"
MINIO_USE_SSL: "false"
MINIO_ACCESS_KEY: m00nminio
MINIO_SECRET_KEY: your-minio-password
MINIO_BUCKET: attachments
# SMTP (for password reset)
SYSTEM_SMTP_HOST: smtp.gmail.com
SYSTEM_SMTP_PORT: "587"
SYSTEM_SMTP_USER: your-email@gmail.com
SYSTEM_SMTP_PASSWORD: your-app-password
depends_on:
- postgres
- redis
- minio
ingest:
image: m00nsolutions/m00n-report-ingest:latest
environment:
SUBSCRIPTION_TOKEN: m00n_sh_your_token_here
DATABASE_URL: postgresql://app_user:app_password@postgres:5432/pwdb
DATABASE_ADMIN_URL: postgresql://pw:your-admin-pass@postgres:5432/pwdb
REDIS_URL: redis://redis:6379
JWT_SECRET: your-secret-key-change-me
MINIO_ENDPOINT: minio
MINIO_PORT: "9000"
MINIO_USE_SSL: "false"
MINIO_ACCESS_KEY: m00nminio
MINIO_SECRET_KEY: your-minio-password
MINIO_BUCKET: attachments
depends_on:
- postgres
- redis
- minio
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: pwdb
POSTGRES_USER: pw
POSTGRES_PASSWORD: your-admin-pass
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: m00nminio
MINIO_ROOT_PASSWORD: your-minio-password
ports:
- "9001:9001" # MinIO Console
volumes:
- minio_data:/data
volumes:
postgres_data:
redis_data:
minio_data:Includes docker-compose.yml, env.example, nginx config, and documentation.
Required Environment Variables
| Variable | Description |
|---|---|
SUBSCRIPTION_TOKEN | Your self-hosted license token |
DATABASE_URL | PostgreSQL connection (app_user) |
DATABASE_ADMIN_URL | PostgreSQL connection (admin, for migrations) |
JWT_SECRET | Secret for signing auth tokens |
APP_BASE_URL | Your domain (e.g., https://m00n.company.com) |
MINIO_* | MinIO/S3 config for attachments (screenshots, videos) |
SYSTEM_SMTP_* | SMTP config for password reset emails |
Configuration Reference
Required Settings
| Setting | Description | Example |
|---|---|---|
SUBSCRIPTION_TOKEN | License token | m00n_sh_xxx... |
DATABASE_URL | PostgreSQL connection | postgresql://... |
JWT_SECRET | Auth token secret | 32+ char random string |
APP_BASE_URL | Public URL | https://m00n.co.com |
Optional Settings
| Setting | Description |
|---|---|
SYSTEM_SMTP_HOST | SMTP server for password reset emails |
MINIO_ENDPOINT | S3-compatible storage for attachments |
SSO_* | Enterprise SSO (OIDC/SAML) |
Security Best Practices
- Use HTTPS - All examples include Let's Encrypt auto-configuration
- Secure Secrets - Never commit secrets to version control. Use environment variables or secret managers.
- Database Security - Use separate admin and app users with RLS enabled
- Network Isolation - Kubernetes examples include NetworkPolicy
- Regular Backups - All examples include backup scripts
Getting Help
- Documentation: m00nreport.com/documentation
- License Portal: m00nreport.com/self-hosted
- Email Support: support@m00nreport.com