Deployment Overview of Uptime Kuma on Server¶
Prerequisites and Basic Requirements¶
To successfully run the application, the following requirements must be met:
-
Operating System: Ubuntu (specifically for the primary application container deployment).
-
Privileges: Root or sudo access is required for installing Docker and managing containers.
-
Ports:
-
Port
3000(Internal) -
Port
443(External/HTTPS)
FQDN of the final panel on the hostkey.in domain¶
The application is accessible via a specific subdomain generated based on your server ID.
| Parameter | Value |
|---|---|
| Prefix | uptime-kuma |
| Domain | hostkey.in |
| Full template | uptime-kuma{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The deployment utilizes the following directory structure for configuration, data persistence, and proxy management:
-
/opt/uptime-kuma/data: Persistent storage for Uptime Kuma application data. -
/root/nginx: Contains the Nginx Docker Compose configuration. -
/data/nginx/user_conf.d: Directory containing custom Nginx configuration files. -
/data/nginx/nginx-certbot.env: Environment file for the Nginx container.
Application installation process¶
The application is deployed using a combination of system package management and Docker containers:
-
System Dependencies: The server environment is prepared by installing the Docker engine.
-
Application Deployment: The Uptime Kuma service is launched as a Docker container using the
louislam/uptime-kuma:1image. -
Proxy Setup: An Nginx proxy with Certbot integration is deployed via Docker Compose to handle SSL termination and routing.
Access Rights and Security¶
-
Firewall: The application relies on port
443for secure external access. -
Container Networking:
-
The Uptime Kuma container uses
hostnetwork mode to communicate directly with the host's network interface. -
The Nginx container also operates in
hostnetwork mode to manage incoming traffic on standard web ports.
Docker Containers and Their Deployment¶
The deployment consists of two primary containers:
Uptime Kuma Container¶
-
Image:
louislam/uptime-kuma:1 -
Hostname:
uptime-kuma{Server_ID_from_Invapi}.hostkey.in -
Network Mode:
host -
Environment Variables:
-
UPTIME_KUMA_PORT:3000 -
Volumes:
-
/opt/uptime-kuma/datamapped to/app/data -
Restart Policy:
always
Nginx Certbot Container¶
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Environment Variables:
-
CERTBOT_EMAIL:[email protected] -
Volumes:
-
nginx_secrets(external volume) mapped to/etc/letsencrypt -
/data/nginx/user_conf.dmapped to/etc/nginx/user_conf.d -
Restart Policy:
unless-stopped
Application Update Instructions¶
To update the Uptime Kuma application, perform the following steps:
-
Pull the latest image for the application:
-
Restart the container to apply changes (if not using a management script):
Location of configuration files and data¶
| Data Type | Path |
|---|---|
| Uptime Kuma Application Data | /opt/uptime-kuma/data |
| Nginx Configuration Files | /data/nginx/user_conf.d |
| Nginx Environment Variables | /data/nginx/nginx-certbot.env |
| Docker Compose File (Nginx) | /root/nginx/compose.yml |
Available ports for connection¶
-
HTTPS:
443(via Nginx Proxy) -
Internal Application Port:
3000
Starting and Stopping the application¶
The containers are configured to manage their own lifecycle, but manual control can be exercised via Docker commands:
To stop the application:
To start the application:
Proxy Servers¶
The deployment uses an Nginx container (via jonasal/nginx-certbot) acting as a reverse proxy. It is configured to:
-
Handle SSL certificates via Certbot for the domain
uptime-kuma{Server_ID_from_Invapi}.hostkey.in. -
Route incoming traffic from port
443to the internal application port3000.