# UptimeSebi
[](https://git.zb-server.de/ZB-Server/uptimesebi/actions?workflow=ci.yaml) · License: AGPL-3.0-only
UptimeSebi monitors websites, APIs and services from several regions and tells you when they are down, without false alarms from a single checker losing its network: a monitor only counts as down when **every** region it is checked from fails. It publishes status pages that stay online even while UptimeSebi itself is not, and it can run entirely on your own infrastructure.
It is built for teams and hosting providers: organizations with members, roles and SSO, run either as a shared cloud service or self-hosted.

**What it does**
- **Checks:** HTTP(S) with keyword, JSON APIs with conditions on values, Prometheus queries, TCP, TLS certificate expiry, DNS, ICMP; PostgreSQL, MySQL/MariaDB, SQL Server, MongoDB, Redis; MQTT, Kafka, RabbitMQ; gRPC health, SMTP, RADIUS, SNMP; Steam and Minecraft servers; Docker containers; heartbeats pinged by cron jobs, and Prometheus Alertmanager alerts. Credentials are stored encrypted. Platform admins can switch off types an installation cannot offer.
- **Multi-region:** checkers run per region, several per region for load and failover; any number of regions per monitor.
- **Alerting:** incidents with webhooks (signed), email and over 100 services: chat and messengers (Slack, Discord, Microsoft Teams, Telegram, Matrix, WhatsApp gateways, Nostr, …), push (ntfy, Gotify, Pushover, …), SMS and calls (Twilio, Plivo, …), email APIs (SendGrid, Microsoft 365, …) and incident management (PagerDuty, Opsgenie, Grafana OnCall, Jira Service Management, …), plus Apprise; customers bring their own credentials. Confirmations, maintenance windows (one-off or recurring).
- **History:** charts and SLA from one hour to a year, per region; see what the checker saw (redirect chain, timing, certificate, response body).
- **Status pages:** unlimited, custom domains with automatic TLS, themes, Markdown, legal notice; served from cache during outages.
- **Organizations:** members, custom roles scoped to monitor groups or status pages, API tokens, OpenID Connect SSO per organization, sign-up and sign-in with providers such as Google, Microsoft or GitHub, enforced 2FA, audit log.
- **Privacy:** GDPR data export (JSON, PDF) and deletion, also for suspended accounts; legal notice, privacy policy and terms of service, with versioned consent on sign-up and again after material changes; configurable retention, no telemetry.
- **Operations:** three stateless binaries, horizontally scalable; TimescaleDB and Redis (Sentinel supported); OpenAPI documentation.
## Installation
### Requirements
| To run | To develop |
| --- | --- |
| PostgreSQL 16 with TimescaleDB 2.30 | Go 1.27 |
| Redis 8, or Redis with Sentinel | Node.js 20 or newer |
| The container image or the binaries | Docker with Compose |
| | [sqlc](https://sqlc.dev) 1.31 and [golangci-lint](https://golangci-lint.run) 2.12, for `make generate` and `make lint` |
### Run locally
Start PostgreSQL and Redis, build the frontend, create the schema and start the API:
```sh
git clone https://git.zb-server.de/ZB-Server/uptimesebi.git
cd uptimesebi
cp .env.example .env
set -a && . ./.env && set +a
docker compose up -d --wait
npm ci && npm run build
go run ./cmd/api migrate up
go run ./cmd/api
```
Open . On a self-hosted installation the first account also becomes the platform administrator.
Checks need a checker, which talks to the API only. In a second terminal, with the same environment loaded:
```sh
go run ./cmd/api region add local "Local"
export UPTIME_AGENT_TOKEN="$(go run ./cmd/api agent create --kind checker --region local --name local-1)"
go run ./cmd/checker
```
Status pages are served by their own process, on :
```sh
export UPTIME_AGENT_TOKEN="$(go run ./cmd/api agent create --kind statuspage --name local)"
UPTIME_STATUSPAGE_CACHE_DIR=./.statuspage-cache go run ./cmd/statuspage
```
### Run in production
One image contains all three commands; `api` is the default entrypoint. Images are published as `git.zb-server.de/zb-server/uptimesebi:`; pick a channel:
| Tag | Follows |
| --- | --- |
| `latest`, `stable` | the newest release |
| `1.4` | the newest patch release of 1.4 |
| `1.4.2` | exactly that release |
| `beta` | the newest prerelease (`1.5.0-beta.N`) |
| `edge` | every commit on `main` |
Each [release](https://git.zb-server.de/ZB-Server/uptimesebi/releases) also carries Linux binaries (amd64, arm64, armv7, armv6), the changelog, an SPDX SBOM (`sbom.spdx.json`: Go modules and bundled npm packages) and checksums signed with [minisign](https://jedisct1.github.io/minisign/). Verify a download with:
```sh
minisign -Vm SHA256SUMS -P RWRrmAkTu/xZg/o8QCsko5rUujqW/N165cj+dyEcp5CDXPTE2jKbLkyA
sha256sum -c --ignore-missing SHA256SUMS
```
The trusted comment names the release, so a signature cannot be passed off for another one. Or build the image yourself:
```sh
docker build -t uptimesebi .
docker run --rm --env-file .env uptimesebi migrate up # before every rollout
docker run -d --env-file .env -p 8080:8080 uptimesebi
docker run -d -e UPTIME_API_URL=https://uptime.example.com -e UPTIME_AGENT_TOKEN=usa_… \
--entrypoint /usr/local/bin/checker uptimesebi
```
Checkers and status page servers also come as small images of their own, `uptimesebi-checker` and `uptimesebi-statuspage` (same tags), for Linux on amd64, arm64, arm/v7 and arm/v6, so they run on anything from a Raspberry Pi Zero to a server; `docker pull` picks the right one. They contain only the binary, run as an unprivileged user and keep their data in the volume `/var/lib/uptimesebi`:
```sh
docker run -d --restart unless-stopped -e UPTIME_API_URL=https://uptime.example.com -e UPTIME_AGENT_TOKEN=usa_… \
git.zb-server.de/zb-server/uptimesebi-checker:latest
```
The quickest way onto a Linux host with Docker is the install script your platform serves, with its address filled in. It checks the host, writes `/opt/uptimesebi//compose.yaml` and `.env` (the token readable only by root) and starts the agent:
```sh
curl -fsSL https://uptime.example.com/install.sh | sudo sh -s -- checker --token usa_…
curl -fsSL https://uptime.example.com/install.sh | sudo sh -s -- statuspage --token usa_… \
--host status.example.com --tls --email ops@example.com
```
`--help` lists the options: `--manual-updates` for the plain image, `--docker-socket` for checkers answering Docker monitors, `--name` for several agents on one host. To set it up yourself, take the Compose files in [`deploy/agent`](deploy/agent) and put `UPTIME_API_URL` and `UPTIME_AGENT_TOKEN` in a `.env` next to them.
To keep agents up to date without touching them, use the `-autoupdate` variant of the image (`uptimesebi-checker:latest-autoupdate`). Its launcher runs the agent and follows the release your platform runs: it asks the API every 15 minutes, downloads the new agent from the registry for its platform, accepts it only with a valid release signature, swaps the agent gracefully and rolls back if the new one does not become ready. Agents thus never get ahead of the API. The variant is a choice of image, not a setting; the plain image contains no update code. Agents of an installation running an unreleased build stay as they are. Set `UPTIME_AGENT_IMAGE` on the API if agents pull from a mirror.
Docker monitors ask the Docker API of the checker's host. Mount its socket read-only (`-v /var/run/docker.sock:/var/run/docker.sock:ro`) into checkers that may see private networks; shared checkers never use a socket, and installations without one can switch the Docker type off in the admin panel.
All settings are environment variables; [`.env.example`](.env.example) lists them with explanations. In particular:
- `UPTIME_SECRET_KEYS` encrypts stored secrets. Generate one with `echo "k1:$(head -c32 /dev/urandom | base64)"` and keep it safe; rotate by prepending a new key.
- `UPTIME_PUBLIC_URL` is the address users reach the console at.
- `UPTIME_SIGNUP` (`first-user`, `open`, `closed`) decides who may sign up. New accounts confirm their email address before signing in (`UPTIME_SIGNUP_VERIFY`: always in the cloud edition, self-hosted when `UPTIME_SMTP_URL` is set); one account per mailbox, and at most `UPTIME_SIGNUPS_PER_IP` (default 2) a day per client address.
- `UPTIME_TRUSTED_PROXIES` must name your reverse proxy, or client addresses in the audit log and rate limits will be the proxy's.
- `UPTIME_RETENTION_*` set how long results, aggregates, audit entries and captured responses are kept.
### Docker Compose
[`deploy/compose`](deploy/compose) runs everything on one host: the console and API, a migration step before it starts, and optionally TimescaleDB, Redis, a checker and a status page server, each chosen through `COMPOSE_PROFILES` in `.env`:
```sh
cp .env.example .env && chmod 600 .env # fill in UPTIME_PUBLIC_URL, UPTIME_SECRET_KEYS and the passwords
docker compose up -d
```
Leave `db` and `redis` out of the profiles and set `UPTIME_DATABASE_URL` and `UPTIME_REDIS_URL` to use your own. The checker and status page server need a token, created with `docker compose exec api api agent create …` (the comments in `.env.example` show how). Containers run with a read-only root filesystem and without capabilities.
### Kubernetes
The Helm chart in [`deploy/helm/uptimesebi`](deploy/helm/uptimesebi) runs the console and API, and optionally a checker and status page servers in the cluster. Bring your own PostgreSQL with TimescaleDB and your own Redis (directly or through Sentinel). Each release publishes the chart:
```sh
helm repo add uptimesebi https://git.zb-server.de/api/packages/zb-server/helm
helm install uptime uptimesebi/uptimesebi -n uptime --create-namespace \
--set publicURL=https://uptime.example.com \
--set database.url='postgres://uptime:…@db:5432/uptime?sslmode=require' \
--set redis.url='redis://:…@redis:6379/0' \
--set secretKeys.value="k1:$(head -c32 /dev/urandom | base64)" \
--set ingress.enabled=true --set ingress.tls.enabled=true
```
Every setting can come from an existing secret instead (`existingSecret`); [`values.yaml`](deploy/helm/uptimesebi/values.yaml) explains them all. Migrations run as a hook before each install and upgrade. To try it out without a database and Redis of your own, `--set database.bundled.enabled=true --set redis.bundled.enabled=true` adds a single TimescaleDB and Redis, without backups or high availability. Pods run unprivileged with a read-only root filesystem; the API pods need amd64 nodes, checkers and status page servers run on ARM too.
Run as many API, checker and status page instances as you need; they share no local state. The supported setups are:
| Mode | Console and API | Checkers | Status pages |
| --- | --- | --- | --- |
| Cloud | hosted | hosted, organizations may add their own | hosted, organizations may add their own |
| Hybrid | hosted | at the customer | at the customer |
| Self-hosted | at the customer | at the customer | at the customer |
Checkers and status page servers reach the API over HTTPS and never the database, so they can run in other networks.
## Usage
Work in the console, or script everything through the REST API with an API token from **Settings → API tokens**:
```sh
curl -H "Authorization: Bearer ust_…" https://uptime.example.com/api/v1/org/monitors
```
The interactive API documentation is at `/api/docs` of every installation, the OpenAPI 3.1 document at `/api/openapi.json`.
Alert groups bundle notification channels under **Settings → Notifications**. Assign one or
more groups in the monitor editor. Each organization has a default group, automatically
assigned to new monitors and new channels. Existing monitors and channels are migrated
to that group to preserve delivery. The default group can be renamed and its channels
changed, but cannot be deleted. A channel in multiple assigned groups receives each
incident event once. Selecting no groups disables notifications for that monitor. Each group
can also define recurring quiet hours (`quiet_hours`) in a chosen time zone to suppress its
notifications during those periods while incidents continue to be recorded.
The API exposes `/api/v1/org/alert-groups` for managing groups and `alert_group_ids`
on monitor requests and responses. Omit the field when creating a monitor to use the
default; omit it when updating to preserve assignments. Send `[]` to remove them all.
Deleting a custom group removes its assignments without assigning a fallback.
## Examples
Create a monitor that checks a website from two regions every minute:
```sh
curl -X POST https://uptime.example.com/api/v1/org/monitors \
-H "Authorization: Bearer ust_…" -H "Content-Type: application/json" \
-d '{"name": "Shop", "type": "http", "target": "https://shop.example.com",
"interval_seconds": 60, "regions": ["", ""]}'
```
Report a nightly backup to a heartbeat monitor, including failures:
```sh
if backup.sh > /tmp/backup.log 2>&1; then
curl -fsS -m 10 --retry 3 https://uptime.example.com/hb/
else
curl -fsS -m 10 --retry 3 --data-binary @/tmp/backup.log https://uptime.example.com/hb//fail
fi
```
A public status page:

## Development
```sh
make generate # sqlc and templ code
make test # needs the database and Redis from docker compose
make lint
```
The tests run against the `uptime_test` database and Redis database 15 from [`.env.example`](.env.example). CI runs lint, tests, builds and the image for every pull request ([`.gitea/workflows/ci.yaml`](.gitea/workflows/ci.yaml)).
Commits follow [Conventional Commits](https://www.conventionalcommits.org/), which decide the version: `make release` tags the next one on `main` (breaking changes move the major version, before 1.0 the minor one; `feat` the minor, `fix` and `perf` the patch version), `make release CHANNEL=beta` the next prerelease. Pushing the tag publishes the release with its changelog ([`.gitea/workflows/release.yaml`](.gitea/workflows/release.yaml)), signed with the key in the `RELEASE_SIGNING_KEY` secret. To rotate it, create a key with `go run ./tools/release keygen `, add the printed public key to [`internal/signing/release.pub`](internal/signing/release.pub) (keep the old one, so self-updating agents can update across the change) and replace the secret. Code comments, commits and issues are in English; the interface is translated (English and German, `internal/i18n/locales`).
## License
[GNU Affero General Public License v3.0 only](LICENSE) © ZB-Server.
If you run a modified version as a network service, you must offer its source code to its users.
## Contributors and contact
Maintained by ZB-Server. Report bugs and ideas as [issues](https://git.zb-server.de/ZB-Server/uptimesebi/issues); please include the `request_id` from error messages.