@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
| Git Clone URL: | https://aur.archlinux.org/uptime-kuma.git (read-only, click to copy) |
|---|---|
| Package Base: | uptime-kuma |
| Description: | A fancy self-hosted monitoring tool |
| Upstream URL: | https://github.com/louislam/uptime-kuma |
| Licenses: | MIT |
| Submitter: | sylvaindurand |
| Maintainer: | matth |
| Last Packager: | matth |
| Votes: | 10 |
| Popularity: | 0.46 |
| First Submitted: | 2021-10-15 20:47 (UTC) |
| Last Updated: | 2026-05-04 15:11 (UTC) |
@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
I have created an update for this for version 2.0.2 https://codeberg.org/matt/aur-pkgbuilds/src/branch/main/uptime-kuma
2 changes I have made 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 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
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.
Missed your earlier comments here @9pfs and @Neboer.
It should be very possible to run as non-root user like upstream example and other systemd options. Truth be told, I haven't used the software in quite some time and was only doing the bare minimum to keep the version ticking over.
With major release v2 on the horizon, I'm going to drop the package. Feel free you or anyone more invested to adopt.
Pinned Comments
matth commented on 2025-12-25 11:53 (UTC)
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
bgh commented on 2023-04-17 14:11 (UTC)
Note: a service restart may be required if the web interface is inaccessible after updating