-
-
Notifications
You must be signed in to change notification settings - Fork 43
Users and Account Management
WebSSH is multi-user. Each account has separate profiles, commands, jump hosts, settings, notes, SSH keys, host trust, live sessions, and transfer ownership.
A standard user can manage their own SSH/SFTP data and security factors. They cannot access the Admin Panel or another user's state.
An administrator can:
- create users;
- lock and unlock accounts;
- promote or demote administrators;
- delete users;
- configure registration;
- view and export bounded audit data;
- manage global host trust;
- generate replacement recovery-code sets after reauthentication;
- link and unlink OIDC identities;
- link and unlink LDAP identities when LDAP is enabled;
- create and restore native backups.
Administrators remain subject to authentication, CSRF, rate limits, target confirmation, and reauthentication requirements.
On a fresh homelab database, BOOTSTRAP_REGISTRATION_ENABLED defaults to true.
Exactly the first browser-created account becomes administrator, and the
bootstrap registration path closes immediately afterward.
Do not expose an empty instance to an untrusted network. If another person claims the first account, they control the deployment.
Production disables browser bootstrap. Create or promote an administrator:
flask --app start:app create-admin --username adminDocker Compose:
docker compose exec webssh \
/app/entrypoint.sh flask --app start:app create-admin --username adminFor automation, --password-file accepts a private regular non-symlink file.
The command does not print or audit the password.
ADMIN_USERS is a compatibility option that promotes listed existing users on
startup. Prefer the explicit CLI for normal administration.
Two settings serve different purposes:
-
BOOTSTRAP_REGISTRATION_ENABLEDallows one first browser-created administrator only while the database has no users. -
REGISTRATION_ENABLEDcontrols ordinary self-registration for additional standard users.
The homelab Admin Panel can store the ordinary registration toggle. A stored setting takes precedence over the initial environment value. Production keeps registration closed even if an administrator attempts to reopen it from the UI.
Use Administration → Users to create a standard account. Generate a unique initial password, deliver it over a separate trusted channel, and require the user to change it.
Passwords are bcrypt hashes at rest. New or changed passwords are limited to 72 bytes after UTF-8 encoding because of bcrypt's input boundary.
Locking prevents new HTTP and Socket.IO authorization. WebSSH also revokes the account's tracked resources:
- active transfers;
- Socket.IO sessions;
- live SSH sessions;
- pooled temporary SSH/SFTP connections;
- persisted socket and SSH session metadata.
Unlocking permits future authentication but does not restore terminated live connections.
Deletion first revokes live access. The database row is deleted, while the active per-user directory is moved atomically to:
DATA_DIR/deleted_users/user_<id>_<uuid>
This quarantine prevents a future numeric user ID from inheriting the deleted
account's files. It is retention, not secure erasure. Operators must define a
review and secure-disposal policy for deleted_users.
If database deletion fails, WebSSH attempts to move the quarantined directory back into the active namespace.
External identity is always linked to an existing local WebSSH account by an administrator.
- OIDC uses the provider's stable issuer and subject. Email alone is never an identity key.
- LDAP uses the configured provider ID and stable directory attribute such as
entryUUIDorobjectGUID. - OIDC and LDAP mappings cannot be combined on one LDAP-managed account.
- LDAP-managed accounts cannot be administrators.
- LDAP linking removes local and alternative login factors; unlinking requires a fresh local password.
Keep a separate local break-glass administrator before enabling external identity.
Local users can change their password through /change-password. Explicit
logout is a POST action and revokes tracked Socket.IO, SSH, and temporary SFTP
connections instead of only deleting the browser cookie.
LDAP-managed users authenticate exclusively against the directory and cannot use the local password-change, passkey, recovery-code, or OIDC flows.
Local accounts can use one-time recovery codes when enabled. Administrators can replace a user's recovery set only after reauthentication and exact target confirmation. Recovery codes are shown once and stored only as hashes.
- Maintain at least two tested administrative recovery paths where practical.
- Review administrator membership regularly.
- Lock an account immediately when access should stop.
- Treat quarantined user files as sensitive retained data.
- Export only the bounded audit data required for an investigation.
- Test external identity with a non-admin pilot before migrating more users.
WebSSH documentation - Project - Issues - Discussions - Security
WebSSH Wiki
Install and operate
- Installation from Source
- Docker and Docker Compose
- Production Deployment
- Reverse Proxy and Subfolder Deployment
- Upgrading, Rollback, and FAQ
Identity and access
- Users and Account Management
- Authentication Overview
- LDAP and Active Directory
- OpenID Connect
- Passkeys and Recovery Codes
SSH and files
- SSH Connections and Host Keys
- Profiles, Jump Hosts, and Commands
- Terminal and Persistent tmux Sessions
- SFTP File Workspace and Transfers
- Tailscale SSH
Reference and administration