docker.recipes

Statping-ng Status Page

intermediate

Self-hosted status page with Statping-ng, PostgreSQL, and Slack/Discord notifications.

Overview

Statping-ng is a modern, actively maintained fork of the original Statping status page application that provides comprehensive uptime monitoring and public status page functionality. This open-source solution enables organizations to monitor their services, APIs, and infrastructure while providing transparent communication to users through a clean, customizable status page interface with real-time updates and historical data. This stack combines Statping-ng with PostgreSQL for robust data persistence and NGINX as a reverse proxy to create a production-ready monitoring platform. PostgreSQL's advanced indexing and query capabilities handle the time-series monitoring data efficiently, while NGINX provides SSL termination, caching, and high-performance request handling. The integration supports multiple monitoring protocols including HTTP/HTTPS, TCP, UDP, ICMP ping, and gRPC health checks. This combination is ideal for SaaS companies, API providers, and IT teams who need reliable uptime monitoring with professional status page presentation. The stack excels in environments requiring detailed incident management, automated notifications through Slack or Discord, and historical uptime analytics that stakeholders can access publicly or privately.

Key Features

  • Multi-protocol service monitoring supporting HTTP/HTTPS, TCP, UDP, ICMP ping, and gRPC health checks with customizable intervals
  • PostgreSQL-backed time-series data storage with advanced querying for historical uptime analytics and trend analysis
  • Real-time notification system with Slack, Discord, email, webhook, and SMS integrations for immediate incident alerts
  • Customizable public status pages with incident management, maintenance scheduling, and subscriber notifications
  • NGINX reverse proxy with SSL/TLS termination, request caching, and rate limiting for production-grade availability
  • Advanced monitoring metrics including response time tracking, SSL certificate expiration monitoring, and custom success criteria
  • Multi-user authentication with role-based access control for team collaboration and administrative oversight
  • REST API for programmatic service management and integration with existing monitoring workflows

Common Use Cases

  • 1SaaS companies providing transparent service availability to customers with automated incident communication
  • 2API providers monitoring endpoint health across multiple environments with detailed response time analytics
  • 3E-commerce platforms tracking critical services like payment gateways, checkout flows, and inventory systems
  • 4DevOps teams implementing comprehensive infrastructure monitoring with team notification workflows
  • 5Managed service providers offering uptime monitoring as part of their client service agreements
  • 6Internal IT departments monitoring corporate applications with executive dashboard visibility
  • 7Startup teams establishing professional status page presence for investor and customer confidence

Prerequisites

  • Docker Engine 20.10+ and Docker Compose V2 with 2GB available RAM for PostgreSQL and monitoring data processing
  • Domain name and SSL certificates if exposing the status page publicly through NGINX HTTPS configuration
  • Network access to monitored services and external notification endpoints like Slack webhooks or SMTP servers
  • Basic understanding of PostgreSQL administration for database maintenance and backup procedures
  • Ports 80, 443, and 8080 available on the host system for NGINX and Statping-ng service access
  • SMTP server credentials or webhook URLs configured for notification delivery systems

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 statping:
3 image: adamboutcher/statping-ng:latest
4 environment:
5 DB_CONN: postgres
6 DB_HOST: postgres
7 DB_USER: ${POSTGRES_USER}
8 DB_PASS: ${POSTGRES_PASSWORD}
9 DB_DATABASE: ${POSTGRES_DB}
10 NAME: ${STATUS_PAGE_NAME}
11 DESCRIPTION: ${STATUS_PAGE_DESC}
12 ports:
13 - "8080:8080"
14 volumes:
15 - statping_data:/app
16 depends_on:
17 postgres:
18 condition: service_healthy
19 networks:
20 - statping-net
21 restart: unless-stopped
22
23 postgres:
24 image: postgres:15-alpine
25 environment:
26 POSTGRES_USER: ${POSTGRES_USER}
27 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
28 POSTGRES_DB: ${POSTGRES_DB}
29 volumes:
30 - postgres_data:/var/lib/postgresql/data
31 healthcheck:
32 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
33 interval: 10s
34 timeout: 5s
35 retries: 5
36 networks:
37 - statping-net
38 restart: unless-stopped
39
40 nginx:
41 image: nginx:alpine
42 ports:
43 - "80:80"
44 - "443:443"
45 volumes:
46 - ./nginx.conf:/etc/nginx/nginx.conf:ro
47 - ./certs:/etc/nginx/certs:ro
48 depends_on:
49 - statping
50 networks:
51 - statping-net
52 restart: unless-stopped
53
54volumes:
55 statping_data:
56 postgres_data:
57
58networks:
59 statping-net:
60 driver: bridge

