syncthing-gtk icon indicating copy to clipboard operation
syncthing-gtk copied to clipboard

Errors when other applications are on port 8080

Open ghost opened this issue 9 years ago • 6 comments

If SyncThing-GTK expects SyncThing to be on port 8080, and another application is running a HTTP server on the same port, SyncThing doesn't fail gracefully, or help me restart SyncThing on another port - I can't even open the Settings screen until the other application has been shut down.

syncthing

ghost avatar Sep 10 '15 22:09 ghost

Problem is, ST-GTK can't post configuration with changed port, if Syncting is not listening on port when configuration is posted normally.

But I can imagine modifying Daemon Settings dialog to write config.xml instead and placing button to that error message. I'll check what can be done.

kozec avatar Sep 12 '15 14:09 kozec

Also checking for the error message when syncthing exits might help On 12 Sep 2015 07:41, "kozec" [email protected] wrote:

Problem is, ST-GTK can't post configuration with changed port, if Syncting is not listening on port when configuration is posted normally.

But I can imagine modifying Daemon Settings dialog to write config.xml instead and placing button to that error message. I'll check what can be done.

— Reply to this email directly or view it on GitHub https://github.com/syncthing/syncthing-gtk/issues/199#issuecomment-139777202 .

ghost avatar Sep 12 '15 20:09 ghost

Syncthing has a command-line flag to specify the host and port to listen on.

My approach is to scan for a free port, then start Syncthing specifying this port.

canton7 avatar Mar 14 '16 17:03 canton7

Quick and dirty fix, for anyone wondering: Change the port by modyfing /configuration/gui/address in ~/.config/syncthing/config.xml

ghost avatar Jul 16 '18 09:07 ghost

If you don't mind parsing the console output you can let Syncthing do the allocation.

$ syncthing --gui-address=127.0.0.1:0 | grep 'API listening'
[I6KAH] 23:03:29 INFO: GUI and API listening on 127.0.0.1:50933

calmh avatar Jul 16 '18 20:07 calmh

Quick and dirty fix, for anyone wondering: Change the port by modyfing /configuration/gui/address in ~/.config/syncthing/config.xml

If you are using the syncthing-gtk FlatPak the configuration file would be in:

~/.var/app/me.kozec.syncthingtk/config/syncthing/config.xml

ifireball avatar Aug 11 '22 23:08 ifireball