pingtower is a lightweight self-hosted uptime monitor for websites and APIs. It runs as a small Go service, ships with a built-in web dashboard, and stores monitor state locally so you can get started quickly without extra infrastructure.
- Simple self-hosted monitoring for websites and APIs
- Lightweight setup with Go or Docker
- Built-in dashboard for status, history, pause, and remove actions
- JSON file-backed persistence for an easy day-1 developer experience
- Small codebase that is easy to read, extend, and learn from
- Monitor HTTP endpoints on a per-check interval
- Track recent status history for each monitor
- View monitor status and history in a browser dashboard
- Pause and resume polling per monitor
- Remove monitors you no longer need
- Configure expected status code and timeout
- Run locally with Go or in Docker
Open http://localhost:8080 to:
- view all monitors and their current status
- add new monitors from a form
- inspect recent history for an individual monitor
- pause, resume, or remove a monitor from its detail page
The JSON API remains available for scripting and integrations.
git clone https://github.com/crleonard/pingtower.git
cd pingtower
make runThen open http://localhost:8080.
git clone https://github.com/crleonard/pingtower.git
cd pingtower
docker compose up --build| Variable | Default | Description |
|---|---|---|
PINGTOWER_ADDR |
:8080 |
HTTP listen address |
PINGTOWER_DATA_FILE |
data/pingtower.json |
Persistence path |
PINGTOWER_DEFAULT_INTERVAL |
60s |
Default polling interval |
PINGTOWER_DEFAULT_TIMEOUT |
10s |
Default request timeout |
PINGTOWER_MAX_HISTORY |
100 |
Max stored results per check |
PINGTOWER_USER_AGENT |
pingtower/1.0 |
User-Agent header for outbound checks |
Example:
export PINGTOWER_ADDR=":8080"
export PINGTOWER_DATA_FILE="data/pingtower.json"
export PINGTOWER_DEFAULT_INTERVAL="30s"
export PINGTOWER_DEFAULT_TIMEOUT="5s"
make runcurl http://localhost:8080/healthcurl -X POST http://localhost:8080/checks \
-H "Content-Type: application/json" \
-d '{
"name": "Example API",
"url": "https://example.com/health",
"interval_seconds": 60,
"timeout_seconds": 10,
"expected_status_code": 200
}'curl http://localhost:8080/checkscurl http://localhost:8080/checks/<check-id>curl http://localhost:8080/checks/<check-id>/historyRun tests:
go test ./...Build the binary:
go build -o dist/pingtower ./cmd/serverOr use:
make build
make testPingtower currently uses JSON file-backed persistence. That keeps setup simple and makes the project easy to understand, but it is intended as a lightweight v1 storage layer rather than a long-term multi-user backend.
cmd/server application entrypoint
internal/config environment config
internal/httpapi HTTP handlers and dashboard rendering
internal/model shared data models
internal/monitor background polling loop
internal/store file-backed persistence
- Add a manual "check now" action
- Add webhook or email alerts
- Support request headers and auth
- Improve live dashboard updates without full page refresh
- Move persistence to SQLite or Postgres
MIT. See LICENSE.