Monitoring
    Docker

    Deploy Cabot on a VPS

    Self-hosted infrastructure monitoring with HTTP checks, Graphite metrics, Jenkins integration, and multi-channel alerting — the open-source alternative to PagerDuty and Pingdom.

    At a Glance

    ProjectCabot by Arachnys
    LicenseMIT
    Recommended PlanRamNode Premium KVM 2GB or higher
    OSUbuntu 22.04 / 24.04 LTS
    Default Port5000 (proxied via Nginx)
    StackDocker Compose (Web, Worker, Beat, PostgreSQL, RabbitMQ)
    Estimated Setup Time20–30 minutes

    Prerequisites

    • A RamNode VPS with at least 2 GB RAM and 1 vCPU (Premium KVM 2GB or higher)
    • Ubuntu 22.04 or 24.04 LTS (fresh install recommended)
    • A domain name pointed to your VPS IP via an A record
    • SSH access with a non-root sudo user
    • Basic familiarity with the Linux command line
    1

    Initial Server Setup

    Update and install dependencies
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y curl git ufw

    Configure the Firewall

    UFW rules
    sudo ufw allow OpenSSH
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    sudo ufw enable
    Verify firewall
    sudo ufw status
    2

    Install Docker and Docker Compose

    Install Docker
    curl -fsSL https://get.docker.com | sudo sh
    sudo usermod -aG docker $USER

    Log out and back in (or run newgrp docker) for the group change to take effect.

    Verify installation
    docker --version
    docker compose version
    3

    Clone the Cabot Docker Repository

    Clone repository
    cd ~
    git clone https://github.com/cabotapp/docker-cabot.git
    cd docker-cabot

    This repository contains docker-compose files, a base configuration, and example environment files for production deployment.

    4

    Configure the Environment

    Create environment file
    cp conf/production.env.example conf/production.env
    nano conf/production.env
    conf/production.env
    # Required: Plugin configuration
    CABOT_PLUGINS_ENABLED=cabot_alert_email
    
    # Django settings
    DJANGO_SETTINGS_MODULE=cabot.settings
    DATABASE_URL=postgres://postgres:postgres_password@postgres:5432/postgres
    CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672
    
    # Cabot web URL (used in alert messages)
    WWW_HTTP_HOST=monitor.yourdomain.com
    WWW_SCHEME=https
    
    # SMTP configuration for email alerts
    SES_HOST=smtp.yourdomain.com
    SES_PORT=587
    SES_USER=your_smtp_username
    SES_PASS=your_smtp_password
    CABOT_FROM_EMAIL=cabot@yourdomain.com
    
    # Django secret key (generate a unique random string)
    DJANGO_SECRET_KEY=your-unique-secret-key-here
    
    # Time zone
    TIME_ZONE=America/Chicago

    Generate a strong secret key: python3 -c "import secrets; print(secrets.token_urlsafe(50))"

    Note: If you change the Postgres password in DATABASE_URL, make sure it matches the POSTGRES_PASSWORD in docker-compose.yml.

    5

    Launch Cabot with Docker Compose

    Start all services
    docker compose up -d

    Monitor the startup process:

    View logs
    docker compose logs -f web

    Wait for Gunicorn workers to boot, then verify all containers:

    Check containers
    docker compose ps

    You should see containers for web, worker, beat, postgres, and rabbitmq, all running. Cabot is now listening on 127.0.0.1:5000.

    6

    Install and Configure Nginx

    Install Nginx
    sudo apt install -y nginx
    /etc/nginx/sites-available/cabot
    server {
        listen 80;
        server_name monitor.yourdomain.com;
    
        location / {
            proxy_pass http://127.0.0.1:5000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_read_timeout 90;
        }
    }
    Enable site and reload
    sudo ln -s /etc/nginx/sites-available/cabot /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl reload nginx
    7

    Secure with Let's Encrypt SSL

    Install Certbot and issue certificate
    sudo apt install -y certbot python3-certbot-nginx
    sudo certbot --nginx -d monitor.yourdomain.com

    Verify automatic renewal:

    Check renewal timer
    sudo systemctl status certbot.timer
    8

    Create Your Admin Account

    Navigate to https://monitor.yourdomain.com for the first-time setup screen, or create the admin from the command line:

    Create superuser
    cd ~/docker-cabot
    docker compose exec web python manage.py createsuperuser
    9

    Configure Your First Service Check

    HTTP Check

    Navigate to Checks → HTTP Checks → Create new HTTP check. Enter a name, endpoint URL, expected status code (typically 200), frequency, and importance level.

    ICMP (Ping) Check

    Similar to HTTP checks but only requires a hostname or IP address to verify host reachability.

    Graphite Check

    If running a Graphite/StatsD stack, create checks that alert based on metric thresholds — provide the metric path, threshold value, and alert direction.

    Group Checks into a Service

    Navigate to Services → Create new service. Add your checks, assign alert recipients, and save. Cabot will begin running checks at the configured intervals.

    10

    Set Up Alert Integrations

    Slack Alerts

    conf/production.env (add)
    CABOT_PLUGINS_ENABLED=cabot_alert_email,cabot_alert_slack
    SLACK_ALERT_TOKEN=xoxb-your-slack-bot-token
    SLACK_ALERT_CHANNEL=#alerts

    Twilio (SMS/Phone) Alerts

    conf/production.env (add)
    CABOT_PLUGINS_ENABLED=cabot_alert_email,cabot_alert_twilio
    TWILIO_ACCOUNT_SID=your_account_sid
    TWILIO_AUTH_TOKEN=your_auth_token
    TWILIO_OUTGOING_NUMBER=+1234567890

    Restart the stack after any environment changes:

    Restart Cabot
    cd ~/docker-cabot
    docker compose down
    docker compose up -d
    11

    Ongoing Maintenance

    Updating Cabot

    Update Cabot
    cd ~/docker-cabot
    docker compose pull
    docker compose down
    docker compose up -d

    Backing Up the Database

    Manual backup
    docker compose exec postgres pg_dump -U postgres postgres > cabot_backup_$(date +%Y%m%d).sql

    Automate daily backups with a cron job at 2:00 AM:

    Cron entry
    0 2 * * * cd ~/docker-cabot && docker compose exec -T postgres pg_dump -U postgres postgres > ~/backups/cabot_backup_$(date +\%Y\%m\%d).sql

    Monitoring Resource Usage

    The full stack typically uses 600–800 MB RAM at idle. Monitor with:

    Docker stats
    docker stats --no-stream

    If memory becomes tight, add swap:

    Add swap space
    sudo fallocate -l 2G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab