Uptime Kuma on CloudPanel

Uptime Kuma (Japanese freely translated: bear) is an extremely efficient self-hosted and flexible monitoring tool. When monitoring web services, there are a number of options. We're going for a free, quick, and easy option. That is well maintained with a strong constituency. Choose whether this option is the best fit for monitoring your services. We are going to run it on a non Docker environment on the CloudPanel platform.
CloudPanel?
CloudPanel is free, quick and an easy to set up hosting control panel. Has Nginx, Varnish, All Node.js LTS or 'Long Term Support' releases, MariaDB, Python and all the 'current' supported PHP interpreters available. So it's ideal for quickly deploying an Uptime Kuma installation for the purpose as you wish.
Which means eventually: Al projects with different languages and web servers are neatly together on one server. And don't have to run (separate) Nginx, Varnish, Node.js and Python compute instances with a project here and there. We like to keep it clean, simple, without extra debugging in case of.
Uptime Kuma on CloudPanel platform
This section has a number of subsections: Provider, CloudPanel, SSH and website.
Provider
- Link the desired domain or subdomain to your server DNS A/AAAA record.
CloudPanel
- Add a Node.js site based on the previously configured domain or subdomain i.e. (previously. configured.domain).
- We choose Node.js Version: Node 18 LTS
- App Port: 3005
- With a Site User and a Site User Password of choice.
SSH
- SSH login to the server on the console, with the credentials listed above and navigate to the corresponding domain folder.
- Clone the Uptime Kuma source into the navigated folder.
- git clone https://github.com/louislam/uptime-kuma.git ~/htdocs/previously. configured.domain
- Navigate to the folder and use the following commands afterwards to run the project setup, install the latest PM2 daemon process manager and start the Node.js server:
- npm run setup
- npm install pm2@latest -g
- pm2 install pm2-logrotate
- pm2 start server/server.js --name uptime-kuma -- --port=3005
Website
- Browse to the domain or subdomain (https://previously.configured.domain) and configure the APP with language, username and password of your choice.
SSH
Now that everything is running and configured as desired. Is it time to anchor the software. So that the APP starts by default on Node.js at boot.
Return to the SSH console session as started previously.
- pm2 save to save the current APP list.
- Review the current path with echo $PATH
- For example this is our path: PATH=/home/previously-configured-domain/.nvm/versions/node/v18.15.0/bin:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Note that the Node.js version may change over time. - Start the cron editor, i.e. like our editor: crontab -e
- Create a cronjob and save the job. Our cronjob:
@reboot /home/previously-configured-domain/.nvm/versions/node/v18.15.0/bin/node /home/previously-configured-domain/.nvm/versions/node/v18.15.0/bin/pm2 resurrect
CloudPanel
When completed satisfactorily. Finally, the production SSL certificate can be requested. On the panel's SSL/TLS tab, New Let's Encrypt Certificate section.
Update Uptime Kuma
Naturally, updates appear regularly. An update is easy to apply.
- SSH login to the server on the console, with the credentials listed above and navigate to the corresponding domain folder. Where the files are located that should to be updated to the latest version. And download all the files with the command below.
- git fetch --all
- Secure the appropriate branch. The example assumes version 1.20. Change the number to the version of your choice, if needed.
- git checkout 1.18.5 --force
- Use the following command's to download and install any (update-ed) or new -dependencies. If applicable, npm checks this automatically.
- npm install --production and npm run download-dist
- Restart your server: pm2 restart uptime-kuma and you are good to go!
Website
The system can be equipped with various Uptime Kuma Monitor Types, to be added and configured according to your choice and personal taste. For example, an HTTPS, Docker or DNS monitor, to a server or website. Which you like to keep an eye on. With support for various notification services. Including Telegram, Discord, Slack, Mattermost, Pushover, your own email and Microsoft Teams. Means you should never miss an alert message. In case of downtime or other outage-related message. It completes the entire monitor chain. Should you want to analyze visitors in addition to uptime? Plausible offers a free, self-hosted and privacy-friendly option.
Since a lot of software has already gone over from one-time purchase or free to a service model. This software is freely available and does what it is supposed to do. In our opinion, there is no reason to take paid monitor services. Unless it is critical service with upfront strict SLAs (Service level agreement). And you depend on it in any way.
After all, you can get a subscription for anything these days. And although you can easily get a subscription. The question arises whether you really need it.
Some useful link(s)