Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a1cb05b

Browse files
authored
Fix federation in demo scripts. (#12783)
1 parent d38c73e commit a1cb05b

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

changelog.d/12783.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix federation when using the demo scripts.

demo/start.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ export PYTHONPATH
1212

1313
echo "$PYTHONPATH"
1414

15+
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
1516
for port in 8080 8081 8082; do
1617
echo "Starting server on port $port... "
1718

1819
https_port=$((port + 400))
1920
mkdir -p demo/$port
2021
pushd demo/$port || exit
2122

22-
# Generate the configuration for the homeserver at localhost:848x.
23+
# Generate the configuration for the homeserver at localhost:848x, note that
24+
# the homeserver name needs to match the HTTPS listening port for federation
25+
# to properly work..
2326
python3 -m synapse.app.homeserver \
2427
--generate-config \
25-
--server-name "localhost:$port" \
28+
--server-name "localhost:$https_port" \
2629
--config-path "$port.config" \
2730
--report-stats no
2831

docs/development/demo.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Requires you to have a [Synapse development environment setup](https://matrix-org.github.io/synapse/develop/development/contributing_guide.html#4-install-the-dependencies).
66

77
The demo setup allows running three federation Synapse servers, with server
8-
names `localhost:8080`, `localhost:8081`, and `localhost:8082`.
8+
names `localhost:8480`, `localhost:8481`, and `localhost:8482`.
99

1010
You can access them via any Matrix client over HTTP at `localhost:8080`,
1111
`localhost:8081`, and `localhost:8082` or over HTTPS at `localhost:8480`,
@@ -20,9 +20,10 @@ and the servers are configured in a highly insecure way, including:
2020
The servers are configured to store their data under `demo/8080`, `demo/8081`, and
2121
`demo/8082`. This includes configuration, logs, SQLite databases, and media.
2222

23-
Note that when joining a public room on a different HS via "#foo:bar.net", then
24-
you are (in the current impl) joining a room with room_id "foo". This means that
25-
it won't work if your HS already has a room with that name.
23+
Note that when joining a public room on a different homeserver via "#foo:bar.net",
24+
then you are (in the current implementation) joining a room with room_id "foo".
25+
This means that it won't work if your homeserver already has a room with that
26+
name.
2627

2728
## Using the demo scripts
2829

0 commit comments

Comments
 (0)