Closed tillmannheigel closed 10 months ago
Got it working on my instance. But I'm unsure if I setup it correctly and securely. The documentation is really unclear with the proxy and port setup imho. But my Element X works so far yay
ASAP I'm sure this setup is correct I'll try to update the guide.
Here might be some help (untested by us) for setting up sliding-sync proxy which seems to need shell variables in supervisord config: https://uberspace.social/@sebastian@social.burschel.com/111531710670020451
Got it working too, should we compare our config, @taddydevil ?
Of course. I got it working too as a service and would update the guide.
Can you post your config?
Here is my etc/slidingsync.ini
➜ slidingsync.ini
[program:slidingsync]
command=/home/$USER/sliding-sync/syncv3
autostart=yes
autorestart=yes
environment=
SYNCV3_SECRET="cdf44...2af9",
SYNCV3_SERVER="https://matrix.$DOMAIN.$TLD",
SYNCV3_DB="user=$PGR_USER dbname=$PGR_DB sslmode=disable password=$PGR_PW",
SYNCV3_BINDADDR="0.0.0.0:8009"
if I remember correctly, I had to create (or update)
/var/www/virtual/$USER/matrix.$DOMAIN.$TLD/.well-known/matrix/client
{
"m.homeserver": {
"base_url": "https://matrix.$DOMAIN.$TLD"
},
"org.matrix.msc3575.proxy": {
"url": "https://slidingsync.matrix.$DOMAIN.$TLD"
}
}
Kk, our config is identical - perfect. And yes, the .well-known entry is urgently needed.
finally:
uberspace web backend set slidingsync.matrix.$DOMAIN.$TLD/ --http --port 8009
I just checked the documentation. Wasn't there something additionally required for the client/ path?:
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;
}
location ~ ^(\/_matrix|\/_synapse\/client) {
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
}
location /.well-known/matrix/client {
add_header Access-Control-Allow-Origin *;
}
I just checked the documentation. Wasn't there something additionally required for the client/ path?:
No, one path is already configured with synapse and the other one that you already mention comes with sliding-sync. It should be totally fine that the whole domain will be directed to the proxy.
In order to use Element X, one must use the sliding-sync proxy. An addition for Synapse should explain that properly.