M00N ReportSelf-Hosted
Documentation/Self-Hosted Deployment

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.

Easy β€’ ~10 min setup β€’ Any server
πŸ’§

DigitalOcean

Droplet + Spaces. Simple, predictable pricing for startups.

Easy β€’ ~$29/mo β€’ Auto SSL

AWS (Simple)

EC2 + S3. Single-server deployment with Terraform.

Medium β€’ ~$75-100/mo β€’ Terraform

AWS (Enterprise)

ECS Fargate + RDS + ElastiCache. Multi-AZ, auto-scaling, HA.

Advanced β€’ ~$250-320/mo β€’ Full IaC
☸️

Kubernetes / Helm

Enterprise-grade with auto-scaling, HA, and GitOps support.

Complex β€’ Enterprise β€’ ArgoCD

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

  1. Get your subscription token from m00nreport.com/self-hosted
  2. Clone the self-hosted repository
  3. Configure your environment variables
  4. 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:
Download Docker Compose Files

Includes docker-compose.yml, env.example, nginx config, and documentation.

Required Environment Variables

VariableDescription
SUBSCRIPTION_TOKENYour self-hosted license token
DATABASE_URLPostgreSQL connection (app_user)
DATABASE_ADMIN_URLPostgreSQL connection (admin, for migrations)
JWT_SECRETSecret for signing auth tokens
APP_BASE_URLYour domain (e.g., https://m00n.company.com)
MINIO_*MinIO/S3 config for attachments (screenshots, videos)
SYSTEM_SMTP_*SMTP config for password reset emails
Important: MinIO is required for storing test attachments (screenshots, videos, logs). Without it, attachment uploads will fail. SMTP is required for password reset functionality.

Configuration Reference

Required Settings

SettingDescriptionExample
SUBSCRIPTION_TOKENLicense tokenm00n_sh_xxx...
DATABASE_URLPostgreSQL connectionpostgresql://...
JWT_SECRETAuth token secret32+ char random string
APP_BASE_URLPublic URLhttps://m00n.co.com

Optional Settings

SettingDescription
SYSTEM_SMTP_HOSTSMTP server for password reset emails
MINIO_ENDPOINTS3-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