<\/span><\/h2>\n\n\n\nTo install Apache, execute the following command:<\/p>\n\n\n\n
sudo apt install apache2 -y<\/pre>\n\n\n\nOnce Apache is installed, you can start and enable the service like so:<\/p>\n\n\n\n
sudo systemctl enable apache2 && sudo systemctl start apache2<\/pre>\n\n\n\nCheck if the service is up and running:<\/p>\n\n\n\n
sudo systemctl status apache2<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
root@host:~# sudo systemctl status apache2\n\u25cf apache2.service - The Apache HTTP Server\n Loaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; preset: enabled)\n Active: active (running) since Wed 2023-10-05 06:26:23 CDT; 1 day 5h ago\n Docs: https:\/\/httpd.apache.org\/docs\/2.4\/\n Main PID: 661 (apache2)\n Tasks: 10 (limit: 4644)\n Memory: 29.6M\n CPU: 9.372s\n CGroup: \/system.slice\/apache2.service<\/pre>\n\n\n\n<\/span>Step 3. Install NodeJS<\/span><\/h2>\n\n\n\nTo install NodeJS execute the following command:<\/p>\n\n\n\n
sudo apt install nodejs -y<\/pre>\n\n\n\nTo check the installed NodeJS version, execute the following command:<\/p>\n\n\n\n
node -v\n\nroot@host:~# node -v\nv18.13.0<\/pre>\n\n\n\nAfter successful installation of NodeJS, we need to install NPM as well:<\/p>\n\n\n\n
sudo apt install npm -y<\/pre>\n\n\n\nTo check the installed NPM version execute the following command:<\/p>\n\n\n\n
npm -v\n\nroot@host:~# npm -v\n9.2.0<\/pre>\n\n\n\n<\/span>Step 4. Install Uptime Kuma<\/span><\/h2>\n\n\n\nNow with all the required software installed, we can start to install Uptime Kuma itself. First, we need to clone the Uptime Kuma repository from GitHub:<\/p>\n\n\n\n
cd \/opt\n\ngit clone https:\/\/github.com\/louislam\/uptime-kuma.git<\/pre>\n\n\n\nYou should allow some time for the repo to be cloned into the \/opt<\/b> directory:<\/p>\n\n\n\nroot@host:\/opt# git clone https:\/\/github.com\/louislam\/uptime-kuma.git\nCloning into 'uptime-kuma'...\nremote: Enumerating objects: 28276, done.\nremote: Counting objects: 100% (5082\/5082), done.\nremote: Compressing objects: 100% (446\/446), done.\nremote: Total 28276 (delta 4745), reused 4771 (delta 4619), pack-reused 23194\nReceiving objects: 100% (28276\/28276), 21.69 MiB | 5.30 MiB\/s, done.\nResolving deltas: 100% (21463\/21463), done.<\/pre>\n\n\n\nOnce downloaded, go into the uptime-kuma<\/strong> directory, and install the pm2 production process manager<\/b>:<\/p>\n\n\n\nsudo npm install pm2 -g<\/pre>\n\n\n\nAfter this run the following command for the setup:<\/p>\n\n\n\n
npm run setup<\/pre>\n\n\n\nOnce installed, start the Uptime Kuma<\/strong> server with the following command:<\/p>\n\n\n\npm2 start server\/server.js --name uptime-kuma<\/pre>\n\n\n\nOnce started, you should get the following output:<\/p>\n\n\n\n
[PM2] Spawning PM2 daemon with pm2_home=\/root\/.pm2\n[PM2] PM2 Successfully daemonized\n[PM2] Starting \/opt\/uptime-kuma\/server\/server.js in fork_mode (1 instance)\n[PM2] Done.\n\u2502 id \u2502 name \u2502 namespace \u2502 version \u2502 mode \u2502 pid \u2502 uptime \u2502 \u21ba \u2502 status \u2502 cpu \u2502 mem \u2502 user\n\u2502 0 \u2502 uptime-kuma \u2502 default \u2502 1.23.2 \u2502 fork \u2502 17161 \u2502 0s \u2502 0 \u2502 online \u2502 0% \u2502 42.3mb\u2502 root<\/pre>\n\n\n\nAfter this, we need enable the pm2<\/strong> service to start on system boot with the following command:<\/p>\n\n\n\npm2 startup<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
[PM2] Writing init configuration in \/etc\/systemd\/system\/pm2-root.service\n[PM2] Making script booting at startup...\n[PM2] [-] Executing: systemctl enable pm2-root...\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/pm2-root.service \u2192 \/etc\/systemd\/system\/pm2-root.service.\n[PM2] [v] Command successfully executed.\n+---------------------------------------+\n[PM2] Freeze a process list on reboot via:\n$ pm2 save\n\n[PM2] Remove init script via:\n$ pm2 unstartup systemd<\/pre>\n\n\n\nWith all of the installation done, you can access the Uptime Kuma instance at http:\/\/YourServerIPAddress:3001<\/b>. Keep in mind that you will have to add the port number 3001 at the end of your URL in order for the service to be accessed. <\/p>\n\n\n\n<\/span>Step 5. Set up Apache as a reverse proxy<\/span><\/h2>\n\n\n\nWhile Uptime Kuma is installed, it is not convenient to have to use its port number to access the service. To fix that, we’ll use Apache as the frontend which will sit between the visitor and the Uptime Kuma instance. This also can make your Uptime Kuma instance more secure by restricting access using Apache.<\/p>\n\n\n\n
Apache can be installed using apt install apache2<\/strong> if you don’t have it installed. Enter Apache’s configuration directory and create a configuration file for the Uptime Kuma instance.<\/p>\n\n\n\ncd \/etc\/apache2\/sites-available\/\ntouch kuma.conf<\/pre>\n\n\n\nOpen the file, paste the following lines of code, save the file and close it. Make sure to change yourdomain.com<\/strong> to the domain name you plan to use to access the Kuma instance.<\/p>\n\n\n\n<VirtualHost *:80>\nServerName yourdomain.com<\/b>\nDocumentRoot \/var\/www\/html\/\n\nProxyPass \/ http:\/\/localhost:3001\/\nRewriteEngine on\nRewriteCond %{HTTP:Upgrade} websocket [NC]\nRewriteCond %{HTTP:Connection} upgrade [NC]\nRewriteRule ^\/?(.*) \"ws:\/\/localhost:3001\/$1\" [P,L]\n\nErrorLog ${APACHE_LOG_DIR}\/error.log\nCustomLog ${APACHE_LOG_DIR}\/access.log combined\n\n<\/VirtualHost><\/pre>\n\n\n\n Enable the Apache configuration for Kuma and enable Apache’s rewrite<\/strong>, proxy<\/strong>, and proxy_http<\/strong> modules.<\/p>\n\n\n\na2dissite 000-default.conf\n\nsudo a2enmod rewrite\n\nsudo a2enmod proxy\n\nsudo a2enmod proxy_http\n\nsudo a2ensite kuma.conf<\/pre>\n\n\n\nCheck the syntax:<\/p>\n\n\n\n
apachectl -t<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
root@vps:~# apachectl -t\nSyntax OK<\/pre>\n\n\n\nIf the syntax is OK, restart the Apache service.<\/p>\n\n\n\n
systemctl restart apache2<\/pre>\n\n\n\n<\/span>Step 6. Finish Uptime Kuma installation<\/span><\/h2>\n\n\n\nIf everything is configured properly, you will able to access the Uptime Kuma instance at http:\/\/YourDomainName<\/b>.<\/p>\n\n\n\n <\/figure>\n\n\n\nEnter a username and a strong password.<\/p>\n\n\n\n <\/figure>\n\n\n\nOnce you click on the Create<\/b> button, you will be redirected to the Uptime-Kuma dashboard.<\/p>\n\n\n\n <\/figure>\n\n\n\nCongratulations! In this tutorial, you learned how to install Uptime Kuma on Debian 12. You can now set it up and add the hosts and services you want monitored.<\/p>\n\n\n\n
If you do not want to install Uptime Kuma by yourself, or if you find this setup difficult, you can sign up for one of our VPS plans and our team of expert administrators will do the rest. You’ll also get one of the fastest servers in the Please note, that you can always contact us since we are available 24\/7.<\/p>\n\n\n\n
If you liked this post on how to install Uptime Kuma on Debian 12, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"
In this tutorial, we are going to explain in step-by-step detail how to install Uptime Kuma on Debian 12. Uptime … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":47125,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,2072,13],"tags":[48,324,2040],"yoast_head":"\nHow to Install Uptime Kuma on Debian 12 - RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n