# Setting SQLite cache options in Docker

**URL:** <https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970>\
**Category:** Installation\
**Created:** [July 24, 2025, 11:39pm UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970 "2025-07-24T23:39:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cybrnook](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/6bbea6/32.png) [@cybrnook](https://forum.duplicati.com/u/cybrnook)\
**Post date:** [July 24, 2025, 11:39pm UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/1 "2025-07-24T23:39:53Z")

</div>

@kenkendk @ts678 Do you gentlemen know, is it possible to modify and/or pass this variable into a docker container? I think I am experiencing this very issue on my new Duplicati setup, however I am using a [linuxserver.io](http://linuxserver.io) provided container on Unraid. I think I am running in circles with trying to pass this value into the system. At the moment [linuxserver.io](http://linuxserver.io) is only providing the stable and development tags, so I can’t switch to the experimental to get this value from your PR, so I am trying to do the manual approach of somehow getting a preload.json.

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [July 24, 2025, 11:53pm UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/2 "2025-07-24T23:53:02Z")

</div>

Welcome to the forum @cybrnook

> [@cybrnook](#):
>
> I think I am running in circles with trying to pass this value into the system.

I don’t do Docker, but have you seen environment setting in [documentation](https://hub.docker.com/r/linuxserver/duplicati)?

---

<div class="post-metadata">

**Author:** ![cybrnook](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/6bbea6/32.png) [@cybrnook](https://forum.duplicati.com/u/cybrnook)\
**Post date:** [July 25, 2025, 12:37am UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/3 "2025-07-25T00:37:25Z")

</div>

Yeah… I saw what they were offering, but either I am over thinking it or it’s just not quite what we need. So from their docu, the two options we really have are the [CLI\_ARGS](https://prev-docs.duplicati.com/en/latest/07-other-command-line-utilities/) option, which I don’t see how that helps and then they offer the ability to mask container variables in a file and then just call the file. I think it’s coincidental that they are calling that FILE\_\_ option “secrets” when in fact Duplicati has the [Docker Secret Manager](https://docs.duplicati.com/detailed-descriptions/using-duplicati-from-docker#managing-secrets-in-docker) option which I think is something different (but then again, maybe not… been staring at it too long with too many distractions in between I prob just need to step back and then revisit).

I think the proper form would be adding the preload.json file in the docker compose section, but I don’t think Unraid has a vanilla docker setup and I just don’t see how to add the preload.json file. I assume it would look like this:

```plaintext
{
  "env": {
    "server": {
        "SETTINGS_ENCRYPTION_KEY": "<real encryption key>",
        "DUPLICATI__WEBSERVICE_PASSWORD": "<ui password>"
        "CUSTOMSQLITEOPTIONS_DUPLICATI": "cache_size=-100000"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![cybrnook](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/c/6bbea6/32.png) [@cybrnook](https://forum.duplicati.com/u/cybrnook)\
**Post date:** [July 25, 2025, 12:53am UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/4 "2025-07-25T00:53:02Z")

</div>

@ts678 is there a way to query the current cache size value once the system is up and running to help me verify if I get it working or not?

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [July 25, 2025, 1:13am UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/5 "2025-07-25T01:13:43Z")

</div>

I was thinking of their documentation for `docker-compose` and `docker-cli` environment.

> [@cybrnook](#):
>
> is there a way to query the current cache size value once the system is up and running

You can probably docker exec in and run `ps` with `e` option to show process environment which could show if the variable made it in. You can also get logging at verbose level. You can watch About → Show log → Live --Verbose at start of the operation for log output like:

> Setting custom SQLite option ‘cache\_size=-200000’.

---

<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:** [August 5, 2025, 3:13pm UTC](https://forum.duplicati.com/t/setting-sqlite-cache-options-in-docker/20970/6 "2025-08-05T15:13:49Z")

</div>

> [@cybrnook](#):
>
> Do you gentlemen know, is it possible to modify and/or pass this variable into a docker container?

It should be quite simple, if you use Docker compose, it would be:

```plaintext
services:
  duplicati:
    image: lscr.io/linuxserver/duplicati:latest
    container_name: duplicati
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - SETTINGS_ENCRYPTION_KEY=
      - CLI_ARGS= #optional
      - DUPLICATI__WEBSERVICE_PASSWORD= #optional
      - CUSTOMSQLITEOPTIONS_DUPLICATI=-100000
    volumes:
      - /path/to/duplicati/config:/config
      - /path/to/backups:/backups
      - /path/to/source:/source
    ports:
      - 8200:8200
    restart: unless-stopped

```

If you use something else, you should be able to pass environment variables there.

> [@Backup Slows Down In Process](https://forum.duplicati.com/t/backup-slows-down-in-process/20509/11):
>
> I think the proper form would be adding the preload.json file in the docker compose section, but I don’t think Unraid has a vanilla docker setup and I just don’t see how to add the preload.json file.

You can use that way, but you need to store the file on the host system, then mount it into the Docker container in a place where Duplicati looks for it.
