Skip to main content

Self-Hosted Deployment

Enterprise Feature

Self-hosted deployment is available on the Enterprise plan. Contact enterprise@pingsla.com for a license key.

Self-hosted deployment gives you full control over where PingSLA runs and where your monitoring data is stored.

Architecture​

Your Infrastructure

┌─────────────────────────────────────────────┐
│ Load Balancer (Nginx / AWS ALB) │
│ ├── app.yourdomain.com → Node App │
│ ├── api.yourdomain.com → Node API │
│ ├── status.yourdomain.com → Status Proxy │
│ └── docs.yourdomain.com → Static Docs │
├─────────────────────────────────────────────┤
│ Backend: Node.js + Express │
│ Database: MongoDB (replica set recommended) │
│ Cache: Redis │
│ Queue: Redis BullMQ │
├─────────────────────────────────────────────┤
│ Probe Workers (can be separate VMs) │
│ ├── Probe Region A │
│ └── Probe Region B │
└─────────────────────────────────────────────┘

Prerequisites​

ComponentMinimumRecommended
OSUbuntu 22.04 LTSUbuntu 24.04 LTS
CPU2 vCPU4 vCPU
RAM4 GB8 GB
Disk40 GB SSD100 GB SSD
Node.js20 LTS22 LTS
MongoDB7.07.0 replica set
Redis7.27.2 cluster

Quick Start with Docker Compose​

# Clone the repository (requires Enterprise license)
git clone https://github.com/rizqtekv/pingSLA.git
cd pingSLA

# Copy and configure environment
cp backend/env.example backend/.env
# Edit backend/.env with your configuration

# Start all services
docker compose -f docker-compose.yml up -d

# Check health
docker compose ps
curl http://localhost:5000/health

Environment Variables​

See backend/env.example for the full reference. Key variables:

# Database
MONGODB_URI=mongodb://mongo:27017/pingsla?replicaSet=rs0

# Redis
REDIS_URL=redis://redis:6379

# Application
JWT_SECRET=<strong-random-secret-min-64-chars>
REFRESH_TOKEN_SECRET=<strong-random-secret-min-64-chars>
APP_URL=https://app.yourdomain.com
API_URL=https://api.yourdomain.com

# Email
SMTP_HOST=smtp.yourmailprovider.com
SMTP_PORT=587
SMTP_USER=alerts@yourdomain.com
SMTP_PASS=<smtp-password>
SMTP_FROM=alerts@yourdomain.com

# Telegram (optional)
TELEGRAM_BOT_TOKEN=<your-bot-token>

# License
PINGSLA_LICENSE_KEY=<enterprise-license-key>

Production Nginx Configuration​

See deploy/nginx/ in the repository for the complete Nginx configuration.

Probe Worker Deployment​

Probe workers can run on the same server or on separate, distributed VMs:

# On each probe VM
cd pingSLA/backend
NODE_ENV=production PROBE_REGION=us-east-1 \
node src/workers/probe-worker.js

Updates​

# Pull latest release
git fetch && git checkout <release-tag>

# Rebuild containers
docker compose build

# Rolling restart
docker compose up -d --no-deps backend
docker compose up -d --no-deps workers

Backup​

# MongoDB backup
mongodump --uri="$MONGODB_URI" --out=/backup/$(date +%F)

# Automate with cron
0 2 * * * mongodump --uri="$MONGODB_URI" --out=/backup/$(date +%F) && \
aws s3 sync /backup/ s3://your-backup-bucket/pingsla/

Support​

Enterprise customers receive deployment support via their dedicated account manager. For deployment issues, open a ticket at your enterprise support portal.