GUI address and kubernetes

Hello,

I’ve been a happy syncthing user for many years, but I seem to be having problems getting it going on Kubernetes. I’m using the official syncthing image from https://hub.docker.com/r/syncthing/syncthing.

Being in a kubernetes/container environment, I need to get it running with the correct options at startup - reconfiguring on-the-fly is not an option. I’m pretty sure I need to set the gui-address to 0.0.0.0 to make it available as a service in kubernetes, but this doesn’t seem to be working.

I can put my kubernetes manifests here if required, but I think it would be more useful to show what’s running. I set the gui address option to -gui-address=0.0.0.0:8384 and start the container, but when I look at the startup logs, I see

 [M2UQ3] 12:40:37 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/ 

Looking at the config.xml, I can also see that it seems to be set to localhost:

    <gui enabled="true" tls="false" debugging="false">
        <address>127.0.0.1:8384</address>
        ........
    </gui>

…and finally, looking at the process table of the running container, I see:

PID   USER     TIME  COMMAND
    1 1000      0:00 /bin/syncthing -home /var/syncthing/config -verbose -gui-address=0.0.0.0:8384

…which seems to suggest that syncthing has received the relevant startup config.

Any idea what might be happening here…?

You’re looking at the wrong log line.

The “Access the GUI via the following URL:” line is meant to give the user something clickable, something that can (probably) be copy-pasted into a browser. The wildcard address (0.0.0.0) isn’t routable, you can’t type that as a destination adress. So syncthing will replace that address with something more local (localhost) when creating a printable HTTP URL. It doesn’t neccessarily check whether that assumption is true in your network setup.

Directly above this line, you will see something like this in the log:

GUI and API listening on 0.0.0.0:8384

That’s the actual listen address.

2 Likes

Thanks for the speedy reply :smiley:

That line says:

[GJCGP] 14:53:58 INFO: GUI and API listening on [::]:8384

I admit to some ignorance around this - is that IPv6 syntax? Or does it mean v4 and v6…?

1 Like

It is indeed IPv6 syntax, but it means both. So, all interfaces and all addresses, both address families, port 8384.

1 Like

Ah great, so that means it should be working. I guess the issue is with my Ingress Controller in that case. Many Thanks! :smiley::+1:

1 Like

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