Repository navigation
Closed
Description
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-userFirst 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-loginCLI 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/registerendpoint - Set
openRegistrations: falsein 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-loginflag
Files 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 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-onlyflag (partial solution)--no-idpflag (disables auth entirely, too extreme)
Acceptance Criteria
-
--single-usercreates pod on first run - Registration disabled in single-user mode
- Existing auth still works for remote access
- Optional
--auto-loginfor localhost convenience - Documentation updated
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat: Add single-user mode for personal pod servers
feat: Add single-user mode for personal pod servers
feat: Add single-user mode for personal pod servers (#77)