I’ve just updated my server to the latest test version of Vaultwarden and can no longer access the admin panel. Instead, a message reads “ The admin panel is disabled, please configure the ‘ADMIN_TOKEN’ variable to enable it“.
I’ve also noticed that despite having a HIBP API set up, the HIBP checks/reports won’t run because an error tells a user there’s an issue with the API.
Since the update, the installation is completely ignoring my config.json file.
Does anyone know how I can get it working properly again?
My Docker installation never had an .env file and I could never find clear instructions on how to create an.env file as I thought it should have been created automatically.
If your config.json is ignored it might just have a syntax error unless you somehow changed the location of the working directory or the data folder? (If you enter the container with docker exec vaultwarden bash and checkls /data is everything there? Replace vaultwarden with the name of your container, etc.)
Well, I’d recommend reading the configuration overview in the wiki:
Because I think it explains it a bit more thoroughly than those linked comments.
It turns out that after an update, the “push” feature was lost so I added the settings to config.json again but made a mistake in the syntax. The issue is now solved.
The link shared on configuration mentions .env files but not how to actually set up and configure one.
The problem is that there are multiple ways to use it and the recommendations would differ a bit by what platform you use and using an .env (as explained in the ENV_FILE section) might also not necessary be the best way… But I’ll check if I can make it a bit clearer what is meant when I say that you can use the .env.template file as a starting point.
E.g. for docker: you could download/copy the file and use docker run and specify the copied file with --env-file (which sets the environment variables for the container on container creation), or copy the file to the respective DATA_FOLDER on the host (for example named env_file) and set --env ENV_FILE=/data/env_file, or alternatively you can also bind mount the copied file directly to /.env in the image (where vaultwarden will just read the values on startup).
I’m a novice when it comes to such things and I can do just fine by following guides. Installing Vaultwarden as a Docker container was fine, but I was stumped by the .env file.
Even now, I’m none the wiser on how to save the admin settings via this method because the things you’ve said don’t make any sense as they don’t have context for me.
Well, if you can set environment variables and prefer the configuration via the /admin panel, that’s fine too. I was just responding to your question and evaluating your criticism wondering whether it would help to add this or not. So thanks for the feedback.