# Patch: correctly describe how to use unix sockets for gui

**URL:** https://forum.syncthing.net/t/patch-correctly-describe-how-to-use-unix-sockets-for-gui/20866
**Category:** Development
**Created:** [September 30, 2023, 10:31pm UTC](https://forum.syncthing.net/t/patch-correctly-describe-how-to-use-unix-sockets-for-gui/20866 "2023-09-30T22:31:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![digital](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@digital](https://forum.syncthing.net/u/digital)
#### Post date: [September 30, 2023, 10:31pm UTC](https://forum.syncthing.net/t/patch-correctly-describe-how-to-use-unix-sockets-for-gui/20866/1 "2023-09-30T22:31:56Z")

</div>

This PR to https colon //github dot com/syncthing/syncthing-docs is delivered to you by uploading diffs to discourse because the github UI is broken and won’t let me create a fork.

[the docs for `--gui-address`](https://docs.syncthing.net/users/syncthing.html#cmdoption-gui-address) incorrectly state that if a file path is given, a unix socket at that location will be used.

syncthing supports serving the gui and api over a unix socket. this can be configured via an cli or environment override. this commit corrects the documentation on this to match the way that syncthing behaves.

the gui-address cli option needs an url like “unix://” to listen on unix sockets. if an (absolute) path is specified, the cli override is ignored and the gui.address from the config file is used. I think this was done because syncthing supports https (http over tls) over unix, and there needed to be a way to enable that. in the config file there is an attribute `tls` on the `gui` element. on the cli this is encoded in the url scheme: “unixs” and “https” for tls, “unix” and “http” for plain listeners.

[0001-improve-parsing-of-gui-address-overrides.patch](https://forum.syncthing.net/uploads/short-url/nlaodSux8DGdX0Kqiild5H6bs2j.patch) (2.6 KB)

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [October 2, 2023, 6:41am UTC](https://forum.syncthing.net/t/patch-correctly-describe-how-to-use-unix-sockets-for-gui/20866/2 "2023-10-02T06:41:36Z")

</div>

This patch is for `lib/config`, not the docs.

---

<div class="post-metadata">

### Author: ![digital](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@digital](https://forum.syncthing.net/u/digital)
#### Post date: [October 3, 2023, 3:52pm UTC](https://forum.syncthing.net/t/patch-correctly-describe-how-to-use-unix-sockets-for-gui/20866/3 "2023-10-03T15:52:52Z")

</div>

oops, correct. I was able to sync the docs repo, so now there is a pull request: [correctly describe how to use unix sockets for gui by digtail · Pull Request #827 · syncthing/docs · GitHub](https://github.com/syncthing/docs/pull/827)