.env Template

.env
1# PostgreSQL
2POSTGRES_USER=statping
3POSTGRES_PASSWORD=secure_postgres_password
4POSTGRES_DB=statping
5
6# Status Page
7STATUS_PAGE_NAME=My Services
8STATUS_PAGE_DESC=Service Status Page

Usage Notes

  1. 1Status page at http://localhost:8080
  2. 2Add services to monitor
  3. 3Supports HTTP, TCP, gRPC, ICMP checks
  4. 4Configure notifications (Slack, Discord, Email)

Individual Services(3 services)

Copy individual services to mix and match with your existing compose files.

statping
statping:
  image: adamboutcher/statping-ng:latest
  environment:
    DB_CONN: postgres
    DB_HOST: postgres
    DB_USER: ${POSTGRES_USER}
    DB_PASS: ${POSTGRES_PASSWORD}
    DB_DATABASE: ${POSTGRES_DB}
    NAME: ${STATUS_PAGE_NAME}
    DESCRIPTION: ${STATUS_PAGE_DESC}
  ports:
    - "8080:8080"
  volumes:
    - statping_data:/app
  depends_on:
    postgres:
      condition: service_healthy
  networks:
    - statping-net
  restart: unless-stopped
postgres
postgres:
  image: postgres:15-alpine
  environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - statping-net
  restart: unless-stopped
nginx
nginx:
  image: nginx:alpine
  ports:
    - "80:80"
    - "443:443"
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
    - ./certs:/etc/nginx/certs:ro
  depends_on:
    - statping
  networks:
    - statping-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 statping:
5 image: adamboutcher/statping-ng:latest
6 environment:
7 DB_CONN: postgres
8 DB_HOST: postgres
9 DB_USER: ${POSTGRES_USER}
10 DB_PASS: ${POSTGRES_PASSWORD}
11 DB_DATABASE: ${POSTGRES_DB}
12 NAME: ${STATUS_PAGE_NAME}
13 DESCRIPTION: ${STATUS_PAGE_DESC}
14 ports:
15 - "8080:8080"
16 volumes:
17 - statping_data:/app
18 depends_on:
19 postgres:
20 condition: service_healthy
21 networks:
22 - statping-net
23 restart: unless-stopped
24
25 postgres:
26 image: postgres:15-alpine
27 environment:
28 POSTGRES_USER: ${POSTGRES_USER}
29 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
30 POSTGRES_DB: ${POSTGRES_DB}
31 volumes:
32 - postgres_data:/var/lib/postgresql/data
33 healthcheck:
34 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
35 interval: 10s
36 timeout: 5s
37 retries: 5
38 networks:
39 - statping-net
40 restart: unless-stopped
41
42 nginx:
43 image: nginx:alpine
44 ports:
45 - "80:80"
46 - "443:443"
47 volumes:
48 - ./nginx.conf:/etc/nginx/nginx.conf:ro
49 - ./certs:/etc/nginx/certs:ro
50 depends_on:
51 - statping
52 networks:
53 - statping-net
54 restart: unless-stopped
55
56volumes:
57 statping_data:
58 postgres_data:
59
60networks:
61 statping-net:
62 driver: bridge
63EOF
64
65# 2. Create the .env file
66cat > .env << 'EOF'
67# PostgreSQL
68POSTGRES_USER=statping
69POSTGRES_PASSWORD=secure_postgres_password
70POSTGRES_DB=statping
71
72# Status Page
73STATUS_PAGE_NAME=My Services
74STATUS_PAGE_DESC=Service Status Page
75EOF
76
77# 3. Start the services
78docker compose up -d
79
80# 4. View logs
81docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/uptime-robot-alternative/run | bash

Troubleshooting

  • Statping service fails to start with database connection error: Verify POSTGRES_USER and POSTGRES_PASSWORD environment variables match between services and ensure PostgreSQL health check passes
  • PostgreSQL container exits with 'database system was shut down' error: Check disk space availability and ensure postgres_data volume has proper write permissions
  • Monitoring checks fail with 'connection refused' errors: Verify target services are accessible from Docker network and check firewall rules blocking container egress traffic
  • NGINX returns 502 Bad Gateway when accessing status page: Confirm Statping container is running on port 8080 and verify nginx.conf upstream configuration points to correct service name
  • Slack notifications not delivering despite successful test: Check webhook URL validity and ensure Statping-ng notification settings have correct channel configuration and message formatting
  • Status page shows incorrect response times or false positives: Adjust monitoring intervals and timeout values in service configuration to account for network latency and service response patterns

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space