# Database encryption after upgrade to 2.4.0.0

**URL:** <https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720>\
**Category:** Support\
**Created:** [September 23, 2026, 8:05am UTC](https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720 "2026-09-23T08:05:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![coral6691](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@coral6691](https://forum.duplicati.com/u/coral6691)\
**Post date:** [September 23, 2026, 8:05am UTC](https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720/1 "2026-09-23T08:05:10Z")

</div>

I upgraded to 2.4.0.0 on my Ubuntu 24.04.05 machine. Duplicati seemed to run fine after rebooting (successfully completed a LAN backup) but got this message on start (from terminal only):

> The database appears to be encrypted, but no key was specified. Opening the database will likely fail. Use the environment variable SETTINGS\_ENCRYPTION\_KEY to specify the key.

I do not remember setting an encryption key, so I followed the instructions in the changelog to create a new encryption key using a preload.json file. Unfortunately Duplicati now crashes on start with “Encryption key used to encrypt target settings does not match current key.” This is the full crash message:

> Duplicati.Library.Interface.UserInformationException: Server crashed on startup  
> —\> System.Exception: A serious error occurred in Duplicati: Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key.  
> at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key)  
> at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key)  
> at Duplicati.Server.Database.Connection.\<\>c\_\_DisplayClass43\_0.b\_\_0(IDataReader rd)  
> at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext() at System.Linq.Enumerable.<ToArray>g__EnumerableToArray|324_0[TSource](IEnumerable`1 source)  
> at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep)  
> at Duplicati.Server.Database.Connection.GetSettings(Int64 id)  
> at Duplicati.Server.Database.ServerSettings.ReloadSettings()  
> at Duplicati.Server.Database.ServerSettings..ctor(Connection con)  
> at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter)  
> at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption) at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] _args) ---> Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key. at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key) at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key) at Duplicati.Server.Database.Connection.<>c __DisplayClass43_0.<GetSettings>b__ 0(IDataReader rd) at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext()  
> at System.Linq.Enumerable.g\_\_EnumerableToArray|324\_0[TSource](IEnumerable`1 source) at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep) at Duplicati.Server.Database.Connection.GetSettings(Int64 id) at Duplicati.Server.Database.ServerSettings.ReloadSettings() at Duplicati.Server.Database.ServerSettings..ctor(Connection con) at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter) at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption)  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] \_args)  
> — End of inner exception stack trace —  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] \_args)  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper.\<\>c\_\_DisplayClass5\_0.\<.ctor\>b\_\_0(Object \_)  
> — End of inner exception stack trace —  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(IApplicationSettings applicationSettings, String[] args)  
> at Duplicati.GUI.TrayIcon.Program.RunMain(String[] \_args)  
> at Duplicati.GUI.TrayIcon.Program.Main(String[] \_args)

I have tried to remove the `preload.json` file but that made no difference. Any idea how to fix this? I can live with no encryption of the local database as this system is not critical, if that helps.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [September 23, 2026, 10:15am UTC](https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720/2 "2026-09-23T10:15:42Z")

</div>

