matrix-org/sliding-sync

Update readme bind ports? To avoid conflicts with Synapse

Opened this issue · 2 comments

In your README you explain to run it on port 8009, to avoid conflicting with Synapse. Which make sense.

However, below the Nginx example, you are actually running and binding the sliding sync server on port 8008 (which will conflict with Synapse). So what is it?

I think you should update your README and try to be consistent and use port 8009 to avoid conflicts with Synapse server.

The example is actually showing both components.
The first set shows path for sliding sync and port 8009, the next set id for synapse and port 8008.

No. Sorry, maybe I'm not clear.

Look, first they tell you about sliding sync in Nginx config (port 8009):

location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
    proxy_pass http://localhost:8009;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $host;
}

Then they are running the docker sliding sync service, literally just below this Nginx example, on port 8008 (instead of 8009):

docker run --rm -e "SYNCV3_SERVER=https://matrix-client.matrix.org" -e "SYNCV3_SECRET=$(cat .secret)" -e "SYNCV3_BINDADDR=:8008" -e "SYNCV3_DB=user=$(whoami) dbname=syncv3 sslmode=disable host=host.docker.internal password='DATABASE_PASSWORD_HERE'" -p 8008:8008 ghcr.io/matrix-org/sliding-sync:latest

So they map port 8008 to 8008 on localhost on the host machine, using -p 8008:8008. This should be changed to: -p 8009:8008, now sliding-sync is mapping port 8008 to port 8009 avoiding port conflicts with Synapse. This is currently also they way how I configured this docker service, otherwise you can't run Synapse on port 8008.