Need help setting up argon2 #7159
Unanswered
UnconnectedBedna
asked this question in
Q&A
Replies: 1 comment 1 reply
|
Both ways are supported by docker compose, cf. https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-environment-attribute |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have been trying to get the clear text password hashed but nothing I do seems to work.
According to documentation, I used
docker psto find container id and then:docker exec -it <containerid_from_docker_ps> /vaultwarden hashI input the password twice (I use test1234 in this example, obv not the password I use) and that give me:
ADMIN_TOKEN='$argon2id$v=19$m=65540,t=3,p=4$OWCDyog7bYbLuzzwTCd81knz9EtXh5ObEGgZqQr9hy4$cpKWWx1KdXAlAUyZo+WfwhgJ+OVctdYd1Wzl6F+dCcQ''I edited that line to add $ to avoid variable interpolation and enter according to documentation.
ADMIN_TOKEN='$$argon2id$$v=19$$m=65540,t=3,p=4$$OWCDyog7bYbLuzzwTCd81knz9EtXh5ObEGgZqQr9hy4$$cpKWWx1KdXAlAUyZo+WfwhgJ+OVctdYd1Wzl6F+dCcQ'# single quotes should be removed, see edit belowI then put that into my docker-compose.yml.
ADMIN_TOKEN: $$argon2id$$v=19$$m=65540,t=3,p=4$$OWCDyog7bYbLuzzwTCd81knz9EtXh5ObEGgZqQr9hy4$$cpKWWx1KdXAlAUyZo+WfwhgJ+OVctdYd1Wzl6F+dCcQIn documentation, : is used, I thought it should be =
So what should it be? : or =
Should the line be within single or double quotes, or none?Further down in documentation, if using .env (I don't) = is used to pass the environment variable.
I have tried all, but none seems to work (I have made sure there is nothing in data/config.json) and I stop and start the container in between.
The password
test1234is denied no matter what I try and have to rely on clear text password in my docker-compose.yml (using =)Please help me understand.
Edit
Nvm, I figured it out, I got it working by removing the single quotes and using =
I must have missed testing that particular way of doing it... Working line for
test1234is:ADMIN_TOKEN=$$argon2id$$v=19$$m=65540,t=3,p=4$$OWCDyog7bYbLuzzwTCd81knz9EtXh5ObEGgZqQr9hy4$$cpKWWx1KdXAlAUyZo+WfwhgJ+OVctdYd1Wzl6F+dCcQAll reactions