Summary
Add a --single-user mode for personal/mobile deployments where only one user needs access to the pod.
Motivation
JSS is designed to be lightweight and run on mobile devices (Android/Termux). In many personal use cases:
- Only one person will use the server
- Registration should be disabled after initial setup
- Login friction should be minimized
- The server acts as a personal data store, not a multi-tenant service
Proposed Behavior
sandymount start --single-user
# or
jss start --single-user
First Run
- Create default user pod at
/ or /me/ (configurable)
- Generate WebID profile
- Optionally prompt for username/password or generate credentials
- Disable registration endpoint
Subsequent Runs
- Skip registration UI entirely
- Optional: Auto-login if running locally (localhost only)
- Optional: Session persistence across restarts
Implementation Approach
Config Addition
// config.js
singleUser: false,
singleUserPath: '/', // or '/me/'
singleUserAutoLogin: false, // localhost auto-login
CLI Flags
--single-user Enable single-user mode
--single-user-path Pod path (default: /)
--auto-login Auto-login on localhost (security consideration)
Server Changes
-
On startup with --single-user:
- Check if user pod exists at configured path
- If not, run first-time setup (create pod structure)
- Disable
/idp/register endpoint
- Set
openRegistrations: false in NodeInfo
-
Optional auto-login (localhost only):
- If request from 127.0.0.1/localhost and no session
- Auto-authenticate as the single user
- Security: Only enable with explicit
--auto-login flag
Files to Modify
src/config.js - Add singleUser options
src/server.js - Handle single-user initialization
src/idp/index.js - Conditionally disable registration
src/idp/interactions.js - Auto-login logic (optional)
bin/jss.js - CLI flags
Security Considerations
- Auto-login should ONLY work for localhost connections
- Clear warning in logs when auto-login is enabled
- Single-user mode should still support proper authentication for remote access
- Consider generating a strong random password on first run and displaying it once
Related
- Sandymount mobile deployment use case
--invite-only flag (partial solution)
--no-idp flag (disables auth entirely, too extreme)
Acceptance Criteria
Summary
Add a
--single-usermode for personal/mobile deployments where only one user needs access to the pod.Motivation
JSS is designed to be lightweight and run on mobile devices (Android/Termux). In many personal use cases:
Proposed Behavior
sandymount start --single-user # or jss start --single-userFirst Run
/or/me/(configurable)Subsequent Runs
Implementation Approach
Config Addition
CLI Flags
Server Changes
On startup with
--single-user:/idp/registerendpointopenRegistrations: falsein NodeInfoOptional auto-login (localhost only):
--auto-loginflagFiles to Modify
src/config.js- Add singleUser optionssrc/server.js- Handle single-user initializationsrc/idp/index.js- Conditionally disable registrationsrc/idp/interactions.js- Auto-login logic (optional)bin/jss.js- CLI flagsSecurity Considerations
Related
--invite-onlyflag (partial solution)--no-idpflag (disables auth entirely, too extreme)Acceptance Criteria
--single-usercreates pod on first run--auto-loginfor localhost convenience