Selfhosting Uptime Kuma

Guide to Self-Hosted Monitoring


Selfhosting Uptime Kuma

Uptime Kuma is a powerful, open-source monitoring tool that ensures optimal website and service uptime by providing comprehensive monitoring and alerting features. This versatile solution allows users to keep track of their digital infrastructure, ensuring they're aware of any downtime before it impacts customers.

Key Features and Uses

Uptime Kuma offers a wide range of monitoring capabilities, making it an essential tool for website owners, system administrators, and DevOps professionals :-

  • Multi-Protocol Monitoring: Supports HTTP(s), TCP, DNS, and other protocols.
  • Docker Container Monitoring: Keeps track of containerized applications.
  • SSL Certificate Monitoring: Alerts on impending certificate expirations.
  • Customizable Alerts: Allows for tailored notification settings.
  • Status Page Creation: Enables transparent communication with users.

Self-Hosting Guide

Let's explore different methods to self-host Uptime Kuma on your own infrastructure.

Docker Installation

Docker provides the simplest method for deploying Uptime Kuma :-

For Linux/Mac:

  1. Download the Docker Compose file using wget:
    wget https://github.com/tejaswisingh/homelab-templates/blob/main/docker-compose/uptime-kuma/docker-compose.yml
  2. Start the container:
    docker compose up -d

For Windows:

  1. Create a new file named docker-compose.yml.

  2. Copy and paste the compose content from Homelab Templates git repository into the file.

  3. Save the file.

  4. Open a command prompt in the directory containing the docker-compose.yml file.

  5. Start the container:

    docker compose up -d

Lastly, access Uptime Kuma at http://your-local-ip-here:3001

Node.js Installation

For those preferring a non-Docker setup, here's how to install Uptime Kuma using Node.js :-

  1. Install Node.js and npm (if not already installed)

  2. Clone the repository:

    git clone https://github.com/louislam/uptime-kuma.git
    cd uptime-kuma
  3. Set up the application:

    npm run setup
  4. Start Uptime Kuma:

    node server/server.js
  5. For background running, use PM2:

    npm install pm2 -g
    pm2 start server/server.js --name uptime-kuma

Configuring Uptime Kuma

After installation, access the Uptime Kuma web interface and follow these steps :-

  1. Create an admin account with a strong password.
  2. Add monitors for your services:
    • Click "Add New Monitor".
    • Select the monitor type (e.g., HTTP(s)).
    • Enter the necessary details (URL, checking interval, etc.).
    • Save the monitor.

Setting Up Notifications

Uptime Kuma supports various notification methods. Here's how to set up email notifications :-

  1. Go to "Settings" > "Notification".
  2. Choose "Email (SMTP)" as the notification type.
  3. Enter your SMTP server details and credentials.
  4. Test the configuration.
  5. Save and enable notifications for your monitors.

By following this guide, you can harness the power of Uptime Kuma to maintain high availability and performance for your digital services. Whether you choose Docker, Node.js, or a distribution-specific installation, Uptime Kuma provides a robust solution for monitoring your infrastructure.