Duplicati Error Loop

Hello, when first installing the Duplicati container with the docker compose below, I have this error loop.
I put the root user to try to fix the problem and make sure that root has full access to the backup, source, config folder. Root is in the docker group and root has full control over the folders and is the owner.
I tried to recreate the container several times and I also deleted the .sqlite but it didn’t change anything. Web access doesn’t have time to start.
The encryption key and folder locations are just for testing.
I’m on truenas scale, and I use dockge to manage all containers.
Thanks for your help

The docker compose :

services:
  duplicati:
    image: lscr.io/linuxserver/duplicati:latest
    container_name: duplicati
    environment:
      - PUID=0
      - PGID=0
      - TZ=Europe/Paris
      - SETTINGS_ENCRYPTION_KEY=abcde123456
    volumes:
      - /mnt/Jupiter/Duplicati/config:/config
      - /mnt/Jupiter/Duplicati/backups:/backups
      - /mnt/Jupiter/Duplicati/source:/source
    ports:
      - 8200:8200
    restart: unless-stopped
networks: {}

And the beginning of the logs :

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ•‘     β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
      β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•β•β•β•

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    0
User GID:    0
───────────────────────────────────────
Linuxserver.io version: v2.1.0.2_beta_2024-11-29-ls229
Build-date: 2024-12-21T03:56:47+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: Operation not permitted
 ---> System.InvalidOperationException: Operation not permitted
 ---> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
   --- End of inner exception stack trace ---
   at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
   at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
   at Mono.Unix.UnixFileSystemInfo.set_Protection(FilePermissions value)
   at Mono.Unix.UnixFileSystemInfo.set_FileAccessPermissions(FileAccessPermissions value)
   at Duplicati.Library.Common.IO.PosixFile.SetUserGroupAndPermissions(String path, Int64 uid, Int64 gid, Int64 permissions)
   at Duplicati.Library.SQLiteHelper.SQLiteLoader.SetUnixPermissionUserRWOnly(String path)
   at Duplicati.Library.SQLiteHelper.SQLiteLoader.OpenSQLiteFile(IDbConnection con, String path)
   at Duplicati.Library.SQLiteHelper.SQLiteLoader.OpenDatabase(IDbConnection con, String databasePath, String decryptionPassword)
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions, Boolean silentConsole)
   --- End of inner exception stack trace ---
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions, Boolean silentConsole)
   at Duplicati.Server.Program.Main(String[] _args)
A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: The database appears to be encrypted, but the decrypting failed. Please check the password. Error message: Unable to read beyond the end of the stream.
 ---> Duplicati.Library.Interface.UserInformationException: The database appears to be encrypted, but the decrypting failed. Please check the password. Error message: Unable to read beyond the end of the stream.
 ---> System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
   at System.IO.Stream.ReadExactly(Byte[] buffer, Int32 offset, Int32 count)
   at Duplicati.Library.SQLiteHelper.SQLiteRC4Decrypter.DecryptSQLiteFile(String databasePath, String password)
   at Duplicati.Library.SQLiteHelper.SQLiteLoader.OpenDatabase(IDbConnection con, String databasePath, String decryptionPassword)
   --- End of inner exception stack trace ---
   at Duplicati.Library.SQLiteHelper.SQLiteLoader.OpenDatabase(IDbConnection con, String databasePath, String decryptionPassword)
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions, Boolean silentConsole)
   --- End of inner exception stack trace ---
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions, Boolean silentConsole)
   at Duplicati.Server.Program.Main(String[] _args)

I would try to reproduce the issue on a linux box using docker without any ui. We do not test any of our work on truenas scale, or with any docker UI.

Also confirm your /config path is not on a remote mount as commonly users leverage file-based remote mounts which databases do not support. Also confirm your docker storage engine supports the filesystem of your mounts.

1 Like

Thank you very much thanks to your indications
I solved the error loop and was able to start duplicati. My problem was that I had configured the /config of duplicati with an ACL preset in SMB. I then put the /config in a dataset with the acl in generic and everything works wonderfully.

Thank you for your help and your time

just keep in mind that there is no database that supports being on a file-based remote mount, like SMB. It CAN work but it’ll eventually corrupt. We always suggest the /config mount (because nearly everything has a db of some sort) be on local storage only. If it must be remote, databases DO support block based remote storage.

good luck.