I’m using 1.29.4 on Ubuntu server 24.04. I want to make an install script for the server, and I can’t find a solution for setting up the gui-address to 0.0.0.0 Without it I can’t access the server from my local LAN. Is there a way to set it using syncthing or I have to change it in manual ways like using “sed” in the script to change the text?
I don’t know any other way to do it.
My suggestion would be a script that:
- Starts Syncthing for the first time
- Waits for it to be in a steady state after creating keys, the config file, and so on
- Stops Syncthing
- Then uses something
sed
-like to edit config.xml - And finally starts Syncthing again
You can use the Syncthing CLI after it is first started up:
syncthing cli config gui raw-use-tls set true
syncthing cli config gui raw-address set 0.0.0.0:8384
syncthing cli operations restart
Or simply override the GUI listen address from an environment variable STGUIADDRESS
or command-line switch --gui-address
:
https://docs.syncthing.net/v1.29.3/users/syncthing.html#cmdoption-gui-address
I’m not quite sure whether the --gui-address
parameter is persisted to the configuration during the first run when a fresh config.xml is generated. Try it out with a temporary home directory.
To manipulate the XML file directly (the hard way), you can use any XSL tool with an appropriate XPath query. Ask your favorite AI coding assistant for how to do it this way, should be fairly self-contained and straightforward.
Thanks very much for the correction sir, I’m glad to learn this!
that’s what I did, but now I’m going to try @acolomb solution
Interesting! Missed this option somehow.
Don’t get me started with AI code. It causes so much problems even on simple tasks.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.