
An alternative server implementation of the Bitwarden Client API, written in Rust and compatible with official Bitwarden clients, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal.
Organizations: enable secure sharing of logins, notes, cards, and identities between users, functioning as shared folders for teams or families. Organizations allow for managed access via collections, where items are owned by the organization rather than individuals.

Collections: are the primary way to organize and share items (logins, notes, cards) among members of an Organization. They function like "shared folders" with granular access permissions.

Groups: Controls whether group support is enabled for organizations
This setting applies to organizations.See more: https://bitwarden.com/help/about-groups/

In Vaultwarden is disabled by default because this is a beta feature, it contains known issues!
KNOW WHAT YOU ARE DOING!
If you still want to enable this feature, add this environment variable.
ORG_GROUPS_ENABLED=true
Emergency access allows you to designate and manage trusted emergency contacts, who can request access to your vault in cases of emergency. Contacts can be granted either view or takeover user access, giving you control over what they can do if they ever need to step in:
1) View: When an emergency access request is granted, this user is granted view/read access to all items in your individual vault, including login items' passwords and attachments.
2) Takeover: When an emergency access request is granted, this user must create a master password for permanent read/write access to your vault. This will replace your previous master password and remove any two-step login methods that were previously set up.

Administrator Access: By default, organization owners and administrators can see all collections in the Admin Console, but they only appear in their personal "My Vault" if access is explicitly granted or if the "Access all collections" option is checked in the member's profile.
What are Organizations in Bitwarden and why should you use them?
https://bitwarden.com/blog/what-are-organizations-in-bitwarden-and-why-should-you-use-them/
mkdir -p ~/docker/vaultwarden/; cd ~/docker/vaultwarden/
cat << '_EOF_' > compose.yml
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
volumes:
- ./vw-data:/data
ports:
- ${EXPOSE_PORT_HTTP:-80}:80
environment:
DOMAIN: ${DOMAIN} # Required when using a reverse proxy
ADMIN_TOKEN: ${ADMIN_TOKEN} # Admin token for accessing the admin interface
#SIGNUPS_ALLOWED: "false" # Uncomment to disable user signups
# Database Settings (optional, defaults to SQLite if not set)
DATABASE_URL: "postgresql://${DB_USER}:${DB_PASS}@db-pg:5432/${DB_NAME}"
# SMTP Settings (optional, for email notifications)
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_SECURITY: ${SMTP_SECURITY}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SMTP_FROM: ${SMTP_FROM}
depends_on:
db-pg:
condition: service_healthy
db-pg:
image: postgres:16-alpine
container_name: vaultwarden-db-pg
restart: unless-stopped
volumes:
- ./pg-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_NAME:-vaulwaden}
POSTGRES_PASSWORD: ${DB_PASS:?database password required}
POSTGRES_USER: ${DB_USER:-vaulwarden}
healthcheck:
interval: 30s
retries: 5
start_period: 20s
test:
- CMD-SHELL
- pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
timeout: 5s
_EOF_
cat << '_EOF_' > .env
DOMAIN="https://vaultwarden.yourdomain.com"
## You can generate a token using the following command:
## openssl rand -base64 60 | tr -d '\n'
ADMIN_TOKEN="f0ePjdW4VXMZbmxsKlEaNMdESoUpY87GOWkkkbHVeKK+/ur5RiEAX1Gi90CvftV1"
# Database connection
DB_NAME=vaulwarden
DB_USER=vaulwarden-user
DB_PASS=vaulwarden-password
## Expose ports
EXPOSE_PORT_HTTP=9900
# SMTP Host Emails are sent to
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_SECURITY="starttls"
SMTP_USERNAME="[email protected]"
SMTP_PASSWORD="xxxxxxxxxxxxxxxx"
SMTP_FROM="[email protected]"
_EOF_
Environment variables that can be used to customize the container - https://github.com/dani-garcia/vaultwarden/blob/main/.env.template
Compose Example - https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose
Token Generate - https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token
Enabling admin page - https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-pageComplete tutorial showing how to use a Gmail account to send emails - 🇧🇷 https://wiki.tiozaodolinux.com/Guide-for-Linux/Zabbix-Send-Mail-With-Google-SMTP
Vaultwarden supports three primary database backends via the DATABASE_URL environment variable:
1) SQLite (Default): Best for small-to-medium personal instances (e.g., <20 users). It is lightweight, performs well on local storage, and stores everything in a single db.sqlite3 file. Warning: Avoid using SQLite over network filesystems like NFS or SMB, as it is prone to corruption in those environments.
2) PostgreSQL / MariaDB / MySQL: Recommended for larger user bases, write-intensive workloads, or deployments requiring higher scalability. These engines handle concurrent connections better than SQLite but require managing a separate database container.
Zero-Knowledge Architecture: Almost all data (passwords, notes, TOTP seeds) is encrypted on the client side before reaching the database. The server operator can only see metadata like email addresses and organization names.
At-Rest Protection: While the vault data is encrypted, the database itself is often not fully encrypted at the file level unless specified by the host OS or specific database features. For extra security, consider encrypting the entire storage volume or the host disk.
docker compose up -d; docker compose logs -f --tail 10
Let's take a look at the running containers:
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
vaultwarden vaultwarden/server:latest "/start.sh" vaultwarden 19 minutes ago Up 19 minutes (healthy) 0.0.0.0:9900->80/tcp, [::]:9900->80/tcp
vaultwarden-db-pg docker.io/library/postgres:18-alpine "docker-entrypoint.s…" db-pg 19 minutes ago Up 19 minutes (healthy) 5432/tcp
TODO
TODO
Enter the URL https://vaultwarden.yourdomain.com in your browser - I use Google Chrome
Direct link https://chromewebstore.google.com/detail/bitwarden-password-manage/nngceckbapebfimnlniiiahkandclblb
Then, on the login screen, you will have the following option:
In the web extension window, this option is not visible; use your mouse scroll wheel to scroll to the bottom of the window, and you will find this small option. Choose self-hosted and a window will open for you to enter the URL https://vaultwarden.yourdomain.com
Use the extension to save credentials and fill out forms quickly, without opening the web application.

