Syncthing docker instance can't reach IPv6

Greetings folks. I have a similar setup to the one in this post: Discovery Failures: connection refused for v4 and v6

So, I have a Linux laptop, an android smartphone and a raspberry pi 5. The Pi5 is running Syncthing on a docker container. Everything works properly, but I notice that ST on the Pi5 has issues connecting to IPv6.

image

The Docker on the Pi is configured to support IPv6 as stated here Use IPv6 networking | Docker Docs . I can reach IPv6 servers when I try them from the Docker host. I’m at a loss. Can someone give me a hand with this? Thanks in advance. Cheers

What exactly did you configure? Simple IPv6 connectivity doesn’t require any manual configuration if you don’t intend to address containers with their own IPv6

I did this:

The Pi itself comes with IPv6 enabled on it’s eth0, but the bridge0 interface didn’t have IPv6 enabled. It thought that was the cause for Syncthing’s IPv6 issues and that’s why I made those changes. But it didn’t help. I still only get 4/5 on the Pi and it keeps outputting the same error message that I pasted in the first post.

I’d recommend switching to host networking mode. This also improves Syncthings ability to discover local IPs.

The issue was with docker’s default network. Even though I had enabled IPv6 on it (as per documentation) it just wouldn’t work. I decided to add another network in the docker compose yaml and bind syncthing’s network to that specific new network and it worked fine. This is what I had to configure in the yaml:

image

While this might work, you’ll miss out on better discovery. Host network mode is the way to go :wink:

I can’t see how. Right now my discovery is stating 5/5. Isn’t that the max? Or is it possible to have 5/5 and the discoverability still being somewhat weaker than desired?

It means that 5 methods for announcing its local address are configured and working. But if that address is not reachable from outside the container, then the info isn’t worth a lot.

I see. But it is bridged. How would that address not be reachable from outside? The only way would be through a firewall, right? I honestly don’t get it why I would need to go with host_network instead of a simple bridge. And I’m not arguing with you guys. I thank you a lot for your help. I’m just trying to understand why the developers would think the host_network is more suited than a bridge. Thanks a lot :wink:

If it’s fully bridged and no kind of NAT or masquerading is involved, than you’re right.

1 Like