Vaultwarden giving 404 on any GET
ngphadke opened this issue · 5 comments
Set everything up as per the procedure mentioned.
- DDNS is working
- Let's Encrypt is working
- Browser connection and resolution to
https://bitwarden.mydomain.com
is working
However, when the browser connects the vaultwarden server is returning a 404
This is reflected in the bitwarden container logs -
bitwarden | [INFO] No .env file found.
bitwarden |
bitwarden | [WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
bitwarden | [WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.
bitwarden | [2022-07-26 06:43:28.929][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
bitwarden | [2022-07-26 06:43:28.932][start][INFO] Rocket has launched from http://0.0.0.0:80
bitwarden | [2022-07-26 06:47:26.436][_][ERROR] No matching routes for GET /.well-known/acme-challenge/2ZlZDCro6faXJ3SINZwEX-mjoHPimXKOrmfMERKh9K0.
bitwarden | [2022-07-26 06:47:26.436][_][WARN] No 404 catcher registered. Using Rocket default.
.env configuration
# The fully-qualified domain name for Bitwarden - what address do you want Bitwarden accessible?
# Used for caddy proxy and ddns with Cloudflare
DOMAIN=https://bitwarden.mydomain.com
# Timezone - used by some containers for logs / cron
TZ='Asia/Kolkata'
### BITWARDEN VARIABLES ###
# Setting up Bitwarden for the first time can be done in two ways:
# Uncomment the method you want to use / comment the one you don't
# Method 1. [RECOMMENDED] because it avoids the admin page entirely; using the admin
# page overrides these environmental variables which can cause confusion.
# 1. Set up your primary account(s) while SIGNUPS_ALLOWED=true
# 2. Set SIGNUPS_ALLOWED=false
# 3. Set the SMTP details above to enable e-mail invitation
# 4. Invite other users from within Bitwarden
# Keep ADMIN_TOKEN blank to disable access to the admin page entirely.
SIGNUPS_ALLOWED=true
ADMIN_TOKEN=
# Method 2. Use the admin page to create your first user(s) then disable it.
# 1. Set ADMIN_TOKEN using gthe command `openssl rand -base64 48`
# 2. Use the admin page (/admin) to create your initial user(s).
# 3. Disable the admin page by clearing the token (ADMIN_TOKEN=)
#SIGNUPS_ALLOWED=false
#ADMIN_TOKEN=
### PROXY / CADDY VARIABLES ###
EMAIL=<email removed for privacy>
### DDNS VARIABLES ###
# Enter user id (use `id -u` to determine your user id)
PUID=*****
# Enter group id (use `id -g` to determine your group id)
PGID=*****
COUNTRIES=CN HK AU
COUNTRYBLOCK_SCHEDULE=0 0 * * *
WATCHTOWER_SCHEDULE=0 0 3 ? * 1
An update -
tried following the instructions on a fresh instance, still getting the same errors in vaultwarden.
Full logs below -
bitwarden | /--------------------------------------------------------------------\
bitwarden | | Starting Vaultwarden |
bitwarden | | Version 1.25.1 |
bitwarden | |--------------------------------------------------------------------|
bitwarden | | This is an *unofficial* Bitwarden implementation, DO NOT use the |
bitwarden | | official channels to report bugs/features, regardless of client. |
bitwarden | | Send usage/configuration questions or feature requests to: |
bitwarden | | https://vaultwarden.discourse.group/ |
bitwarden | | Report suspected bugs/issues in the software itself at: |
bitwarden | | https://github.com/dani-garcia/vaultwarden/issues/new |
bitwarden | \--------------------------------------------------------------------/
bitwarden |
bitwarden | [INFO] No .env file found.
bitwarden |
bitwarden | [WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
bitwarden | [WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.
bitwarden | [2022-07-27 04:32:50.067][vaultwarden][INFO] Private key created correctly.
bitwarden | [2022-07-27 04:32:50.068][vaultwarden][INFO] Public key created correctly.
bitwarden | Running migration 20180114171611
bitwarden | Running migration 20180217205753
bitwarden | Running migration 20180427155151
bitwarden | Running migration 20180508161616
bitwarden | Running migration 20180525232323
bitwarden | Running migration 20180601112529
bitwarden | Running migration 20180711181453
bitwarden | Running migration 20180827172114
bitwarden | Running migration 20180910111213
bitwarden | Running migration 20180919144557
bitwarden | Running migration 20181127152651
bitwarden | Running migration 20190526216651
bitwarden | Running migration 20191010083032
bitwarden | Running migration 20191117011009
bitwarden | Running migration 20200313205045
bitwarden | Running migration 20200409235005
bitwarden | Running migration 20200701214531
bitwarden | Running migration 20200802025025
bitwarden | Running migration 20201130224000
bitwarden | Running migration 20201209173101
bitwarden | Running migration 20210311190243
bitwarden | Running migration 20210315163412
bitwarden | Running migration 20210430233251
bitwarden | Running migration 20210511205202
bitwarden | Running migration 20210701203140
bitwarden | Running migration 20210830193501
bitwarden | Running migration 20211024164321
bitwarden | Running migration 20220117234911
bitwarden | Running migration 20220302210038
bitwarden | [2022-07-27 04:32:50.291][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
bitwarden | [2022-07-27 04:32:50.296][start][INFO] Rocket has launched from http://0.0.0.0:80
bitwarden | [2022-07-27 04:33:39.193][vaultwarden][INFO] Exiting vaultwarden!
bitwarden | [2022-07-27 04:33:39.194][rocket::server][WARN] Received SIGTERM. Requesting shutdown.
bitwarden | [2022-07-27 04:33:39.194][vaultwarden::api::notifications][INFO] Shutting down WebSockets server!
bitwarden | [2022-07-27 04:33:39.248][vaultwarden][INFO] Vaultwarden process exited!
bitwarden | /--------------------------------------------------------------------\
bitwarden | | Starting Vaultwarden |
bitwarden | | Version 1.25.1 |
bitwarden | |--------------------------------------------------------------------|
bitwarden | | This is an *unofficial* Bitwarden implementation, DO NOT use the |
bitwarden | | official channels to report bugs/features, regardless of client. |
bitwarden | | Send usage/configuration questions or feature requests to: |
bitwarden | | https://vaultwarden.discourse.group/ |
bitwarden | | Report suspected bugs/issues in the software itself at: |
bitwarden | | https://github.com/dani-garcia/vaultwarden/issues/new |
bitwarden | \--------------------------------------------------------------------/
bitwarden |
bitwarden | [INFO] No .env file found.
bitwarden |
bitwarden | [WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
bitwarden | [WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.
bitwarden | [2022-07-27 04:41:59.214][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
bitwarden | [2022-07-27 04:41:59.218][start][INFO] Rocket has launched from http://0.0.0.0:80
bitwarden | [2022-07-27 04:42:59.525][_][ERROR] No matching routes for GET /alive.
bitwarden | [2022-07-27 04:42:59.526][_][WARN] No 404 catcher registered. Using Rocket default.
bitwarden | [2022-07-27 04:43:59.899][_][ERROR] No matching routes for GET /alive.
bitwarden | [2022-07-27 04:43:59.899][_][WARN] No 404 catcher registered. Using Rocket default.
ninadphadke@bitwarden ~/bitwarden_gcloud $ docker-compose logs bitwarden | cat
Attaching to bitwarden
bitwarden | /--------------------------------------------------------------------\
bitwarden | | Starting Vaultwarden |
bitwarden | | Version 1.25.1 |
bitwarden | |--------------------------------------------------------------------|
bitwarden | | This is an *unofficial* Bitwarden implementation, DO NOT use the |
bitwarden | | official channels to report bugs/features, regardless of client. |
bitwarden | | Send usage/configuration questions or feature requests to: |
bitwarden | | https://vaultwarden.discourse.group/ |
bitwarden | | Report suspected bugs/issues in the software itself at: |
bitwarden | | https://github.com/dani-garcia/vaultwarden/issues/new |
bitwarden | \--------------------------------------------------------------------/
bitwarden |
bitwarden | [INFO] No .env file found.
bitwarden |
bitwarden | [WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
bitwarden | [WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.
bitwarden | [2022-07-27 04:32:50.067][vaultwarden][INFO] Private key created correctly.
bitwarden | [2022-07-27 04:32:50.068][vaultwarden][INFO] Public key created correctly.
bitwarden | Running migration 20180114171611
bitwarden | Running migration 20180217205753
bitwarden | Running migration 20180427155151
bitwarden | Running migration 20180508161616
bitwarden | Running migration 20180525232323
bitwarden | Running migration 20180601112529
bitwarden | Running migration 20180711181453
bitwarden | Running migration 20180827172114
bitwarden | Running migration 20180910111213
bitwarden | Running migration 20180919144557
bitwarden | Running migration 20181127152651
bitwarden | Running migration 20190526216651
bitwarden | Running migration 20191010083032
bitwarden | Running migration 20191117011009
bitwarden | Running migration 20200313205045
bitwarden | Running migration 20200409235005
bitwarden | Running migration 20200701214531
bitwarden | Running migration 20200802025025
bitwarden | Running migration 20201130224000
bitwarden | Running migration 20201209173101
bitwarden | Running migration 20210311190243
bitwarden | Running migration 20210315163412
bitwarden | Running migration 20210430233251
bitwarden | Running migration 20210511205202
bitwarden | Running migration 20210701203140
bitwarden | Running migration 20210830193501
bitwarden | Running migration 20211024164321
bitwarden | Running migration 20220117234911
bitwarden | Running migration 20220302210038
bitwarden | [2022-07-27 04:32:50.291][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
bitwarden | [2022-07-27 04:32:50.296][start][INFO] Rocket has launched from http://0.0.0.0:80
bitwarden | [2022-07-27 04:33:39.193][vaultwarden][INFO] Exiting vaultwarden!
bitwarden | [2022-07-27 04:33:39.194][rocket::server][WARN] Received SIGTERM. Requesting shutdown.
bitwarden | [2022-07-27 04:33:39.194][vaultwarden::api::notifications][INFO] Shutting down WebSockets server!
bitwarden | [2022-07-27 04:33:39.248][vaultwarden][INFO] Vaultwarden process exited!
bitwarden | /--------------------------------------------------------------------\
bitwarden | | Starting Vaultwarden |
bitwarden | | Version 1.25.1 |
bitwarden | |--------------------------------------------------------------------|
bitwarden | | This is an *unofficial* Bitwarden implementation, DO NOT use the |
bitwarden | | official channels to report bugs/features, regardless of client. |
bitwarden | | Send usage/configuration questions or feature requests to: |
bitwarden | | https://vaultwarden.discourse.group/ |
bitwarden | | Report suspected bugs/issues in the software itself at: |
bitwarden | | https://github.com/dani-garcia/vaultwarden/issues/new |
bitwarden | \--------------------------------------------------------------------/
bitwarden |
bitwarden | [INFO] No .env file found.
bitwarden |
bitwarden | [WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
bitwarden | [WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.
bitwarden | [2022-07-27 04:41:59.214][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
bitwarden | [2022-07-27 04:41:59.218][start][INFO] Rocket has launched from http://0.0.0.0:80
bitwarden | [2022-07-27 04:42:59.525][_][ERROR] No matching routes for GET /alive.
bitwarden | [2022-07-27 04:42:59.526][_][WARN] No 404 catcher registered. Using Rocket default.
bitwarden | [2022-07-27 04:43:59.899][_][ERROR] No matching routes for GET /alive.
bitwarden | [2022-07-27 04:43:59.899][_][WARN] No 404 catcher registered. Using Rocket default.
One thing I don't get is why it's say no .env is found
Found the problem.
Vaultwarden recommends the DOMAIN
variable to be the fully-qualified domain.
But the docker-compose.yml
specifies addition of the https:// to the DOMAIN
set in the .env
file for bitwarden_gcloud
Found the problem. Vaultwarden recommends the
DOMAIN
variable to be the fully-qualified domain. But thedocker-compose.yml
specifies addition of the https:// to theDOMAIN
set in the.env
file for bitwarden_gcloud
Thanks for updating the issue. So did you have the DOMAIN=
in .env
with the https://
protocol part included, which would pass https://https://blah.org
?
I think .env.template
could use some clarification anyway. Technically a FQDN doesn't include the protocol (http/https/etc) but it's an easy thing to include.
I added 911ed3b which just adds a caveat to .env.template
. I separate them so that docker-compose.yml
can use the domain by itself for string building (SMTP) and because caddy doesn't want the protocol when the domain is being set.