Skip to content
Projekte

Über uns

Selbst gehostete Verfügbarkeitsüberwachung für HTTP, TCP, DNS, Datenbanken, Kafka und mehr – mit öffentlichen Statusseiten und einem clusterbasierten Modus mit Workern.

Systeme und Infrastruktur

So werden diese Zahlen gemessen

What you can do

  • Many protocols: HTTP/HTTPS, WebSocket, TCP, DNS, ping, SMTP, PostgreSQL, MySQL/MariaDB, Microsoft SQL Server, Oracle Database, Redis, MongoDB, Kafka, RabbitMQ, MQTT, SNMP (v1, v2c, v3), SFTP, Docker containers and Docker Swarm services (setup)
  • Real-time dashboard with response times, uptime history and log export
  • Incidents opened and closed automatically, with the downtime duration, and a CSV export for monthly reports
  • TLS certificate expiry tracking

Gemessener Sternzuwachs

in 24h
0
in 7 days
+1
in 15 days
+7
in 1 month
+40

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original
Logo

Uptime Kotlin

Self-hosted uptime monitoring with public status pages.
One Docker image, ~50 MB of RAM, amd64 and ARM64.

Release License OpenSSF Best Practices Backend CI Frontend CI Stars

Live demo · Demo status page · Quick start · Report Bug · Request Feature

Uptime Kotlin demo: dashboard, creating a monitor with its notifications, monitor details, incidents, announcements and a public status page

Try it

The live demo is read-only: the login form is filled in for you, you can open every page and form, and nothing is saved. It monitors well-known public services, with a few failures on purpose (a 404, a flaky API, an expired certificate) so you can see incidents and alerts.

Prefer the public side? Open the demo status page.

Features

  • Many protocols: HTTP/HTTPS, WebSocket, TCP, DNS, ping, SMTP, PostgreSQL, MySQL/MariaDB, Microsoft SQL Server, Oracle Database, Redis, MongoDB, Kafka, RabbitMQ, MQTT, SNMP (v1, v2c, v3), SFTP, Docker containers and Docker Swarm services (setup)
  • Real-time dashboard with response times, uptime history and log export
  • Incidents opened and closed automatically, with the downtime duration, and a CSV export for monthly reports
  • TLS certificate expiry tracking
  • Notifications: Email, Slack, Discord, Teams, Telegram, Matrix, ntfy, Gotify, PagerDuty, Webhook and native browser notifications (Web Push), with optional reminders while a monitor stays down
  • Public status pages, several per instance, in grid or list layout
  • Maintenance windows, one-off or recurring, that mute alerts
  • Lightweight: a native image that runs in ~50 MB of RAM, on amd64 and ARM64
  • Cluster mode: add workers to spread the checks, with no extra service (the job queue lives in PostgreSQL)
  • Prometheus metrics and a ready-made Grafana dashboard to watch the monitor itself
  • Secure by default: JWT authentication, optional two-factor authentication (TOTP, works with Bitwarden and authenticator apps), stored secrets encrypted with your own key
  • Interface in English, French, German and Spanish
Status page Monitor details
Public status page Monitor details

Quick start

One image runs the web interface, the API and the checks. You only need it and PostgreSQL.

  1. Create a compose.yaml file:
services:
  uptime-kotlin:
    image: ghcr.io/theomeunier/uptime-kotlin:latest
    container_name: uptime_kotlin
    restart: unless-stopped
    mem_limit: 512m
    ports:
      - "8080:8080"
    environment:
      TZ: Europe/Paris
      QUARKUS_DATASOURCE_USERNAME: uptime-kotlin
      QUARKUS_DATASOURCE_PASSWORD: change-me
      QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://postgres:5432/uptime-kotlin
      ENCRYPTION_MASTER_KEY: GENERATE_WITH_openssl_rand
      MP_JWT_VERIFY_ISSUER: https://issuer.uptime-kotlin.com
    depends_on:
      - postgres

  postgres:
    image: postgres:17.4-alpine
    container_name: uptime_kotlin_database
    restart: unless-stopped
    environment:
      POSTGRES_DB: uptime-kotlin
      POSTGRES_USER: uptime-kotlin
      POSTGRES_PASSWORD: change-me
      PGDATA: /var/lib/postgresql/data/pgdata
    volumes:
      - ./storage-db:/var/lib/postgresql/data
  1. Replace ENCRYPTION_MASTER_KEY with the output of openssl rand -base64 32 (the application refuses to start until you do), and both change-me passwords.
  2. Run docker compose up -d.
  3. Open http://localhost:8080 and create your account.

[!TIP] Keep the memory limit: the native heap is sized from the memory the container sees, ~50 MB with a limit, several hundred MB without.

Behind a reverse proxy, forward every path to port 8080 and allow a 300 s read timeout for exports. Keep the Host header, or list the proxy in QUARKUS_HTTP_PROXY_TRUSTED_PROXIES (see Configuration).

Configuration

