User for syncthing container

I create my first container with the description in on a TerraMaster NAS which runs with openmediavault.

When I use PGID 0 (= root) the container starts normal, but I get a message to not use a privileged user in syncthing.

So I create a new user in openmediavault syncth with ID 1002. When I use this as PGID in ENV, syncthing is not reachable. In the log of the container I see:
[start] 11:06:17 INFO: syncthing v1.3.3 “Fermium Flea” (go1.13.4 linux-amd64) root@f05d13c5d1dd 2020-01-07 05:33:20 UTC
[start] 11:06:17 INFO: Generating ECDSA key and certificate for syncthing…
[start] 11:06:17 WARNING: Failed to load/generate certificate: save cert: open /config/cert.pem: permission denied

Can you give me a hint, where the problem is?

Thanks in advance


You need to make sure the folders mapped are owned by the puid/pgid you’re setting

Thank you aptalca, that it was.