> [@coral6691](#):
>
> but got this message on start (from terminal only):
> 
> > The database appears to be encrypted, but no key was specified. Opening the database will likely fail. Use the environment variable SETTINGS\_ENCRYPTION\_KEY to specify the key.

This is a logic bug where the check for the encryption key is done too early. The encryption key is then in the default secret provider. For Ubuntu, you can open “Seahorse” and you should see the `duplicati-server-encryption-key` secret in there.

> [@coral6691](#):
>
> Unfortunately Duplicati now crashes on start with “Encryption key used to encrypt target settings does not match current key.” This is the full crash message:

That is because the settings are encrypted with a different key, and the `preload.json` overrides the default value, so now it fails.

> [@coral6691](#):
>
> I have tried to remove the `preload.json` file but that made no difference.

It should fix the issue if you remove the `preload.json` because you are then back to the default secret provider.

> [@coral6691](#):
>
> I can live with no encryption of the local database as this system is not critical, if that helps.

There are a few options.

1. Ignore the warning on startup. It is wrong.
2. Start with `--disable-db-encryption` to remove encryption
3. Use the key from Seahorse in `preload.json` so they agree.

---

<div class="post-metadata">

**Author:** ![coral6691](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@coral6691](https://forum.duplicati.com/u/coral6691)\
**Post date:** [September 23, 2026, 12:25pm UTC](https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720/3 "2026-09-23T12:25:31Z")

</div>

Hi Ken,

First, thank you for the quick response. Unfortunately Duplicati is still failing to load. I created a new preload.json with the key from Seahorse. Loading from the command line generates this:

> Crash!  
> Duplicati.Library.Interface.UserInformationException: Server crashed on startup  
> —\> System.Exception: A serious error occurred in Duplicati: Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key.  
> at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key)  
> at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key)  
> at Duplicati.Server.Database.Connection.\<\>c\_\_DisplayClass43\_0.b\_\_0(IDataReader rd)  
> at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext() at System.Linq.Enumerable.<ToArray>g__EnumerableToArray|324_0[TSource](IEnumerable`1 source)  
> at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep)  
> at Duplicati.Server.Database.Connection.GetSettings(Int64 id)  
> at Duplicati.Server.Database.ServerSettings.ReloadSettings()  
> at Duplicati.Server.Database.ServerSettings..ctor(Connection con)  
> at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter)  
> at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption) at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] _args) ---> Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key. at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key) at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key) at Duplicati.Server.Database.Connection.<>c __DisplayClass43_0.<GetSettings>b__ 0(IDataReader rd) at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext()  
> at System.Linq.Enumerable.g\_\_EnumerableToArray|324\_0[TSource](IEnumerable`1 source) at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep) at Duplicati.Server.Database.Connection.GetSettings(Int64 id) at Duplicati.Server.Database.ServerSettings.ReloadSettings() at Duplicati.Server.Database.ServerSettings..ctor(Connection con) at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter) at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption)  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> — End of inner exception stack trace —  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper.\<\>c\_\_DisplayClass5\_0.\<.ctor\>b\_\_0(Object \_)  
> — End of inner exception stack trace —  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(IApplicationSettings applicationSettings, String args)  
> at Duplicati.GUI.TrayIcon.Program.RunMain(String \_args)  
> at Duplicati.GUI.TrayIcon.Program.Main(String \_args)

Loading it from the terminal with the `--disable-db-encryption` option generates this:

> The database appears to be encrypted, but no key was specified. Opening the database will likely fail. Use the environment variable SETTINGS\_ENCRYPTION\_KEY to specify the key.  
> Crash!  
> Duplicati.Library.Interface.UserInformationException: Server crashed on startup  
> —\> System.Exception: A serious error occurred in Duplicati: Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key.  
> at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key)  
> at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key)  
> at Duplicati.Server.Database.Connection.\<\>c\_\_DisplayClass43\_0.b\_\_0(IDataReader rd)  
> at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext() at System.Linq.Enumerable.<ToArray>g__EnumerableToArray|324_0[TSource](IEnumerable`1 source)  
> at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep)  
> at Duplicati.Server.Database.Connection.GetSettings(Int64 id)  
> at Duplicati.Server.Database.ServerSettings.ReloadSettings()  
> at Duplicati.Server.Database.ServerSettings..ctor(Connection con)  
> at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter)  
> at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption) at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] _args) ---> Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key. at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key) at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key) at Duplicati.Server.Database.Connection.<>c __DisplayClass43_0.<GetSettings>b__ 0(IDataReader rd) at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext()  
> at System.Linq.Enumerable.g\_\_EnumerableToArray|324\_0[TSource](IEnumerable`1 source) at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep) at Duplicati.Server.Database.Connection.GetSettings(Int64 id) at Duplicati.Server.Database.ServerSettings.ReloadSettings() at Duplicati.Server.Database.ServerSettings..ctor(Connection con) at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter) at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption)  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> — End of inner exception stack trace —  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper.\<\>c\_\_DisplayClass5\_0.\<.ctor\>b\_\_0(Object \_)  
> — End of inner exception stack trace —  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(IApplicationSettings applicationSettings, String args)  
> at Duplicati.GUI.TrayIcon.Program.RunMain(String \_args)  
> at Duplicati.GUI.TrayIcon.Program.Main(String \_args)

