I recently set up Vaultwarden using docker. I followed this guide. When I arrived to the admin page, it notified me that the admin token was insecure. I then used this wiki article to generate an argon2 hash and start a new docker isntance using the hashed token.
As I understand, I should now be able to use the hashed token’s passphrase as my admin token to log in to the admin menu. However, that password does not work. What does work is my old token. What could I have done wrong here? Here are the steps I took.
Stop the vaultwarden container using sudo docker stop vaultwarden
Remove the vaultwarden constainer using sudo docker rm vaulwarden
Confirmed that the vaultwarden container was indeed gone using sudo docker ps
Created a new container using the following command
What do the logs say? If they contain something like this you are using a config.json for configuration:
[INFO] Using saved config from `data/config.json` for configuration.
[WARNING] The following environment variables are being overriden by the config.json file.
[WARNING] Please use the admin panel to make changes to them:
[WARNING] DOMAIN, DISABLE_ICON_DOWNLOAD, SIGNUPS_ALLOWED, ADMIN_TOKEN
If you have followed the guide to the end you should have used the save button to disable new user creation which creates a config.json in the data folder.
Also you might have set the environment variable using portainer. I’m not familiar with portainer and how it works but it might interfere?
I do see that in the log. I think I have it figured out now. I must have entered the hash into the form input with the single quotes like this 'HASHSTRING' instead of just HASHSTRING.