[GH-ISSUE #767] Bitwarden_rs Support for Subpaths,how to config (caddy) ? #37725

Closed
opened 2026-07-16 18:26:11 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @bigbighill on GitHub (Dec 13, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/767

docker-compose.yml

version: '3'
services:
bitwarden:
image: bitwardenrs/server:latest
container_name: bitwarden
restart: always
volumes:
- ./data:/data
- /etc/localtime:/etc/localtime
- /var/log:/var/log
ports:
- "127.0.0.1:9990:80"
- "127.0.0.1:9991:3012"
environment:
SIGNUPS_ALLOWED: "true"
DOMAIN: "https://www.xxxx.com/subpath"
DATABASE_URL: "/data/bitwarden.db"
ROCKET_WORKERS: "10"
WEB_VAULT_ENABLED: "true"
ADMIN_TOKEN: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

caddy:
image: abiosoft/caddy
container_name: caddy
restart: always
volumes:
- ./Caddyfile:/etc/Caddyfile:ro
- ./Caddycerts:/root/.caddy
- ./www:/var/www
- /etc/localtime:/etc/localtime
ports:
- "127.0.0.1:2015:2015"
- 443:443
- 80:80
environment:
ACME_AGREE: "true" # agree to Let's Encrypt Subscriber Agreement
ARGS: "version='1.0.4'"

Caddyfile
https://www.xxxx.com {
tls asdf@gmail.com
root /var/www
index index.html
gzip
header / {
# Enable HTTP Strict Transport Security (HSTS)
Strict-Transport-Security "max-age=31536000;"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Disallow the site to be rendered within a frame (clickjacking protection)
X-Frame-Options "DENY"
# Prevent search engines from indexing (optional)
X-Robots-Tag "none"
}
proxy /subpath/notifications/hub/negotiate bitwarden:80 {
transparent
}
proxy /subpath notifications/hub bitwarden:3012 {
websocket
}
proxy /subpath bitwarden:80 {
transparent
}
}

https://www.xxxx.com/subpath 404 error

https://github.com/bitwarden/server/issues/277 now support subpaths ,how to config?

thanks

Originally created by @bigbighill on GitHub (Dec 13, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/767 docker-compose.yml version: '3' services: bitwarden: image: bitwardenrs/server:latest container_name: bitwarden restart: always volumes: - ./data:/data - /etc/localtime:/etc/localtime - /var/log:/var/log ports: - "127.0.0.1:9990:80" - "127.0.0.1:9991:3012" environment: SIGNUPS_ALLOWED: "true" DOMAIN: "https://www.xxxx.com/subpath" DATABASE_URL: "/data/bitwarden.db" ROCKET_WORKERS: "10" WEB_VAULT_ENABLED: "true" ADMIN_TOKEN: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" caddy: image: abiosoft/caddy container_name: caddy restart: always volumes: - ./Caddyfile:/etc/Caddyfile:ro - ./Caddycerts:/root/.caddy - ./www:/var/www - /etc/localtime:/etc/localtime ports: - "127.0.0.1:2015:2015" - 443:443 - 80:80 environment: ACME_AGREE: "true" # agree to Let's Encrypt Subscriber Agreement ARGS: "version='1.0.4'" Caddyfile https://www.xxxx.com { tls asdf@gmail.com root /var/www index index.html gzip header / { # Enable HTTP Strict Transport Security (HSTS) Strict-Transport-Security "max-age=31536000;" # Enable cross-site filter (XSS) and tell browser to block detected attacks X-XSS-Protection "1; mode=block" # Disallow the site to be rendered within a frame (clickjacking protection) X-Frame-Options "DENY" # Prevent search engines from indexing (optional) X-Robots-Tag "none" } proxy /subpath/notifications/hub/negotiate bitwarden:80 { transparent } proxy /subpath notifications/hub bitwarden:3012 { websocket } proxy /subpath bitwarden:80 { transparent } } https://www.xxxx.com/subpath 404 error https://github.com/bitwarden/server/issues/277 now support subpaths ,how to config? thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#37725