Starting via PM2 no more possible
See original GitHub issueβ οΈ Please verify that this bug has NOT been raised before.
- I checked and didnβt find similar issue
π‘οΈ Security Policy
- I agree to have read this project Security Policy
π Describe your problem
I just restarted my server and was curious about a 100 % CPU usage by PM2 and and node.
So I first upgraded from v1.12.0 and then restarted Uptime Kuma via pm2 restart /opt/uptime-kuma/server/server.js --name uptime-kuma and now the services doesnβt start anymore.
The console output is:
pm2 restart /opt/uptime-kuma/server/server.js --name uptime-kuma
Use --update-env to update environment variables
[PM2] Applying action restartProcessId on app [/opt/uptime-kuma/server/server.js](ids: [ 0 ])
[PM2] [uptime-kuma](0) β
βββββββ¬βββββββββββββββββ¬ββββββββββββββ¬ββββββββββ¬ββββββββββ¬βββββββββββ¬βββββββββ¬βββββββ¬ββββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ
β id β name β namespace β version β mode β pid β uptime β βΊ β status β cpu β mem β user β watching β
βββββββΌβββββββββββββββββΌββββββββββββββΌββββββββββΌββββββββββΌβββββββββββΌβββββββββΌβββββββΌββββββββββββΌβββββββββββΌβββββββββββΌβββββββββββΌβββββββββββ€
β 0 β uptime-kuma β default β 1.16.1 β fork β 85229 β 0s β 470 β online β 0% β 14.1mb β root β disabled β
βββββββ΄βββββββββββββββββ΄ββββββββββββββ΄ββββββββββ΄ββββββββββ΄βββββββββββ΄βββββββββ΄βββββββ΄ββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ
Usually it starts a second process.
If I look into pm2 monit, it sells me: [SERVER] ERROR: Error: Cannot find βdist/index.htmlβ, did you install correctly?
Since it tries to restart every second, this would explain the high CPU usage.
If I start the server via node server/server.js it works fine.
I just looked into the server/server.js file and noticed that process.cwd() returns /opt/uptime-kuma if I start it via node but /opt/uptime-kuma/server if I start it via pm2. So I think it has something to do with this but Iβm not that into nodejs to be sure. Thus I hope to get help on this.
π» Uptime-Kuma Version
1.16.1
π» Operating System and Arch
Debian 11
π Browser
Safari 15.5
π Docker Version
No response
π© NodeJS Version
16.15.0
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)

Top Related StackOverflow Question
I just reinstalled
pm2including removing its config from~/.pm2/and now it works fine. π€·π»ββοΈThank you for helping me out, though!
Hmm, odd. Can you try running the install script in a directory that doesnβt require root priviledges i.e users home dir or perhaps doing the manual install https://github.com/louislam/uptime-kuma/wiki/π§-How-to-Install#-without-docker-recommended-for-x86x64-only instead of the install script