restarting Syncthing failed to connect
syncthing[JOGEZ] 2025/02/27 02:27:38 WARNING: Failed starting API: listen tcp 192.168.1.22:8384: bind: cannot assign requested address
[JOGEZ] 2025/02/27 02:27:38 WARNING: Starting API/GUI failed: listen tcp 192.168.1.22:8384: bind: cannot assign requested address
Syncthing fails to start properly due to an API binding error on port 8384, preventing the GUI from launching. the errors appear in the logs. it shuts down its relay listener, QUIC listener, and TCP listener, leading to the process exiting with status 1
possible causes:
- ip address is not assigned to machine
- port is already in use by another process
- network misconfiguration or firewall blocking the API
- Syncthing is not configured correctly in
config.xml
lets fix this :3
step 1: check private ip address
-
run the following to get the current private ip:
hostname -I -
note the ip address
step 2: modify syncthing config
- run to display the configuration file location
syncthing -paths-
open the configuration file:
nano /home/{user}/.local/state/syncthing/config.xmlps:{user} is the username you go by on your pc -
find the line containing:
<address>{ old ip address }</address> -
replace
{ old ip address }with the private ip you noted earlier
step 3: restart syncthing
-
save and exit nano (
ctrl + x, theny, thenenter) -
restart syncthing:
systemctl restart syncthing
result:
syncthing now connects successfully! the issue was caused by a changed private ip address, preventing syncthing from binding properly. updating the config fixed it
extras:
if you still face issues:
-
check syncthing logs:
journalctl -u syncthing --no-pager -
verify firewall settings:
sudo ufw allow syncthing -
try restarting the network:
systemctl restart NetworkManager
my situation:
Syncthing was failing to connect because my private ip changed. after modifying config.xml with the correct ip, everything worked again
if your issue is similar, check this out
if none of the above work, consider:
- checking syncthing forums
- asking for help on reddit
- reconfiguring the device connections
- uninstalling and installing syncthing again
crying cus idk either im sorry :,(