
Uptime Kuma is a self-hosted monitoring tool that tracks the availability of websites, APIs, TCP ports, DNS records, and other services. It provides a clean dashboard to display uptime metrics and trigger alerts through 90+ notification services, including email, Slack, and Telegram, when a service goes down or recovers.
This article explains how to deploy Uptime Kuma on a Linux server using Docker Compose behind a Traefik reverse proxy.
Before you begin, you need to:
kuma.example.com, pointing to your server's public IP address.docker group to run Docker commands without sudo, then start a new shell session to apply the change.The project directory holds the Docker Compose file, the persistent data directory, and the environment variables shared between the Traefik and Uptime Kuma containers.
Create the project directory.
Enter the project directory.
Create the persistent data directory for Uptime Kuma.
Create the environment variable file.
Add the following variables to the file.
Replace the following placeholders:
kuma.example.com: Your registered domain name pointing to the server's IP address.admin@example.com: Your email address for Let's Encrypt certificate notifications.Save and close the file.
Traefik and Uptime Kuma run as separate containers on a shared Docker network. Traefik terminates TLS on the configured domain and forwards requests to Uptime Kuma's internal port, keeping Uptime Kuma off the public internet entirely.
Create the Docker Compose file.
Add the following configuration.
Save and close the file.
In the above configuration:
traefik: The reverse proxy that listens on ports 80 and 443, redirects all HTTP traffic to HTTPS, and automatically provisions TLS certificates from Let's Encrypt using the HTTP challenge method.uptime-kuma: The monitoring service that stores data in the ./data directory. The Traefik labels configure domain routing, enable HTTPS, and forward traffic to the Uptime Kuma application on port 3001.kuma-net: A shared bridge network that allows Traefik and Uptime Kuma to communicate internally without exposing internal ports to the host.Start all services in detached mode.
Verify that all containers are running.
The output displays two running containers: Traefik and Uptime Kuma.
Uptime Kuma does not report any status information until you create an administrator account and configure at least one monitor.
Open a web browser and navigate to the domain configured in the .env file.
On the database setup page, select SQLite, then click Next. SQLite requires no extra configuration and works with the single-container deployment in this guide. The MariaDB/MySQL option connects to a separate database server that this deployment does not provision.
The account creation page appears. Enter a username, enter a strong password in both the Password and Repeat Password fields, then click Create.
After you create the account, the Uptime Kuma dashboard opens. Click + Add New Monitor.
Configure the monitor settings:
My Website).https://example.com).60.Click Save to activate the monitor. The dashboard adds the monitor with an Unknown status. The status updates to Up or Down after the first heartbeat check runs within 60 seconds.
Uptime Kuma does not send alerts by default. You must configure a notification channel and assign it to individual monitors before it triggers on a status change.
Click the profile avatar in the top-right corner and select Settings.
Navigate to the Notifications tab and click Set Up Notification.
Select a notification type from the dropdown. Supported channels include email (SMTP), Slack, Telegram, Discord, and PagerDuty, among others.
Enter the required credentials or webhook URL of the selected notification channel.
Click Test to send a test notification and verify the configuration is working.
Click Save to confirm the notification setup.
Open the settings for each monitor that should use this notification channel, select the notification from the Notifications list, and click Save.
A status page groups one or more monitors into a public view, separate from the administrator dashboard, so you can share it with users or team members without granting them access to the full Uptime Kuma interface.
Click Status Pages in the top navigation bar.
Click New Status Page.
Enter a Name for the status page (for example, Service Status), then enter a Slug using only lowercase letters, numbers, and hyphens (for example, status creates the URL https://kuma.example.com/status/status). Click Next.
The status page editor opens. The Title field is pre-filled with the name entered in the previous step. Add a Description if needed, then configure the remaining display settings as needed.
Click Add Group to create a section, then use the Add a monitor dropdown to select a monitor and add it to the group.
Click Save to publish the status page.
Open the status page URL in a browser to verify it loads and displays the monitor statuses.
Replace the path with the slug configured in step 3.
You have deployed Uptime Kuma on a Linux server using Docker Compose with Traefik providing TLS termination, and configured a monitor, a notification channel, and a public status page. For more information, see the Uptime Kuma documentation.
0 Comments
Be the first to comment and share your perspective with the community.