Relay in docker keep the same id

Hi, I created a docker image to have my private relay because of my company block Syncthing due to the classification by the firewall as a P2P.

Everything is working fine (I use Alpine and S6-overlay and I stream through NGinx Proxy Manager from an authorize port in my company). I use as reference the Dockerfile on the GitHub.

But I’m facing a long-term problem. That is, everytime I stop, delete and recreate the container (with docker compose), my relay ID change. It does not happened every day, but when this happen, I need to change my clients sync protocol listen address.

Actually, I have only the /var/strelaysrv, as the GitHub, but may be there is something else to mount to keep this ID? I don’t know, it’s just a theory.

As far as I know the relay server uses keys to form an ID. The key-dir is per default ., the working directory /var/strelaysrv (inside the container). Either keys are created, if not present, or re-used. So if you map a volume /dir/outside/docker/:/var/strelaysrv then it should keep the same id.

1 Like

My bad, I’m an idiot…

I had an error in my first build, that said it didn’t have permission to create .pem file. I added the parameter -keys="/etc/strelaysrv" as in the doc…

I add a cd to the /var/strelaysrv and run the relay several times, it works! I don’t know why I have to do a cd, as the directory is the home of the user, but maybe s6-overlay have to work like this.

Anyway, problem solved!

Thank you very much!

1 Like

Good to hear that it was resolved:)

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