RSA keys changed from der to pem, now new vaultwarden can't read old RSA keys anymore #1178

Closed
opened 2026-02-05 00:14:33 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @eriklogtenberg on GitHub (Dec 29, 2021).

Subject of the issue

After upgrade from Vaultwarden 1.21.0 to 1.23.1, server is unable to start. Error message is:
"[vaultwarden][ERROR] Error creating keys, exiting..."

Tracked it down to this commit: 46e0f3c43a, where the default RSA key format (and filename) is changed from DER to PEM. It seems that as a result, the existing DER files can no longer be found.
What is the correct upgrade path?

Deployment environment

Originally created by @eriklogtenberg on GitHub (Dec 29, 2021). <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue After upgrade from Vaultwarden 1.21.0 to 1.23.1, server is unable to start. Error message is: "[vaultwarden][ERROR] Error creating keys, exiting..." Tracked it down to this commit: 46e0f3c43a81ce9411612c152e414162a9c220ac, where the default RSA key format (and filename) is changed from DER to PEM. It seems that as a result, the existing DER files can no longer be found. What is the correct upgrade path? ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: official Docker image from https://hub.docker.com/r/vaultwarden/server
Author
Owner

@BlackDex commented on GitHub (Dec 29, 2021):

It shouldn't be an issue, at all. But you may just remove all those files and new ones will be generated.
It will only only hurt current sessions and invite links which use those files.

@BlackDex commented on GitHub (Dec 29, 2021): It shouldn't be an issue, at all. But you may just remove all those files and new ones will be generated. It will only only hurt current sessions and invite links which use those files.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1178