How do I Access the Syncthing GUI?

I installed syncthing on my OpenWRT a while back in hopes of fixing syncing issues caused by my devices generally never being awake at the same times. I have yet to actually use it because I have no idea how to actually configure it now. Trying 192.168.1.1:8384 doesn't connect at all, 0.0.0.0:8384 connects but gives nothing but "Host check failed". I don't see any guides anywhere for how to reach the GUI when it's running on OpenWRT. My searches all tend to yield things relating to local syncthing or not syncthing at all.

Thanks!

By default syncthing is listening on localhost (127.0.0.1) only. You can either edit the config file changing the ListenAddress from "default" to 192.168.1.1 or access to it via a SSH tunnel e. g. sth. like ssh -L <local-port>:<remotehost>:<remote-port> <username>@<remotehost>.

1 Like

How do I change the ListenAddress? I thought it was the option gui_address 'http://0.0.0.0:8384' line in /etc/config/syncthing but that didn't change what I'm getting.

Hmm ... 0.0.0.0 seems to be set as default here. No clue why this is done. I would never do it. But then I don't know what is the issue here. As I tried it some time ago on an old router there wasn't a config within /etc/config.

Is there anything within logread output regarding syncthing? Is it running at all resp. enabled within the config?

After sshing to the router itself and checking services, it diddn't appear as if the syncthing service was running. Trying to start it via service doesn't appear to do anything. Starting it with syncthing actually seems to work, yet changes nothing about my inability to access the GUI. Also it complains about being run as root. So I suppose I also have to manually configure it to start the way it's supposed to as well? I don't know how to do that either. Nothing I do produces so much as a single line on the system log.

I also tried using ssh -L 8384:192.168.1.1:8384 root@192.168.1.1:8384 and got port bind fail. Then the same command but with the local port as 42069 instead, and it connected as if I didn't use -L but nothing else changed except now if I try connecting to 0.0.0.0:42069 while that ssh session is running it gets spammed with 10x connection refused errors. This happens exactly the same before and after syncthing was started with the syncthing command.

I've got syncthing running on my x86 router (192.168.1.254). The syncthing home dir and data are stored on an ssd on sda3

See my config below as an example.

config syncthing 'syncthing'
        option enabled '1'

        option gui_address 'http://192.168.1.254:8384'

        # Use internal flash for evaluation purpouses. Use external storage
        #   for production.
        # This filesystem must either support ownership/attributes or
        #   be readable/writable by the user specified in
        #   'option user'.
        # Consult syslog if things go wrong.
        option home '/mnt/sda3/syncthing'

        # Changes to "niceness"/macprocs are not picked up by "reload_config"
        #   nor by "restart": the service has to be stopped/started
        #   for those to take effect
        option nice '19'

        # 0 to match the number of CPUs (default)
        # >0 to explicitly specify concurrency
        option macprocs '2'

        # Running as 'root' is possible, but not recommended
        option user 'syncthing'

        option logfile '/mnt/sda3/syncthing/syncthing.log'
        option log_max_old_files 7
        # Size in bytes
        option log_max_size 1048576

        # # CLI options with no value should be defined as booleans and theirs
        # # names should be prefixed with '_'.
        option _no_default_folder '1'

        # # Extra settings
        # list _ 'verbose'

Make sure to set the correct group and permissions on the syncthing directory / folder

drwx------    4 syncthin syncthin      3488 Jun 16 11:05 syncthing

I found the solution.

It wasn't enabled in the config. I don't know if I missed it or if it was just never mentioned but I had to manually edit the config to enable it.
/etc/config/syncthing
option enabled '0' -> '1'

I can now access the GUI normally via 192.168.1.1:8384

Thanks for all your help.

2 Likes

This is because your ssh instance is not listening on port 8384 but on 22. In addition to that if you e. g. run a syncthing instance on your client you are try to access from port 8384 is used already. You could use a different port for . E. g. 8080. The line should look like:

ssh -L 8080:192.168.1.1:8384 root@192.168.1.1 -p 22

Then you should be able to connect via a browser with 127.0.0.1:8080 to it.

Glad you've found the issue. :smiley: