Uptime Kuma is a powerful open-source monitoring tool that allows you to track the uptime and performance of your websites and servers. To ensure seamless access and secure the installation, we will use Caddy, a lightweight web server and reverse proxy. This comprehensive guide will walk you through the step-by-step process of Install Uptime Kuma with Caddy on Ubuntu 20.04, enabling you to monitor your websites and servers with ease.
– A Linux VPS server running Ubuntu 20.04 with root access or a user with sudo privileges.
– Minimum of 1 vCPU, 10 GB of storage, and 1 GB of RAM.
– A domain name pointing to your server’s IP address.
To install Caddy, you can follow the following steps in order:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Now that Caddy is installed, we need to configure it to serve Uptime Kuma efficiently.
Open the Caddyfile using the following command:
sudo nano /etc/caddy/Caddyfile
Edit the file with the following content:
your-domain.com {
reverse_proxy localhost:3000
}
Save the file and exit the text editor. (Ctrl+X and then press enter)
Restart the Caddy service using the following command:
sudo systemctl restart caddy
Now, you can Install Uptime Kuma with Caddy on Ubuntu using the following steps.
First, update the server by running the following commands:
sudo apt update sudo apt upgrade
Now, you should install Docker using below command:
apt install docker.io -y
Then, you can create a volume for Uptime Kuma using the following command:
docker volume create uptime-kuma
Start the container:
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
Finally, its time to update Uptime Kuma:
docker pull louislam/uptime-kuma:1
docker stop uptime-kuma
docker rm uptime-kuma
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
At the beginning of this section, we want to configure SSH and firewall. To do this, open the configuration file using the following command:
sudo nano /etc/ssh/sshd_config
Uncomment the following line, then change it to 1337:
#Port 22 To: Port 1337
Save the configuration file and exit.
Reload the sshd service with the help of the following command:
sudo systemctl reload sshd
Finally, you can configure the firewall as follows:
ufw allow 8001/tcp && ufw allow 8001/udp
ufw allow 80/tcp && ufw allow 80/udp
ufw allow 443/tcp
You need to configure Kuma Uptime so that a fully qualified domain name and Cloudflare DNS work. To do this, you can edit the Caddyfile using the following command:
nano /etc/caddy/Caddyfile
Finally, delete the contents of the file completely and replace it with the following commands:
subdomain.domain.com {
reverse_proxy 127.0.0.1:3001
}
With everything configured, access the Uptime Kuma web interface through your domain name:
– Open your preferred browser and enter:
https://your-domain.com
– You will see the Uptime Kuma login page.
– Enter your credentials set during the setup process to log in.
– Explore the web interface and navigate through the various monitoring options.
Congratulations! You have successfully installed Uptime Kuma with Caddy on your Ubuntu 20.04 server. With this comprehensive guide, you can now monitor the uptime and performance of your websites and servers effectively. Remember to regularly update and maintain your monitoring solution for optimal functionality. Happy monitoring!
How useful was this post?
Click on a star to rate it!
Average rating 3.3 / 5. Vote count: 6
No votes so far! Be the first to rate this post.
OpenStack is an open-source cloud computing platform that allows you to create and manage a private ...
In order to have a better understanding of admin RDP, it can be said that admin RDP is part of a lar...
What is your opinion about this Blog?