Unable to connect to webGUI on Linux

Hi there! I would appreciate your help. I’m a newbie with Syncthing so bear with me. So I successfully set up Syncthing on my Arch Linux, a separate Windows laptop, and on Android by the previous night by reading the “Getting Started” documentation found on the Syncthing website. I have also added a GUI password as suggested by the webGUI interface.

However, after shutting down my linux and Windows machine and booted them up the next day, I realise that I am no longer able to connect to localhost:8389. I’ve checked my Windows and Android setup and there are all able to connect to the aforementioned port, and the GUI shows that the Linux is not connected. I am not sure what went wrong here. I tried whitelisting the port in ufw on my Linux machine and reinstalling Syncthing but the problem persists.

I have also looked at the config.xml and verified that the address is pointing to

<gui enabled="true" tls="true" debugging="false">

Would appreciate if anyone can help me out. Thanks!

Are you mixing up 8389 and 8384 here? The latter is the default port for the GUI, 8389 is not reserved in Syncthing in any way.

You should check the console / log output when starting Syncthing. It prints its open ports during startup. They might change to random free port numbers when the intended port is unavailable. That might happen if you inadvertently manage to have multiple instances running at the same time on the same host.

What are you using to connect? A browser, which one?

Hi. Apology, I meant to say 8384 rather than 8389.

So I tried finding for the log output via the syncthing -paths command and the log file directory is blank. So using the syncthing -logfilecommand and pointing it to my user directory, everything starts working again.

However, restarting the laptop or closing the terminal causes the issue to reappear again and I have to do the logfile command again to start it to work. What gives?

yncthing -logfile ~/Documents/syncthing.log 
[monitor] 01:26:43 INFO: Log output saved to file "/home/hanjiayi/Documents/syncthing.log"
[start] 01:26:43 INFO: syncthing v1.19.1 "Fermium Flea" (go1.17.7 linux-amd64) syncthing@archlinux 2022-03-01 07:51:35 UTC [noupgrade]
[J5SLP] 01:26:44 INFO: Single thread SHA256 performance is 329 MB/s using crypto/sha256 (326 MB/s using minio/sha256-simd).
[J5SLP] 01:26:45 INFO: Hashing performance is 283.90 MB/s
[J5SLP] 01:26:45 INFO: Overall send rate is unlimited, receive rate is unlimited
[J5SLP] 01:26:45 INFO: Ready to synchronize "Syncthing for  Home" (SyncThingHome) (sendreceive)
[J5SLP] 01:26:45 INFO: Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[J5SLP] 01:26:45 INFO: Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[J5SLP] 01:26:45 INFO: Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[J5SLP] 01:26:45 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[J5SLP] 01:26:45 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[J5SLP] 01:26:45 INFO: TCP listener ([::]:22000) starting
[J5SLP] 01:26:45 INFO: Completed initial scan of sendreceive folder "Syncthing for  Home" (SyncThingHome)
[J5SLP] 01:26:45 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[J5SLP] 01:26:45 INFO: QUIC listener ([::]:22000) starting
[J5SLP] 01:26:45 INFO: GUI and API listening on
[J5SLP] 01:26:45 INFO: Access the GUI via the following URL:
[J5SLP] 01:26:45 INFO: My name is "jiayipc"
[J5SLP] 01:26:45 INFO: Device 3SCQT55-4WQITHM-KBZV4S2-VESBYGJ-CFHNTIT-YKV3KQY-SFW33Q3-WKULEQ5 is "Surface Pro" at [dynamic]
[J5SLP] 01:26:45 INFO: Device QJHJS6E-GZOTY6P-26TSHXG-HWMY2FH-AIWP7QX-2X5DPA5-KLBUPOC-JTLGRAF is "Samsung Galaxy Note 9" at [dynamic]
[J5SLP] 01:26:47 INFO: Established secure connection to 3SCQT55-4WQITHM-KBZV4S2-VESBYGJ-CFHNTIT-YKV3KQY-SFW33Q3-WKULEQ5 at
[J5SLP] 01:26:47 INFO: Device 3SCQT55-4WQITHM-KBZV4S2-VESBYGJ-CFHNTIT-YKV3KQY-SFW33Q3-WKULEQ5 client is "syncthing v1.19.1" named "DESKTOP-G3KCG96" at
[J5SLP] 01:26:59 INFO: Detected 1 NAT service
[J5SLP] 01:27:05 INFO: quic:// detected NAT type: Port restricted NAT
[J5SLP] 01:27:05 INFO: quic:// resolved external address quic:// (via stun.syncthing.net:3478)

BTW I am using Firefox to connect and access the webGUI.

Are you starting Syncthing as a service? By default, it will terminate when you close the terminal it was started from, and will not start automatically after boot.

You may want to look at the GUI wrappers / “Integrations”, e.g. SyncTrayzor on Windows which makes it much easier to use. If you want to run it solely as a background service, there are several choices and detailed manuals for different operating systems.

Thanks for your help. I have added the Syncthing service to systemd and it works. Thanks!

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