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
| Component | Minimum | Recommended |
|---|---|---|
| OS | Ubuntu 22.04 LTS | Ubuntu 24.04 LTS |
| CPU | 2 vCPU | 4 vCPU |
| RAM | 4 GB | 8 GB |
| Disk | 40 GB SSD | 100 GB SSD |
| Node.js | 20 LTS | 22 LTS |
| MongoDB | 7.0 | 7.0 replica set |
| Redis | 7.2 | 7.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.