Dokku is an open-source, self-hosted Platform-as-a-Service built on Docker. It gives you a Heroku-like git push deployment experience on your own VPS. Once your apps are deployed on Dokku, you need external uptime monitoring. Here's how to set it up with Vigilmon.
Why Dokku Apps Need External Monitoring
Dokku handles deployment but doesn't provide:
- Email alerts when your app crashes
- Uptime tracking over time
- External health verification (checks from outside your VPS)
Dokku's built-in dokku ps:report shows running containers, but it doesn't alert you when an app goes down. You need an external monitor.
Adding Health Endpoints to Your App
Before monitoring, make sure your app exposes a health check route.
Node.js/Express:
app.get('/health', (req, res) => {
res.json({ status: 'ok' })
})
Django/Python:
# urls.py
from django.http import JsonResponse
def health(request):
return JsonResponse({'status': 'ok'})
urlpatterns = [
path('health/', health),
]
Ruby on Rails:
# routes.rb
get '/health', to: proc { [200, {}, ['{"status":"ok"}']] }
Static sites: Just monitor the root URL or index.html — any 200 response works.
Dokku App URLs
Dokku assigns URLs based on your app name and VPS domain:
# Default URL pattern
http://app-name.your-vps-domain.com
# Custom domain (configured with dokku domains:add)
https://yourdomain.com
To see your app's URL:
dokku domains:report your-app-name
Setting Up Vigilmon for Dokku
Sign up free at vigilmon.online
Create a new monitor:
| Setting | Value |
|---|---|
| URL | https://yourdomain.com/health |
| Method | GET |
| Interval | 60 seconds |
| Expected status | 200 |
| Keyword | ok |
- Add email alert, save.
Vigilmon starts checking immediately from external servers.
Monitoring Multiple Dokku Apps
If you run multiple apps on your Dokku VPS, create a Vigilmon monitor for each:
| App | Monitor URL |
|---|---|
| API service | https://api.yourdomain.com/health |
| Web app | https://app.yourdomain.com |
| Admin panel | https://admin.yourdomain.com/health |
| Background worker | https://worker.yourdomain.com/health |
Vigilmon's free tier covers 5 monitors — enough for most Dokku setups.
Using Dokku's Built-In Checks
Dokku has a checks file you can add to your repo for zero-downtime deploys:
# CHECKS (in repo root)
WAIT=10
ATTEMPTS=6
/health Application is healthy
This is for deployment health gates — Dokku checks the endpoint before swapping traffic to the new container. But it doesn't provide ongoing monitoring or alerts. Combine both:
-
CHECKSfile: ensures healthy deploys - Vigilmon: detects post-deploy regressions and runtime failures
Monitoring the Dokku Host Itself
If your VPS host goes down, all apps go down simultaneously. Add a host-level check:
URL: http://your-vps-ip:2375/version ← (Docker API if exposed)
Or simply monitor a canary endpoint on the host — if any app responds, the host is up.
For full host monitoring, consider also using Vigilmon to check SSH port availability (TCP check, if supported by your Vigilmon tier).
SSL Certificate Monitoring
Dokku can auto-provision Let's Encrypt SSL via dokku-letsencrypt. But certificates expire if renewal fails. Watch for:
# Check cert expiry
dokku certs:report your-app-name
Vigilmon automatically alerts on SSL errors when it hits an HTTPS URL — if your cert expires, your monitor will fail with an SSL error, alerting you immediately.
Common Dokku Failure Scenarios Vigilmon Catches
| Failure | How Vigilmon Detects |
|---|---|
| Container OOM kill | Health check fails (503) |
| App crash (uncaught exception) | No response / 5xx |
| Database connection lost | Health check returns 503 (if DB check included) |
| Port conflict after redeploy | No response |
| Failed Let's Encrypt renewal | SSL error on HTTPS check |
| VPS out of memory | All checks fail simultaneously |
Handling Zero-Downtime Deploys
During a Dokku zero-downtime deploy, there's a brief window where requests may be served by either the old or new container. To avoid false alerts:
- Configure
WAIT=10in yourCHECKSfile (gives 10s for health to stabilize) - In Vigilmon, set alert threshold to 2 consecutive failures — this avoids alerting on the brief deployment gap
Summary
Monitoring Dokku apps is straightforward:
- Add
/healthroute to each app - Find your Dokku app URL:
dokku domains:report app-name - Create Vigilmon monitors for each app
- Alert on 2 consecutive failures (avoids deploy noise)
Your self-hosted apps deserve the same monitoring quality as cloud deployments.
Top comments (0)