# Admin token does not work, even with correct argon2 token

**URL:** <https://vaultwarden.discourse.group/t/admin-token-does-not-work-even-with-correct-argon2-token/2455>\
**Category:** Help\
**Created:** [March 11, 2023, 3:02pm UTC](https://vaultwarden.discourse.group/t/admin-token-does-not-work-even-with-correct-argon2-token/2455 "2023-03-11T15:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaladCesar](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@SaladCesar](https://vaultwarden.discourse.group/u/SaladCesar)\
**Post date:** [March 11, 2023, 3:02pm UTC](https://vaultwarden.discourse.group/t/admin-token-does-not-work-even-with-correct-argon2-token/2455/1 "2023-03-11T15:02:33Z")

</div>

Hi,  
I just installed Vaultwarden via docker compose. Here is my compose file:

```auto
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    networks:
      - services
    security_opt:
      - no-new-privileges:true
    #ports:
    # - 9445:80 #map any custom port to use (replace 8445 not 80)
    volumes:
     - ${CONFIG_FOLDER}/bitwarden:/data:rw
    environment:
     - PUID=${PUID}
     - PGID=${PGID}
     - UMASK=${UMASK}
     - TZ=${TZ}
     - ADMIN_TOKEN=mytoken
     - WEBSOCKET_ENABLED=true
     - SIGNUPS_ALLOWED=false
     - SMTP_HOST=mailu-front
     - SMTP_FROM=vaultwarden@mydomain.com
     - SMTP_FROM_NAME=Vaultwarden
     - SMTP_PORT=587
     - SMTP_SECURITY=starttls
     - SMTP_USERNAME=vaultwarden@mydomain.com
     - SMTP_PASSWORD=mysmtppassword
     - DOMAIN=https://vaultwarden.mydomain.com
    labels:
      caddy: vaultwarden.mydomain.com
      caddy.reverse_proxy: vaultwarden:80

```

I generated the admin token as said by the doc, using argon2 bitwarden defaults from [Enabling admin page · dani-garcia/vaultwarden Wiki · GitHub](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#using-argon2)  
I correctly set double $$ so there is no docker compose interpolation.

I checked that the token was correct multiple times, and it is. But vaultwarden admin page keeps telling me that the admin token is invalid.

I checked using an online tool, the plain text password and the hash I supplied to vaultwarden are correct.

If I try with a plaintext password directly, and not using argon2 at all, it works. So it clearly has a problem with argon2 but I can’t find what.

Is there something else to do that I missed ? I didn’t find additional information in the docs. What should I do ?  
Thanks in advance for any answer, have a great day.

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [March 11, 2023, 3:29pm UTC](https://vaultwarden.discourse.group/t/admin-token-does-not-work-even-with-correct-argon2-token/2455/2 "2023-03-11T15:29:13Z")

</div>

If you would have read that part correctly, it starts with a warning note that it isn’t yet in the latest image!

---

<div class="post-metadata">

**Author:** ![SaladCesar](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@SaladCesar](https://vaultwarden.discourse.group/u/SaladCesar)\
**Post date:** [March 11, 2023, 3:30pm UTC](https://vaultwarden.discourse.group/t/admin-token-does-not-work-even-with-correct-argon2-token/2455/3 "2023-03-11T15:30:35Z")

</div>

Oh right I missed that ! Can’t believe I didn’t see it, sorry for bothering.
