Syncthing in container: all settings reset every restart of the container

I’m trying to use the official syncthing/syncthing container, with this compose file:

    image: syncthing/syncthing:latest
    container_name: syncthing
    hostname: syncthing
      - PUID=1001
      - PGID=1001
      - TZ=Etc/UTC
      - /var/home/container/syncthing/config:/config:Z
      - 3333:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      # no discovery (:
    restart: unless-stopped

The problem I’m running into is that on first boot, syncthing was able to happily create and populate its config folder, then write to it when I did as the Web UI asked and created a username and password — but on subsequent restarts of the container, it just simply isn’t reading from, or writing to, the config files it created, and I have zero clue why. It just pops up again, asking for a new username and password and ignoring my other changes as well, as if it was brand new, but without overwriting the config files its supposed to be reading from.

What could be going on here? thanks!

You’re mounting a volume at /config, the container expects it at /var/syncthing.

1 Like

That fixed it, thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.