Vaultwarden on a game-server panel: hashing the admin token at every start
A panel variable should be something a person can type. The Vaultwarden image hashes the admin password with argon2 on each boot, and unsets the token when the field is empty.
In short
- The panel variable VWADMINPASSWORD is hashed with the argon2 CLI at each start and exported as ADMINTOKEN; an empty variable unsets the token and disables /admin.
- The image is the official Vaultwarden one, re-based to run as an unprivileged container user, with all state under /home/container/data and the port taken from the panel's allocation.
- The script also warns when a saved config.json exists, because settings saved on the admin page override the panel's variables, and it turns a bare domain into an https:// one.
#docker#bash#vaultwarden#pterodactyl#argon2