uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

Easier way to install on Plesk

Open EinfachKonrad opened this issue 3 years ago • 2 comments

⚠️ Please verify that this feature request has NOT been suggested before.

  • [X] I checked and didn't find similar feature request

🏷️ Feature Request Type

Other

🔖 Feature description

I tried to install it on Plesk, buit without the docker addon did it not work.

✔️ Solution

Just an final "ready-to-config"-website-directory, which i can put into the folder of the site and work with it!

❓ Alternatives

No response

📝 Additional Context

No response

EinfachKonrad avatar Feb 05 '22 11:02 EinfachKonrad

Well you have 2 options.. install with or without docker. And in Plesk it is actually easy to do with either options...

In either case however, you need to install dependencies - Docker or NPM...

rezzorix avatar Feb 06 '22 14:02 rezzorix

⚠️ Please verify that this feature request has NOT been suggested before.

  • [x] I checked and didn't find similar feature request

🏷️ Feature Request Type

Other

🔖 Feature description

I tried to install it on Plesk, buit without the docker addon did it not work.

✔️ Solution

Just an final "ready-to-config"-website-directory, which i can put into the folder of the site and work with it!

❓ Alternatives

No response

📝 Additional Context

No response

Can u help me install it on plesk?

papahausa avatar Jan 08 '23 15:01 papahausa

What is your OS & version? What is your Plesk version?

Do you have SSH-access to the server?

