Headplane app install Fail - "ENOSPC: System limit for number of file watchers reached"

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.13
What app is this about: Headplane

Describe your issue

Thank you for reading.

Seeking a solution for a failed installation of Headplane on a Linode VPS. Prior installation of Headscale and DEX when smoothly. I did not attempt to configure/add a client prior to the Headplace install.

Relevant log snippet:
2025-04-15 15:35:46,976: DEBUG - Done in 8.9s using pnpm v10.8.1
2025-04-15 15:35:47,013: DEBUG - + ynh_hide_warnings pnpm build
2025-04-15 15:35:47,014: DEBUG - + pnpm build
2025-04-15 15:35:47,350: DEBUG -
2025-04-15 15:35:47,350: DEBUG - > headplane@ build /var/www/headplane
2025-04-15 15:35:47,350: DEBUG - > react-router build && vite build -c server/vite.config.ts
2025-04-15 15:35:47,350: DEBUG -
2025-04-15 15:35:51,592: DEBUG - node:internal/fs/watchers:247
2025-04-15 15:35:51,592: DEBUG - const error = new UVException({
2025-04-15 15:35:51,593: DEBUG - ^
2025-04-15 15:35:51,593: DEBUG -
2025-04-15 15:35:51,593: DEBUG - Error: ENOSPC: System limit for number of file watchers reached, watch ‘/var/www/headplane/.local/share/pnpm/store/v10/files/af/3e41c6f7998bf13dbc7c2c2e6358d00a60d79bdde5edb36a70c679491776d8c3a0cd2f230a38758c920908ac7e0302a22e43574a836b369e0c8120f2de78f8’
2025-04-15 15:35:51,593: DEBUG - at FSWatcher. (node:internal/fs/watchers:247:19)
2025-04-15 15:35:51,593: DEBUG - at Object.watch (node:fs:2550:36)
2025-04-15 15:35:51,593: DEBUG - at createFsWatchInstance (file:///var/www/headplane/node_modules/.pnpm/vite@6.0.6_@types+node@22.10.7_jiti@1.21.7_tsx@4.19.2_yaml@2.7.0/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:27718:17)

Share relevant logs or error messages

https://paste.yunohost.org/raw/xucepeyoro

Welcome!

This looks like a limit from Linode’s VPS. Can you try following what’s suggested there? node.js - Nodemon Error: "System limit for number of file watchers reached" - Stack Overflow

They suggest to double the number returned by cat /proc/sys/fs/inotify/max_user_watches

Note that I was not able to make that app work after installation.
Edit: ah, it’s a bit quirky. The app needs its own domain, installed at its root, but expects to be opened on the /admin path.

Thank you. That fixed my issue. Here is the command I ran to increase the watcher countill:
echo fs.inotify.max_user_watches= 131070 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

The Headplane installation completed successfully. However, I have a new issue now.

On launching Headplane in the browser, it asks me to enter headscale apikeys create in the console to generate and authenticate with a new API key. Here is what I see at the console of my Linode VPS:

user@host:~$ headscale apikeys create
-bash: headscale: command not found

How and where do I execute headscale apikeys create?

Thank you, again.

sudo yunohost app shell headscale
# then
./headscale apikeys create