

























Note: a service restart may be required if the web interface is inaccessible after updating
Should npm ci be used instead of npm install to make sure it's deterministic? (To try and avoid any dep injection).
@matth npm install sqlite3 was run during service startup. The solution was to run
npm install --include=dev
npm rebuild
in /usr/lib/node_modules/uptime-kuma
@pfonks No issues running it here. Why are you running npm install of sqlite3? How did you build the package?
After updating I get the following error during service startup:
$ npm install sqlite3 --save
Cannot find module '/usr/lib/node_modules/uptime-kuma/node_modules/@louislam/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node'
The default config.env in the package should not include these lines:
UPTIME_KUMA_HOST=127.0.0.1
UPTIME_KUMA_PORT=3001
3001 is the default port anyway, so it doesn't do anything. More importantly, the default host is ::. Setting it to 127.0.0.1 is just worse.
This is now updated to 2.x
2 major changes are:
Set it to run under the user `uptime-kuma` instead of `root`.
Set the data dir to `/var/lib/uptime-kuma` instead of `/usr/lib/node_modules/uptime-kuma/data`
If you are upgrading from 1.x and have existing data you can stop the server and move the data before updating mv /usr/lib/node_modules/uptime-kuma/data /var/lib/uptime-kuma
See the migration guide for other details https://github.com/louislam/uptime-kuma/wiki/Migration-From-v1-To-v2
You can also edit what the data dir is by editing /etc/uptime-kuma/config.env
See the documentation for other environment variables that can be set: https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
If you encounter "TypeError: Cannot read properties of undefined (reading 'prototype')", downgrade nodejs to 24.9.0.
uptime-kuma broke for me somewhat recently due to a node dependency update. I seem to have needed to do this before at some point as well.
node version
node: error while loading shared libraries: libsimdjson.so.26: cannot open shared object file: No such file or directory
This solution of symlinking specific versions is not great, but it worked.
sudo ln -s /lib/libsimdjson.so /usr/lib/libsimdjson.so.26
Test
node --version
v23.11.1
Then the uptime-kuma service was able to launch again.
This is an AUR package, so it doesn't really matter, but @9fps is right, the webapp package guidelines require that web applications be run as separate, unprivileged users. So if this is to eventually make its way into the official repos that would be a requirement.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
This is now updated to 2.x
2 major changes are:
If you are upgrading from 1.x and have existing data you can stop the server and move the data before updating
mv /usr/lib/node_modules/uptime-kuma/data /var/lib/uptime-kumaSee the migration guide for other details https://github.com/louislam/uptime-kuma/wiki/Migration-From-v1-To-v2
You can also edit what the data dir is by editing
/etc/uptime-kuma/config.envSee the documentation for other environment variables that can be set: https://github.com/louislam/uptime-kuma/wiki/Environment-Variables