Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make default folder persistent #447

Closed
tomaszduda23 opened this issue Nov 20, 2023 · 1 comment · Fixed by #452
Closed

make default folder persistent #447

tomaszduda23 opened this issue Nov 20, 2023 · 1 comment · Fixed by #452
Labels
syncthing syncthing Addon

Comments

@tomaszduda23
Copy link

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/"
@Poeschl Poeschl added the syncthing syncthing Addon label Nov 20, 2023
@salim-b
Copy link
Contributor

salim-b commented Dec 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
syncthing syncthing Addon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants