Poeschl / Hassio-Addons

The repository for my Home Assistant Supervisor Add-ons.
Apache License 2.0
298 stars 89 forks source link

make default folder persistent #447

Closed tomaszduda23 closed 5 months ago

tomaszduda23 commented 7 months ago

Which addon? syncthing

Is your feature request related to a problem? Please describe. If container is restarted default data are lost. It is easy to miss during configuration.

Describe the solution you'd like It would be nice if default folder would be placed inside addon's persistent date. It could be done by setting HOME env vaialb.e

Additional context

You could also set STNODEFAULTFOLDER to prevent creating default sync directory.

My example config looked like this.

    env:
      - name: STNODEFAULTFOLDER
        value: "1"
      - name: HOME
        value: "/var/syncthing-data/"
salim-b commented 6 months ago

Syncthing's command-line arguments or environment variables allow to configure config and database directory paths, i.e.

This add-on already sets --home=/data/config. IMHO it would be better to keep config and database/state separated, but that's a different discussion.

However, by setting --home=/data/config (which maps to /mnt/data/supervisor/addons/data/243ffc37_syncthing/config/ in the HA host) the add-on already stores both config and database/state to persistent storage by default (at least since v1.16.1).

I think what you're looking for is the default folder path configuration option (folder paths ≠ database/state path). It can be set either via