Variable Default Description
ENCRYPTION_MASTER_KEY (required) At least 32 bytes. Encrypts the stored secrets and the JWT signing key. To change it, see Rotate the master key.
QUARKUS_DATASOURCE_USERNAME
QUARKUS_DATASOURCE_PASSWORD
QUARKUS_DATASOURCE_JDBC_URL
PostgreSQL access.
MP_JWT_VERIFY_ISSUER Issuer of the JWT tokens.
SCHEDULER_STRATEGY database none when workers run the checks (see Cluster mode).
SCHEDULER_WORKER_CONCURRENCY 4 Checks run in parallel.
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING
QUARKUS_HTTP_PROXY_TRUSTED_PROXIES
false
127.0.0.1,::1
Only behind a proxy that changes the Host header: true reads X-Forwarded-Host and X-Forwarded-For, but only from the listed proxy addresses (IPs or CIDR). They choose the custom domain of a status page, so never list addresses that clients can use.
MAINTENANCE_HORIZON_DAYS
MAINTENANCE_MAX_DURATION_HOURS
90, 24 Maintenance windows. Same values on the application and the workers.
NOTIFICATIONS_DISPLAY_TIMEZONE UTC Zone of the dates in Slack, Teams, Telegram, Matrix, ntfy, Gotify, Web Push and e-mail notifications (IANA name, e.g. Europe/Paris). Same value on the application and the workers. Webhook payloads stay in UTC (ISO-8601).
NOTIFICATIONS_DATE_FORMAT see right Format of those dates, as a Java DateTimeFormatter pattern (English words). Default dd/MM/yyyy HH:mm:ss VV. See Notification date format. Same value on the application and the workers.
NOTIFICATIONS_WEB_PUSH_SUBJECT repo URL Contact given to the browser push services with each Web Push notification (mailto:[email protected] or an https:// URL). Same value on the application and the workers. Browser notifications need the interface served over HTTPS (or localhost).
NOTIFICATIONS_PAGERDUTY_EVENTS_URL PagerDuty PagerDuty Events API v2 endpoint (https://events.pagerduty.com/v2/enqueue). Accounts in the EU service region use https://events.eu.pagerduty.com/v2/enqueue. Same value on the application and the workers.
RESET_ADMIN_PASSWORD E-mail of an admin locked out: on startup, its password is replaced by a temporary one printed in the logs, to change at the next sign-in. Its two-factor authentication is turned off too. Remove it once done.
TWO_FACTOR_ISSUER see right Name of the entry created in Bitwarden or the authenticator app when a user turns on two-factor authentication (Uptime Kotlin).
Use your own JWT keys

Set both variables and mount the files: MP_JWT_VERIFY_PUBLICKEY_LOCATION (public key) and SMALLRYE_JWT_SIGN_KEY_LOCATION (private key, PKCS#8).

Cluster mode

Run the uptime-kotlin image with SCHEDULER_STRATEGY: none (it can be replicated behind a load balancer) and add workers. The workers share a job queue stored in PostgreSQL, no extra service is needed.

uptime-kotlin-worker:
  image: ghcr.io/theomeunier/uptime-kotlin/worker:latest
  container_name: uptime_kotlin_worker
  restart: unless-stopped
  environment:
    TZ: Europe/Paris
    SCHEDULER_STRATEGY: database
    SCHEDULER_WORKER_NAME: worker-primary
    SCHEDULER_WORKER_CONCURRENCY: "4"
    QUARKUS_DATASOURCE_USERNAME: uptime-kotlin
    QUARKUS_DATASOURCE_PASSWORD: change-me
    QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://postgres:5432/uptime-kotlin
    ENCRYPTION_MASTER_KEY: GENERATE_WITH_openssl_rand
  depends_on:
    - uptime-kotlin

SCHEDULER_WORKER_NAME must be unique per worker. Checks left by a stopped worker are picked up by the others after 30 seconds.

Rotate the master key

  1. Generate a new key (openssl rand -base64 32).
  2. On the application and every worker: put the new key in ENCRYPTION_MASTER_KEY and the old one in ENCRYPTION_PREVIOUS_MASTER_KEYS (comma-separated if there are several).
  3. Restart. On startup the application re-encrypts every stored secret with the new key and logs Re-encrypted N stored secret(s). A warning lists the secrets no key could decrypt, to be re-entered.
  4. Remove ENCRYPTION_PREVIOUS_MASTER_KEYS at the next deployment.

A lost key cannot be recovered: the secrets it encrypted must be re-entered, and the jwt_signing_keys row deleted (this signs everyone out).

Images

Image Role
ghcr.io/theomeunier/uptime-kotlin Web interface, API and monitoring checks
ghcr.io/theomeunier/uptime-kotlin/worker Monitoring checks only (cluster mode)

Both run on linux/amd64 and linux/arm64 (64-bit OS only).

Build the images yourself

Native compilation needs about 8 GB of RAM for Docker.

docker build -f docker/all-in-one/Dockerfile.native -t uptime-kotlin:local .
docker build -f docker/worker/Dockerfile.native -t uptime-kotlin-worker:local .

Built With

Kotlin · Quarkus (GraalVM native image) · React · PostgreSQL · Docker

Contributing

Contributions are welcome! Read CONTRIBUTING.md, then:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a pull request

You can also open an issue with the enhancement label. If you like the project, a ⭐ helps a lot!

Security

To report a vulnerability, please do not open a public issue: see SECURITY.md.

License

Distributed under the MIT License. See LICENSE for more information.

Ähnliche Projekte entdecken

Wird geladen…