Renew https cert after network switch for vaultwarden

Hello there,

I have moved homes and have a new network configuration, my diet-pi box now has a new ip address .

I’ve reconfigured my diet-pi which runs vaultwarden and I am able to successfully connect to the web vault on the new ip address but when I try to connect via the android client I am unable to change the vault to point at the new self-hosted vault because the https cert uses the old ip address.

I tried running ditepi-software reinstall vaultwarden but that didn’t seem to make any difference.

I seem to remember I had to grab the https cert from the diet-pi box and manually install it on my android device, which I’m fine with doing however I’m not sure what I need to do to get a new https cert that I can install.

Thanks in advance

It’s a local install without internet access correct?

Hi there, yes that’s correct.

You might need to delete original cert first and install Vaultwarden manually to force reinstall. Ensure you have created a backup beforehand.

systemctl stop vaultwarden.service
cd /tmp/
rm /mnt/dietpi_userdata/vaultwarden/cert.pem /mnt/dietpi_userdata/vaultwarden/privkey.pem
curl -sSfL https://dietpi.com/downloads/binaries/bookworm/vaultwarden_aarch64.deb -o vaultwarden_aarch64.deb
apt install --reinstall ./vaultwarden_aarch64.deb
rm ./vaultwarden_aarch64.deb
systemctl start vaultwarden.service

I assumed it’s a aarch64 system, as I don’t know your system architecture. You might need to replace above command witch your actual architecture.

Thanks for this,

However - it didn’t work.

When running the aps install command it was saying about incorrect version of libc6 (and two others) being installed, that number it was reporting as installed was lower than the required one, but when I tried to update libc6 but it reported back that the latest version was already installed. Not overly familiar with linux so I probably missed something obvious.

What I did was take an image of my sd card. I then backed up my vaults, uninstalled and reinstalled vaultwarden. I then imported my vault and upgraded the certificate on my android devices and windows client.

All is working apart from the windows client, which I’m not too worried about as I can access the web portal if I need to.

Thanks.

As said above, I assumed you are running 64bit system. If this is not the case, you would need to adjust commands to download correct version.

I am running a Raspberry pi zero w 2 and it reports that it is aarch64 when I login so I thought that it was correct.

Yes 64bit is correct. But even 32bit would be working as both are supported by Zero 2 and RPi4