Poeschl / Hassio-Addons

The repository for my Home Assistant Supervisor Add-ons.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make default folder persistent

tomaszduda23 opened this issue · comments

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/"

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

  • Syncthing's GUI: ActionsAdvancedDefaultsDefault folderPath
  • Syncthing's CLI (from within the add-on container): syncthing cli config defaults folder path set /PATH/TO/WHEREVER