-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Using an alternate base dir
Traditionally, Bitwarden is limited to residing at the root of a subdomain, e.g. https://bitwarden.example.com.
This limitation originates in the backend and web vault, which haven't been designed to accommodate alternate base dirs (see bitwarden/server#277). The mobile/desktop apps and browser extensions actually have no issues using a base URL with a path.
In bitwarden_rs, with the changes in PR#868 (backend) and PR#11 (web vault), you can configure a fully functional instance at an alternate base dir.
Simply configure your domain URL to include the base dir. For example, suppose you want to access your instance at https://bitwarden.example.com/base-dir. (Note that you can also use multiple levels of directories, like https://bitwarden.example.com/multi/level/base/dirif you want.)
- Stop bitwarden_rs.
- If you normally configure bitwarden_rs using the admin page, edit your
config.jsonto look as follows:{ "domain": "https://bitwarden.example.com/base-dir", // ... other values ... }
- If you normally configure bitwarden_rs via environment variables, update your config files/scripts to set the
DOMAINenvironment variable to the base URL. For example:docker run -e DOMAIN="https://bitwarden.example.com/base-dir" ... - Restart bitwarden_rs.
- You should now be able to access the web vault at
https://bitwarden.example.com/base-dir/(note the trailing slash). For reasons not entirely clear, you'll probably run into issues if you usehttps://bitwarden.example.com/base-dir(without the trailing slash). - Configure your apps or browser extensions to use
https://bitwarden.example.com/base-dir. If you add a trailing slash, the apps and extensions will automatically remove it before saving.
If you are putting bitwarden_rs behind a reverse proxy, make sure your proxy is configured to pass the request path through to bitwarden_rs, since the bitwarden_rs API routes are set up to expect the base dir. So if a request for https://bitwarden.example.com/base-dir/api/sync hits your reverse proxy, which then proxies to your bitwarden_rs listening on localhost:8080, the request must go to http://localhost:8080/base-dir/api/sync, not http://localhost:8080/api/sync.
- Which container image to use
- Starting a container
- Using Docker Compose
- Using Podman
- Updating the vaultwarden image
- Overview
- Enabling admin page
- SMTP configuration
- Disable registration of new users
- Disable invitations
- Enabling WebSocket notifications
- Enabling Mobile Client push notification
- Enabling SSO support using OpenId Connect
- Other configuration
- Using the MariaDB (MySQL) Backend
- Using the PostgreSQL Backend
- Running without WAL enabled
- Migrating from MariaDB (MySQL) to SQLite
- Hardening Guide
- Password hint display
- Enabling U2F and FIDO2 WebAuthn authentication
- Enabling YubiKey OTP authentication
- Fail2Ban Setup
- Fail2Ban + ModSecurity + Traefik + Docker
- Translating the email templates
- Translating admin page
- Customize Vaultwarden CSS
- Using custom website icons
- Disabling or overriding the Vault interface hosting
- Building binary
- Building your own docker image
- Git hooks
- Differences from the upstream API implementation