Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Deploying Uptime Kuma With Docker

  1. About
    1. Prerequisites
  2. Docker Deployment Instructions
  3. Nginx Reverse Proxy Configuration
    1. Trust Forwarding Headers
  4. Resources


Uptime Kuma is an open source project (GitHub) that acts like an uptime monitor similar to uptime Robot. This guide will get you up and running an Uptime Kuma monitoring server in seconds.

For a video providing a lot more information going through Uptime Kuma, feel free to what the youtube video below from Techno Tim.


Docker Deployment Instructions

Create a docker-compose file...

editor docker-compose.yml

... and give it the following contents:

version: "3.8"

    container_name: uptime-kuma
    image: louislam/uptime-kuma:1
    restart: always
      - uptime-kuma:/app/data
      - "80:3001"

    driver: local

Now launch the service by running:

docker-compose up -d

You should now be able to access the service in your browser by going to your server's FQDN or IP. If doing this locally, then it would just be localhost.

Nginx Reverse Proxy Configuration

Below is an example configuration I plugged into my Nginx reverse proxy, which will terminate the HTTPS connection, and allow Uptime Kuma to work with its websockets.

server {
    listen 80;
    access_log  /var/log/nginx/;
    return 302$request_uri;

server {
    listen 443 ssl;

    ssl on;


    access_log  /var/log/nginx/;

    ssl_certificate      /path/to/ssl/site.crt;
    ssl_certificate_key  /path/to/ssl/private.pem;

    ssl_protocols               TLSv1.1 TLSv1.2;
    ssl_ciphers                 RC4:HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;
    keepalive_timeout           60;
    ssl_session_cache           shared:SSL:10m;
    ssl_session_timeout         10m;

    proxy_set_header            Connection '';
    proxy_http_version          1.1;
    chunked_transfer_encoding   off;
    proxy_buffering             off;
    proxy_cache                 off;

    location / {
        proxy_pass    ;
        proxy_http_version      1.1; # 1.1 instead of 1.0 is required for websockets
        proxy_set_header        Upgrade $http_upgrade;
        proxy_set_header        Connection "upgrade";
        proxy_set_header        Host $http_host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto https;
        proxy_set_header        X-Nginx-Proxy true;
        proxy_redirect          off;

Be sure to replace the following in that configuration:

  • - plug in your site's FQDN
  • - replace with the internal IP address of your Uptime Kuma server.
  • /path/to/ssl - replace with the path to the directory containing your SSL certificates for Nginx to use.

Trust Forwarding Headers

If you are using a reverse proxy, don't forget to set the trust forwarded headers in the settings area as shown below:


Last updated: 30th March 2024
First published: 6th October 2021