Token Error 500 when upgrading to 2023.12

Hi everyone,

I’ve been banging my head against this error since 2023.12 came out.

I’m running a selfhosted instance of bitwarden on a Debian 12 VM. Currently I am running 2023.10.3 without issue (except a 500 error when I try to reach the admin page, but it’s a different story).

Every time when I upgrade to 2023.12 I can’t log into my vault or sync to it: the upgrade is successful, all docker instances show 2023.12 and healthy, I can reach my vault page over https at my usual domain (it’s behind a haproxy reverse proxy on pfsense, usual selfhosted fare).

When I insert the password, a get “an unexpected error occured”, which in the network view of my browsers (brave and firefox), relates to a 500 error with the “token”. My clients cannot sync, both from browser extensions or the desktop software.

Downgrading to 2023.10.3 solves the issue.

Has anyone had a similar issue? Can you point me to some obvious stuff I’m missing?

I have the same issue even when upgrading to 2024.1.0.

I think it’s related to indentity.pfk not being recreated correctly when upgrading, as per this albeit old bitwardengithub post.

The logs in bwdata/logs/identity and nginx seem to point to the identity key being missing or corrupted.

Anyone else?