Summary
JSS can run on Android via Termux + PM2, but the native bcrypt module fails to compile due to missing Android NDK configuration.
Environment
- Platform: Android (Termux)
- Node.js: v24.11.1
- Architecture: arm64
Error
gyp: Undefined variable android_ndk_path in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
Workaround
Replace bcrypt with bcryptjs (pure JS implementation):
npm uninstall bcrypt && npm install bcryptjs
sed -i "s/import bcrypt from 'bcrypt'/import bcrypt from 'bcryptjs'/" src/idp/accounts.js
Proposal
Consider one of:
- Optional dependency: Make
bcrypt optional and fall back to bcryptjs when native compilation fails
- Switch to bcryptjs: Use
bcryptjs by default (slower but portable)
- Document workaround: Add Termux/Android installation instructions to README
Notes
- JSS runs well on Android once this is resolved (~95MB RAM)
- PM2 works correctly for process management
- Useful for self-hosting on spare phones
Summary
JSS can run on Android via Termux + PM2, but the native
bcryptmodule fails to compile due to missing Android NDK configuration.Environment
Error
Workaround
Replace
bcryptwithbcryptjs(pure JS implementation):Proposal
Consider one of:
bcryptoptional and fall back tobcryptjswhen native compilation failsbcryptjsby default (slower but portable)Notes