Host Uptime Kuma on MikroTik RouterOS with Docker 🧐

Uptime Kuma, a self-hosted monitoring tool, offers an intuitive and feature-rich platform for tracking and alerting on the uptime of various network services. Deploying Uptime Kuma on a MikroTik router with an ARM CPU, through Docker containers, can enhance your network management toolkit directly from your routing device. This post will guide you through setting up Uptime Kuma on MikroTik RouterOS, leveraging the power of Docker technology.

Prerequisites

  • A MikroTik router with an ARM CPU and RouterOS v7 or later.
  • Basic understanding of Docker and containerization.
  • Familiarity with MikroTik RouterOS and command-line interface.

Step 1: Preparing Your MikroTik Router

Before diving into the Docker configuration, ensure your MikroTik RouterOS is updated to the latest version to support Docker containers. Access your router via Winbox or SSH and check for updates.

Enable Docker Package

  1. Navigate to System > Packages in Winbox or use the command line:
    /system package update check-for-updates
    /system package update install
    
  2. After updating, enable the Docker package:
    /system package enable docker
    
  3. Reboot your MikroTik device to apply changes.

Step 2: Setting Up Docker on MikroTik

With Docker enabled, it's time to set up the Docker environment on your MikroTik router.

Initialize Docker

  1. Access the terminal on your MikroTik device.
  2. Initialize the Docker daemon:
    /docker init
    
  3. Start the Docker service:
    /docker start
    

Verify Docker Installation

Ensure Docker is running correctly by pulling a test image and running a container:

/docker pull alpine
/docker run alpine echo "Docker on MikroTik works!"

If you see the "Docker on MikroTik works!" message, you're ready to proceed.

Step 3: Deploying Uptime Kuma

Now that Docker is up and running on your MikroTik device, you can deploy Uptime Kuma.

Pull the Uptime Kuma Docker Image

Pull the Uptime Kuma image from Docker Hub:

/docker pull louislam/uptime-kuma:1

Run Uptime Kuma Container

Deploy Uptime Kuma as a Docker container with the following command:

/docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1

This command runs Uptime Kuma in a detached mode, maps port 3001 of the container to port 3001 of the MikroTik router, ensures the container restarts automatically, and persists data in a volume named uptime-kuma.

Step 4: Accessing Uptime Kuma

After deploying the container, you can access Uptime Kuma's web interface:

  1. Open a web browser and navigate to http://<MikroTik-IP-Address>:3001.
  2. You should see the Uptime Kuma setup page. Follow the on-screen instructions to complete the setup.

Step 5: Configuring Uptime Kuma

With Uptime Kuma running, you can start adding monitors for your network services:

  1. Click Add New Monitor.
  2. Select the monitor type (HTTP, PING, etc.), enter the necessary details, and set the monitoring intervals.
  3. Save your configuration.

Uptime Kuma will begin monitoring the specified services and alert you to any downtime or performance issues.

Conclusion

Deploying Uptime Kuma on a MikroTik router with an ARM CPU expands your network monitoring capabilities directly from your router. This setup not only centralizes your network management tasks but also leverages the robustness of MikroTik hardware for continuous monitoring. Whether you're monitoring web services, internal network resources, or internet connectivity, Uptime Kuma on MikroTik offers a powerful, self-hosted solution for ensuring the highest levels of service availability and performance.

Was this page helpful?