If no: Do you have any of the following extensions installed in Plesk?

  • SSH Terminal (https://www.plesk.com/extensions/ssh-terminal/)
  • Docker (https://www.plesk.com/extensions/docker/)

rezzorix avatar Jan 09 '23 15:01 rezzorix

Close as current README.md is already the easier way.

Plesk is mainly for PHP apps only, Uptime Kuma is a Node.js app.

louislam avatar Jan 09 '23 16:01 louislam

Plesk is mainly for PHP apps only, Uptime Kuma is a Node.js app

Sorry, thats not correct @louislam

Plesk is a server / hosting management frontend. You fully manage servers with that; it is equivalent to cpanel or similar and is standard with a lot vserver / ded. server providers.

So question could be relevant for some people.

rezzorix avatar Jan 09 '23 16:01 rezzorix

Just an final "ready-to-config"-website-directory, which i can put into the folder of the site and work with it

Since op was asking for drag-and-drop files into a folder like the PHP way, I think it is a impossible feature-request.

If @papahausa need help, I would suggest you should open a new thread with proper info.

louislam avatar Jan 09 '23 18:01 louislam

What is your OS & version? What is your Plesk version?

Do you have SSH-access to the server?

If no: Do you have any of the following extensions installed in Plesk?

  • SSH Terminal (https://www.plesk.com/extensions/ssh-terminal/)
  • Docker (https://www.plesk.com/extensions/docker/)

Plesk: 18.0.49 Docker extension installed. https://prnt.sc/FXIlOF7nLm1V Do you have SSH-access to the server? - yes, i have.

https://prnt.sc/kqDadb1zWld_ looks like work, but how assign it to subdomain with ssl?

papahausa avatar Jan 12 '23 23:01 papahausa

It took me some hours but now I have uptime-kuma running on Plesk without any SSH access or docker installation.

I'm not sure why I have to do the round-trip with the local machine, Plesk creates a own git-folder in a parent directory, but this folder does not work if I copy it into the newly created .git folder in the main folder of uptime-kuma.

Anyway...

Here is the how to run Uptime Kuma on Plesk v18.0.52 (or later), in my case on AlmaLinux 9.1:

Preparations on your local machine:

  1. Install Git on your PC
  2. Clone the uptime-kuma repository with the following command git clone https://github.com/louislam/uptime-kuma.git
  3. The .git folder in the newly created folder will be needed to be uploaded to the server (see below)

Preparations on your Plesk Server:

  1. Install Git Extension
  2. Install Node.js Extension

Installing uptime-kuma on your Plesk Server:

  1. Create a new webspace with Node.js enabled
  2. Add SSL-Certificate via Let's Encrypt or your own certificate
  3. Go to "Apache & nginx" Settings and change the following:
    • Untick "Proxy Mode"
    • Add the following as additional nginx directives:
      location ~ /(node|socket.io) {
       	proxy_set_header X-Real-IP $remote_addr;
       	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       	proxy_set_header Host $host;
       	proxy_http_version 1.1;
       	proxy_set_header Upgrade $http_upgrade;
       	proxy_set_header Connection "upgrade";
      }
      
  4. Go to the Git Extension and add the repository with the following settings:
    • Repository URL: https://github.com/louislam/uptime-kuma.git
    • Repository Name: uptime-kuma.git
    • Server path: /httpdocs
  5. Go to the files and open the httpdocs folder, now you should see the cloned repository
  6. Upload the whole ".git"-folder from your local machine into the /httpdocs/ folder
  7. Go to the Node.js settings and use the following settings:
    • Node.js Version: 18.16.0
    • Package Manager: npm
    • Document Root: /httpdocs/server
    • Application Mode: production
    • Application Root: /httpdocs
    • Application Startup File: server/server.js
    • Custom env. variable: Variable: name Value: uptime-kuma
  8. Click "Enable Node.js"
  9. Open the "Run Node.js commands" Tab and enter the following commands one by one install run setup
  10. Installation finished!

You can now open the URL and start to create the user.

[!TIP] If you're stuck on the /dashboard path you have to wait a little bit or restart the app in the Node.js settings. Then you should be redirected to the /setup path.

[!TIP] Update uptime-kuma on your Plesk Server:

  1. Select the uptime-kuma webspace
  2. Create a fresh backup (Click "Backup & Restore", Click "Back up", Select Full, give it a description, Click "OK")
  3. Go to the Git Extension
  4. Click "Pull now"
  5. Go to the Node.js Extension
  6. Open the "Run Node.js commands" Tab and enter the following commands one by one install --production run download-dist
  7. Open the "Dashboard" Tab and Click "Restart App"
  8. Update finished!

After the first request the app will be restarted and you should have the latest version installed.

Dudebaker avatar May 02 '23 12:05 Dudebaker

Thanks for the guide! It helped a lot by setting it up on my webhosting. However, my hoster does not allow nginx directives. Is it possible to use apache to pass the requests to kuma?

I actually tried it myself and came up with this guide. So, I added the following .htaccess file to the server folder:

#ProxyPass / http://localhost:3001/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) http://localhost:3001/$1 [P,L]

#ProxyPass /node http://localhost:3001/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /node/(.*) ws://localhost/node/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /node/(.*) http://localhost/node/$1 [P,L]

#ProxyPass /socket.io http://localhost:3001/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /socket.io/(.*) ws://localhost/socket.io/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /socket.io/(.*) http://localhost/socket.io/$1 [P,L]

The problem is, Plesk uses Passenger to run Node.js apps, and therefore, the app uses a dynamic port. Resulting in an error when trying to access the dashboard/setup page:

(111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3001 (*) failed
AH01114: HTTP: failed to make connection to backend: localhost, referer: https://<mydomain>/setup

Any idea, anyone?

chrsdrdt avatar Oct 16 '23 15:10 chrsdrdt

@chrsdrdt Unfortunately I searched for a solution to install on plesk but I might help with your problem too: Try to replace "localhost" with your real IP address. Attempt to connect to 127.0.0.1:3001" refers to "Attempt to connect to localhost".

Thoomaastb avatar Oct 16 '23 16:10 Thoomaastb

Thanks for the quick response. That would have been an easy fix, but unfortunately, the same error appears with my IP instead of localhost. I think the problem is that the port is incorrect due to Passenger, but I don't know how to refer to it in my .htaccess.

chrsdrdt avatar Oct 16 '23 18:10 chrsdrdt

I got this error when I tried npm install

npm ERR! code 127
npm ERR! path /var/www/vhosts/uptime-kuma/node_modules/ssh2
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! sh: 1: node: not found

Any ideas?

vesvello avatar Mar 11 '24 19:03 vesvello

Please post full details with your environment and what you did to get there in a separate issue. Necroposting like this is not maintainable.

My idea would be that node is not found. => you need to install that ^^

CommanderStorm avatar Mar 11 '24 19:03 CommanderStorm

I hope this helps

WhatsApp Image 2024-03-11 at 15 28 18 WhatsApp Image 2024-03-11 at 15 31 07
Log output

Process exited with non-zero exit code '127'

npm WARN deprecated [email protected]: Use promise-toolbox/fromEvent instead
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/joi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated @azure/[email protected]: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated @azure/[email protected]: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 127
npm ERR! path /var/www/vhosts/cl*********mx/uptime.cloudpos.mx/uptime-kuma/node_modules/ssh2
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! sh: 1: node: not found

npm ERR! A complete log of this run can be found in: /var/www/vhosts/cl********x/public_html/deliverapp/.npm/_logs/2024-03-11T21_28_48_209Z-debug-0.log

vesvello avatar Mar 11 '24 21:03 vesvello

I asked for full context in a different issue for a reason.

Currently, you have posted the state you are in. You have omitted:

  • what your concrete environment is
  • what happened before
    • what guide did you follow?
    • Have you gone back and made sure that no steps were skipped?
  • what you have tried already

CommanderStorm avatar Mar 12 '24 02:03 CommanderStorm

  • what your concrete environment is
Plesk Obsidian Version 18.0.58 Update #2
Ubuntu 22.04.4 LTS
PHP version 8.1.27, run PHP as Dedicated FPM application served by nginx
Node.js Version 18.19.1
  • what happened before
  • Clean install going step by step and
  • the mesaget got when I run npm install -> this step: Open the "Run Node.js commands" Tab and enter the following commands one by one
  • what guide did you follow?

I went thought this guide: https://github.com/louislam/uptime-kuma/issues/1264#issuecomment-1531401026

  • Have you gone back and made sure that no steps were skipped?

Yes

  • what you have tried already

I tried

  • 3 or 4 tomes to start over,
  • deleting de account,
  • starting again to be sure no steps were skipped and everytima I get this message

I tried to run (but with the same results)

  • npm install --force and
  • npm install --legacy-peer-deps

vesvello avatar Mar 12 '24 05:03 vesvello

It looks like node.js was not installed on the server correctly. The official guide does mention that this is a separate component that needs to be installed in Settings. Have you checked that it is installed correctly first, and you can run the node -v command by itself?

chakflying avatar Mar 12 '24 08:03 chakflying

Apparently is installed ok Captura de pantalla 2024-03-12 a la(s) 09 59 30

vesvello avatar Mar 12 '24 16:03 vesvello

can run the node -v command by itself?

CommanderStorm avatar Mar 12 '24 16:03 CommanderStorm

no... in plesk node is an extension... i need to run plesk ext nodejs

vesvello avatar Mar 12 '24 17:03 vesvello