I blogged about my switch from using 1Password to a self-hosted version of Bitwarden here, and its been running perfectly ever since. That said, I had tried updating Bitwarden a couple of times, all of which have failed and I’d ended up rolling back a snapshot. I tried updating Bitwarden again this weekend, with a much more successful outcome!

From the website, updating Bitwarden shouldn’t be more difficult than running 2 bash commands!

I’ve tried this a couple of times before and each time it has failed. I appeared to end up with a clean install which had lost all of my configuration settings and subsequently failed to launch. I’d not got to the bottom of why, so ended up rolling back the VM disk snapshot to get everything working again.

This attempt included the start of creating a completely separate VM which I was going to use just for running Bitwarden, but thankfully during this process, I noticed the fairly simple problem, which I resolved allowing me to successfully update Bitwarden.

So what was the problem? It turns out that when I’d installed Bitwarden originally it had installed into the / system root directory so I had bitwarden.sh and the bwdata folder at the / level. The update routine appears to be looking for this in the /root home folder, and when it doesn’t find them effectively creates new files and folders, missing all of the configurations and most importantly the database.

I spotted that this time as I was trying to access the admin panel, and changing the relevant settings in the /root/bwdata/env/global.override.env file wasn’t working. I then noticed that I had things duplicated at the / and /root folders, with all my configuration at the / system root level

Deleting everything at /root, moving the files and folders from / to /root and running the update again worked perfectly and hopefully means that keeping Bitwarden a little more up-to-date should be very easy to do. From memory (and to help me updating in the future), the commands went something like this:

rm /root/bitwarden.sh
rm -rf /root/bwdata
mv /bitwarden.sh /root
mv /bwdata /root
./bitwarden.sh updateself
./bitwarden.sh update

The database migration failed to start initially, but I suspect this was down to it being repaired after being moved, and the permissions probably not being right. I could see this being fixed in the Docker container log, and once that was complete the migration only took a few seconds. There was nervousness when I tried to access things remotely and then tried to sync the various clients, but there needn’t have been as everything worked fine.

The server version I’d installed earlier this year was 1.32 and I’m now running 1.34 as per the release notes here. The web version also updated from 2.12 to 2.14 (see here). The clients running on macOS and iOS have been updating themselves, and were still working, although they’d introduced a trash folder for deleted password, which didn’t work as the server version didn’t have this. The sync functionality had also become a little less reliable, soI’ll put that down to a lack of updates for a few months, and try and keep things a little more up-to-date moving forward.

The advice from the original blog is still just as relevant though – If you’re not using a password manager already, why not? It’s pretty much essential now for anyone but an online hermit, but if you’re not sure which solution to choose here’s a pretty good comparison of the leading players, including 1Password and Bitwarden. Don’t choose to do nothing! Any password manager would be better than no password manager, so what are you waiting for?