2022-10-21 19:46:39 +02:00
|
|
|
With matrix.YOURDOMAIN pointing at the server:
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
imports = [ ./synapse-module ];
|
|
|
|
|
|
|
|
services.matrix-synapse-next = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
workers.federationSenders = 1;
|
|
|
|
workers.federationReceivers = 1;
|
2023-09-11 00:03:44 +02:00
|
|
|
workers.initialSyncers = 1;
|
|
|
|
workers.normalSyncers = 1;
|
|
|
|
workers.eventPersisters = 2;
|
|
|
|
workers.useUserDirectoryWorker = true;
|
2022-10-21 19:46:39 +02:00
|
|
|
|
|
|
|
enableNginx = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
server_name = "YOURDOMAIN";
|
|
|
|
|
|
|
|
database = {
|
|
|
|
name = "psycopg2";
|
|
|
|
args = {
|
|
|
|
host = "localhost";
|
|
|
|
user = "synapse";
|
|
|
|
password = "synapse";
|
|
|
|
dbname = "synapse";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.redis.servers."".enable = true;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-09-11 00:04:19 +02:00
|
|
|
is ~enough to get a functional matrix-server running with some workers
|
2023-09-21 19:29:04 +02:00
|
|
|
|
|
|
|
## Sliding Sync (Element X)
|
|
|
|
|
|
|
|
Just add the following to your config and point `slidingsync.YOURDOMAIN` at the server
|
|
|
|
|
|
|
|
```
|
|
|
|
services.matrix-synapse-next = {
|
|
|
|
enableSlidingSync = true;
|
|
|
|
};
|
|
|
|
|
2023-10-22 03:02:59 +02:00
|
|
|
services.matrix-synapse.sliding-sync.environmentFile = "/some/file/containing/SYNCV3_SECRET=<some secret>";
|
2023-09-21 19:29:04 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-09-21 20:37:01 +02:00
|
|
|
If using [well-known delagation](https://matrix-org.github.io/synapse/v1.37/delegate.html) make sure `YOURDOMAIN/.well-known/matrix/client` matches
|
2023-09-21 19:29:04 +02:00
|
|
|
what's in `matrix.YOURDOMAIN/.well-known/matrix/client`
|