Go to the URL https://vaultwarden.yourdomain.com/admin/
Authentication key needed to continue
Please provide it below:
Enter admin tokenand paste your ADMIN_TOKEN
You can use /admin console to invite users.
Bitwarden uses the Directory Connector app (desktop or CLI) to sync users and groups from Active Directory or LDAP-based directories. It enables automatic provisioning/deprovisioning for Enterprise/Teams plans, allowing organizations to manage user access without managing individual accounts manually.
Provisioned users will be issued invitations to join the organization, and can subsequently complete the normal onboarding procedure.
Directory Connector can be configured to remove users from your Bitwarden organization when they are disabled from the source directory. This won't delete their Bitwarden accounts, but they will lose all access to your organization.
Method: The Directory Connector software communicates with LDAP/AD to bring users into the Bitwarden organization, supporting both Active Directory and standard LDAP servers.
Sync Capabilities: Supports syncing users and groups, ensuring that when a user is removed from the directory, their access to the Bitwarden organization is revoked.
Not SSO: Directory Sync is for provisioning (managing accounts), not for authenticating users' logins (Single Sign-On - SSO). Users still use their master password to decrypt their vault.
Configuration: You must configure server hostname, port (e.g., 389/636), root path, and administrative credentials in the Directory Connector.
Security: Supports encrypted connections using LDAP over SSL (LDAPS) or STARTTLS.
Obtain API Key: Get your organization API key from the Bitwarden web vault.
Download Directory Connector: Install the Desktop App or CLI.
Configure Settings: Enter your LDAP server details, including hostname, root path, and login credentials.
Test and Sync: Test the connection to ensure it works, then configure synchronization.
For automated provisioning, Bitwarden also supports SAML 2.0 or OpenID Connect for true single sign-on.