Deployment Overview of Uptime Kuma on Server¶
Prerequisites and Basic Requirements¶
To ensure the application functions correctly, the following requirements must be met:
-
Operating System: Ubuntu (or compatible Linux distributions).
-
Privileges: Root or sudo access is required for service installation and Docker management.
-
Ports:
-
3000: Internal application port. -
443: External HTTPS traffic port.
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}.hostkey.in |
File and Directory Structure¶
The deployment utilizes the following directory structure for configuration and data persistence:
-
/opt/uptime-kuma/data: Main application data storage. -
/root/nginx: Configuration directory for the Nginx reverse proxy. -
/data/nginx/user_conf.d: Custom Nginx user configurations. -
/data/nginx/nginx-certbot.env: Environment variables for SSL certificate management.
Application Installation Process¶
The installation is performed using a combination of system package management and Docker:
-
Docker Engine: The Docker runtime environment is installed on the host system to manage application containers.
-
Application Deployment: The Uptime Kuma service is deployed as a Docker container using the
louislam/uptime-kuma:1image. -
Reverse Proxy Setup: An Nginx container is configured via Docker Compose in
/root/nginx/compose.ymlto handle SSL termination and traffic routing.
Access Rights and Security¶
-
Firewall: The system must allow incoming traffic on port
443(HTTPS). -
Container Isolation: The application runs within a Docker container with the host network mode enabled for direct communication where necessary.
-
SSL/TLS: SSL certificates are managed via Certbot to ensure all web traffic is encrypted.
Docker Containers and Their Deployment¶
The deployment consists of two primary containers:
Uptime Kuma Container¶
-
Image:
louislam/uptime-kuma:1 -
Container Name:
uptime-kuma{Server_ID}.hostkey.in -
Network Mode:
host -
Ports: Internal port
3000is mapped via host networking. -
Volumes:
/opt/uptime-kuma/data:/app/data -
Environment Variables:
-
UPTIME_KUMA_PORT=3000 -
Restart Policy:
always
Nginx Certbot Container¶
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d -
Restart Policy:
unless-stopped
Application Update Instructions¶
To update the Uptime Kuma application, perform the following steps:
-
Navigate to the directory containing the container configuration (if using compose) or pull the latest image.
-
For this deployment, execute the following commands to refresh the application container: