summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorWillem Mulder <willemmaster@hotmail.com>2017-05-18 15:35:36 +0200
committerSilke <silke@slxh.eu>2017-12-17 13:07:37 +0100
commit3e59143ba8d62b83f774e1c67a0aa46ce3ecd3ab (patch)
tree141a333693585fb787e3d92e0e500c83419d9bc6 /synapse/config
parentMerge pull request #2717 from matrix-org/erikj/createroom_content (diff)
downloadsynapse-3e59143ba8d62b83f774e1c67a0aa46ce3ecd3ab.tar.xz
Adapt the default config to bind on IPv6.
Most deployments are on Linux (or Mac OS), so this would actually bind
on both IPv4 and IPv6.

Resolves #1886.

Signed-off-by: Willem Mulder <willemmaster@hotmail.com>
Diffstat (limited to '')
-rw-r--r--synapse/config/server.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index edb90a1348..9035fbf22d 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -220,13 +220,14 @@ class ServerConfig(Config):
             port: %(bind_port)s
 
             # Local addresses to listen on.
-            # This will listen on all IPv4 addresses by default.
+            # On Linux and Mac OS, this will listen on all IPv4 and IPv6
+            # addresses by default. For most other OSes, this will only listen
+            # on IPv6.
             bind_addresses:
-              - '0.0.0.0'
-              # Uncomment to listen on all IPv6 interfaces
-              # N.B: On at least Linux this will also listen on all IPv4
-              # addresses, so you will need to comment out the line above.
-              # - '::'
+              - '::'
+              # For systems other than Linux or Mac OS, uncomment the next line
+              # to also listen on IPv4.
+              #- '0.0.0.0'
 
             # This is a 'http' listener, allows us to specify 'resources'.
             type: http
@@ -264,7 +265,7 @@ class ServerConfig(Config):
           # For when matrix traffic passes through loadbalancer that unwraps TLS.
           - port: %(unsecure_port)s
             tls: false
-            bind_addresses: ['0.0.0.0']
+            bind_addresses: ['::']
             type: http
 
             x_forwarded: false
@@ -278,7 +279,7 @@ class ServerConfig(Config):
           # Turn on the twisted ssh manhole service on localhost on the given
           # port.
           # - port: 9000
-          #   bind_address: 127.0.0.1
+          #   bind_addresses: ['::1', '127.0.0.1']
           #   type: manhole
         """ % locals()