-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Experiment] Install Uptime Kuma on Android device #423
Comments
Just tried it on a Snapdragon 865, it's actually kinda funny and it runs really well! ^^ |
This experimental feature does not work anymore. Tested on a clean termux installation on the motorola g6 The packages necessary are at these versions(btw, git is a package that should be on the list to install as well):
After running: When running `npm run setup` npm throws this error:
After the warning, npm also throws this error:
The full log is given in this file: After, even with this error, running `node server/server.js` throws:
I infer from these errors that Uptime Kuma does not work anymore on android devices, at least for now. |
@absozero referencing this, it might be a combination of the phone not being powerful enough and we have increased our dependencies use. Probably means unlikely to be fixed in the future. However, since this is only a failure of |
Also related to nodejs-lts had been upgraded to NodeJs 16 on Termux. It was working fine when it was 14. Unfortunately, it seems that there is no way to install Node.js 14 again on Termux. |
@louislam I think that the reason that nodejs-LTS is now 16 is because the official Lts has changed to that. Also, termux follows a rolling release model, making it impossible to downgrade with the package manager. I have installed this version on my production machine and the steps to setup uptime-kuma worked perfectly, so it must be a problem on the side of termux. @chakflying I dont think the problem is with the phone since it has a snapdragon 600 series CPU. It might be the dependencies since in termux some of them were said to be deprecated. The reason why I even want to put this service on my phone is because it is a different machine from production and will likely stay on longer so if the whole production server goes down I can check and then know when. I dont want to go the extra trouble just to get the service installed, I might just buy a pi. I wanted to use what I already had so I looked into this option. Unfortunate that it does not work |
@absozero I found a workaround. Downgrading to npm 6.X.X solves the issue
Also
|
Can confirm it's working with latest version... Been running on my old Nextbit Robin running android 11 based LineageOS... I use Termux Boot to auto start the app on boot and keep wakelock.... And I use Tasker to monitor battery levels and CPU temps and send notifications via pushbullet if they get low.. Also, continuous running had some network issues where uptime kuma was giving error name not resolved or some other error, so I just restart the phone using tasker around the same time when I update my docker containers in my server using watchtower... Working amazing for several months now.. |
Is there a way if your not rooted? |
Setup that worked for me (no root): pkg upgrade
pkg install clang make python nodejs-lts binutils git build-essential
cd ~
mkdir .npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install npm
git clone https://github.com/louislam/uptime-kuma.git
cd ~/uptime-kuma
npm install dayjs --ignore-scripts
npm run setup
node server/server.js Add kuma autostart at session start: echo -e '#!/data/data/com.termux/files/usr/bin/bash\ncd ~/uptime-kuma\nnode server/server.js' >> ~/start_kuma.sh
echo 'bash ~/start_kuma.sh' >> ~/.bashrc Details Termux
|
npm contains cached files from old npm version |
Updated the steps, it should works again now. |
Cypress warning platform "android" not supported |
cypress should be dev only dependency, it is not in production. Be sure to install dependencies with |
See #3642 on how to get around playwright not suppoting platforms like |
the
|
npm error code 1 |
|
(Updated 2023-07-08)
Just for fun, you can use your old Android phone (Android 7+) to monitor website.
(
ifconfig
to view the IP, and go to http://192.168.1.X:3001 on your PC.Tested with Snapdragon 652 CPU. The performance is actually good.
However, Android always kill apps unexpectedly. I don't know Android system will kill Termux or not, so it is not a recommended method. Just for fun.
The text was updated successfully, but these errors were encountered: