Upgrading from Excalibur 0.2 to Excalibur 0.3
In this guide, you'll find steps to update your Excalibur app and server instances to version 0.3.
Please read this guide carefully and follow all steps.
This guide will assume that the 0.3.x version of the Excalibur server is installed. If you are using version 0.2.x, please upgrade to 0.3.x before proceeding.
Configuration File v2
Excalibur 0.3 modifies the configuration file from version 1 to version 2, with the following changes.
- (Since 0.3.1)
server.rate_limitdefaults were changed. In particular, the defaultcapacitywas changed from20to250and the defaultrefill_ratewas changed from1to20. security.account_creation_keywas changed from a 32-character printable ASCII string to a 64-character hexadecimal string. This is to increase the key space size to .- A new field
logging.max_log_agewas added. This field specifies the maximum age of logs to keep.
Existing configuration files can be upgraded by running
excalibur config update
on the server. Verify that the updated configuration is valid by running the command
excalibur config validate
You should see Config is valid! appear in the terminal.
ExEF v3
Excalibur 0.3 also introduces version 3 of the Excalibur Encryption Format (ExEF). Among the changes made to the ExEF is the method of encrypting the data to be stored in the file. This means that ExEF v3 is not compatible with ExEF v2, which is what was being used in Excalibur 0.2.
The ExEF is used in many parts of the application and server. The most relevant two uses are:
- Files stored in users' vaults
- Vault keys stored in the Excalibur database
Unfortunately, due to the incompatibility of ExEF v3 with ExEF v2, it is necessary to reset the vault and database of the Excalibur server. Please make sure to back up your vault before proceeding.
Resetting the Vault
We first need to reset the vault on the Excalibur server.
On the server,
- Navigate to the
excalibur-filesdirectory. - Make sure that the server is not running.
- Delete the
vaultdirectory (or whatever folder is specified asstorage.vault_folderinconfig.toml).
Resetting the Database
We now need to reset the database. Again, on the server,
- Navigate to the
excalibur-filesdirectory. - Make sure that the server is not running.
- Delete
excalibur.duckdb(or whatever database file is specified asstorage.database.fileinconfig.toml). - Run
to initialize the database.
excalibur init
You should see a new excalibur.duckdb file in the excalibur-files directory.
Recreating Users
After these steps are done, you will need to recreate your users on the server. Follow these steps to create new users.
Conclusion
These are the steps to upgrade your Excalibur app and server instances to version 0.3. After following these steps, your Excalibur instance should be running on version 0.3.