Unable to access the admin page (docker)

Hello all,

i’am using vaultwarden with docker for years. I never needed the adminpage. But now we changed maildomain and other things, so i’am going to activate the adminpage to change the user. But if i do this, i got this:

Screenshot_20230321_010904

It look likes an fault with the path. Because vaultwarden admin will bei on the rootdomain, but it is on /vaultwarden. All other things for all users (only 2) are working perfectly. On the logs i see that:

[2023-03-20 23:32:54.834][_][WARN] Request guard `AdminToken` failed: "Unauthorized".
[2023-03-20 23:32:54.834][_][WARN] Responding with registered (admin_login) /admin 401 catcher.
[2023-03-20 23:32:56.109][_][WARN] Request guard `AdminToken` failed: "Unauthorized".
[2023-03-20 23:32:56.109][_][WARN] Responding with registered (admin_login) /admin 401 catcher.
[2023-03-20 23:32:57.040][_][WARN] Request guard `AdminToken` failed: "Unauthorized".
[2023-03-20 23:32:57.040][_][WARN] Responding with registered (admin_login) /admin 401 catcher.

I created the adminpage with:

docker run -d --volumes-from vaultwarden_data --name vaultwarden -v /vaultwarden/:/data/ -e ADMIN_TOKEN=XXX -p 40050:80 vaultwarden/server:latest

I’am running on 2022.12.0

If you need more information, please tell me :wink:

Very thanks

Well Vaultwarden doesn’t have a 2022.12.0, so you may confusing the web-vault version and are most likely running the latest 1.27.0

For the ADMIN_TOKEN= you may need to escape the token depending on the characters used (I believe with single quotes?) ADMIN_TOKEN='xxx'

You may also see if there is a config.json where you may have this set as well, for more details you can check Enabling admin page · dani-garcia/vaultwarden Wiki · GitHub

What do you mean? Are you using a reverse proxy? If you run vaultwarden in a subdir you need to set the DOMAIN too, I think.

Here on the webinterface i see that:
Screenshot_20230321_231305

There are no special characters.

They had never existed before.

I bind only on another port and map it back to 443, because apache2 is also running on the local machine.

The normal path is:
https: // app.tux.lan / vaultwarden/#/login

So the admin path should be (i think) https://app.tux.lan/vaultwarden/admin
but this did not work. So can you help me to correct my command to activate the adminpage on the right way?

If i do that, i get an 404 error, and bitwarden does not work anymore.

docker run -d --volumes-from vaultwarden_data --name vaultwarden -v /vaultwarden/:/data/ -e DOMAIN="https://app.tux.lan/vaultwarden" -e ADMIN_TOKEN=xxx -p 40050:80 vaultwarden/server:latest

I must post some strange links, because i get errors to post more than 2 links.

Very thanks :slight_smile:

Not sure what would be the issue with it? I was asking about the reverse proxy because I suspect the issue is located there. You can compare your configuration with the proxy example Apache in a sub-location (by ss89).

edit: sorry, I don’t know if it’s necessary but there’s a missing trailing slash in the DOMAIN variable. Maybe it’s missing in the Location directive as well?

After i installed an Ubuntu 22.04 with actual docker from website and nginx, everything works perfectly.