Loading from the GUI in a similar manner:

> Duplicati.Library.Interface.UserInformationException: Server crashed on startup  
> —\> System.Exception: A serious error occurred in Duplicati: Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key.  
> at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key)  
> at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key)  
> at Duplicati.Server.Database.Connection.\<\>c\_\_DisplayClass43\_0.b\_\_0(IDataReader rd)  
> at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext() at System.Linq.Enumerable.<ToArray>g__EnumerableToArray|324_0[TSource](IEnumerable`1 source)  
> at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep)  
> at Duplicati.Server.Database.Connection.GetSettings(Int64 id)  
> at Duplicati.Server.Database.ServerSettings.ReloadSettings()  
> at Duplicati.Server.Database.ServerSettings..ctor(Connection con)  
> at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter)  
> at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption) at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String[] _args) ---> Duplicati.Library.Interface.SettingsEncryptionKeyMismatchException: Encryption key used to encrypt target settings does not match current key. at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key) at Duplicati.Server.Database.Connection.DecryptSensitiveFields(String fieldValue, KeyInstance key) at Duplicati.Server.Database.Connection.<>c __DisplayClass43_0.<GetSettings>b__ 0(IDataReader rd) at Duplicati.Server.Database.Connection.Read[T](IDbCommand cmd, Func`2 f)+MoveNext()  
> at System.Linq.Enumerable.g\_\_EnumerableToArray|324\_0[TSource](IEnumerable`1 source) at Duplicati.Server.Database.Connection.ReadFromDb[T](Func`2 f, Action`1 prep) at Duplicati.Server.Database.Connection.GetSettings(Int64 id) at Duplicati.Server.Database.ServerSettings.ReloadSettings() at Duplicati.Server.Database.ServerSettings..ctor(Connection con) at Duplicati.Server.Database.Connection..ctor(IDbConnection connection, Boolean disableFieldEncryption, KeyInstance key, String dataFolder, Action startOrStopUsageReporter) at Duplicati.Server.Program.GetDatabaseConnection(IApplicationSettings applicationSettings, Dictionary`2 commandlineOptions, Boolean silentConsole, Boolean changeDbEncryption)  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> — End of inner exception stack trace —  
> at Duplicati.Server.Program.Main(IApplicationSettings applicationSettings, String \_args)  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper.\<\>c\_\_DisplayClass5\_0.\<.ctor\>b\_\_0(Object \_)  
> — End of inner exception stack trace —  
> at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(IApplicationSettings applicationSettings, String args)  
> at Duplicati.GUI.TrayIcon.Program.RunMain(String \_args)  
> at Duplicati.GUI.TrayIcon.Program.Main(String \_args)

---

<div class="post-metadata">

**Author:** ![coral6691](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@coral6691](https://forum.duplicati.com/u/coral6691)\
**Post date:** [September 25, 2026, 10:11am UTC](https://forum.duplicati.com/t/database-encryption-after-upgrade-to-2-4-0-0/22720/4 "2026-09-25T10:11:50Z")

</div>

If anybody gets stuck in the same situation, this may work for you too:

1. backup the new database (should be v12 in Duplicati 2.4.0.0)
2. replace it with the v11 version, i.e. overwrite Duplicati-server.sqlite with the old database (should be named something like "backup Duplicati-server 20260914104202.sqlite))
3. download the 2.3 version you had before and install
4. run it with `duplicati --disable-db-encryption`
5. assuming it works fine, quit and reinstall 2.4

If you want to keep the Seahorse key, start 2.4 with `duplicati --settings-encryption-key='SEAHORSE_KEY'`, replacing `SEAHORSE_KEY` with the actual key. It should start fine from CLI or GUI after this.

Please don’t ask me “what if this or that” as I’m not a Duplicati expert. Try using an AI to help you (as I did, even if it’s still taken me nearly a whole day).

Good luck.
