Skip to content

Commit 586b82e

Browse files
authored
Propose CAP_NET_BIND_SERVICE instead running Synapse with root (#18408)
There are alternative ways to use low numbered ports besides root. Users might be mislead into thinking they should run Synapse with root privileges.
1 parent 9b2bc75 commit 586b82e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

changelog.d/18408.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Mention `CAP_NET_BIND_SERVICE` as an alternative to running Synapse as root in order to bind to a privileged port.

docs/reverse_proxy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ It is recommended to put a reverse proxy such as
55
[Apache](https://httpd.apache.org/docs/current/mod/mod_proxy_http.html),
66
[Caddy](https://caddyserver.com/docs/quick-starts/reverse-proxy),
77
[HAProxy](https://www.haproxy.org/) or
8-
[relayd](https://man.openbsd.org/relayd.8) in front of Synapse. One advantage
9-
of doing so is that it means that you can expose the default https port
10-
(443) to Matrix clients without needing to run Synapse with root
11-
privileges.
8+
[relayd](https://man.openbsd.org/relayd.8) in front of Synapse.
9+
This has the advantage of being able to expose the default HTTPS port (443) to Matrix
10+
clients without requiring Synapse to bind to a privileged port (port numbers less than
11+
1024), avoiding the need for `CAP_NET_BIND_SERVICE` or running as root.
1212

1313
You should configure your reverse proxy to forward requests to `/_matrix` or
1414
`/_synapse/client` to Synapse, and have it set the `X-Forwarded-For` and

0 commit comments

Comments
 (0)