I want to disable the GUI and not allow any user to connect to the GUI. But we do all the config/setup using the API. According to the docs -
GUI Element
GUI enabled
If not true, the GUI and API will not be started.
I find this misleading, Is the API really shutdown? or just access via the GUI?
It’s the same thing, the API and the UI is just a webserver, that is either enabled or not.
You can configure the web server to listen on a unix socket, and potentially call the API (and in theory access the web ui) via that, which makes it less accessible I guess.
I can understand this - I would have have preferred disabling the GUI separate the API. But thanks, I can, I can create an unknown password to stop the use.
You can effectively disable the GUI by serving a replacement UI (potentially an empty HTML file with just a “GUI disabled” message) from ~/.config/syncthing/gui/default/index.html (or your platform equivalent). But if the user knows the password or can access the config they can anyway talk to the API, of course.