For anyone looking for a guide on how I did this, here it is.
Login to pgAdmin4. On the left expand Server > Matrix > Databases, then right click Databases then go Create > Database...
Then in the Database field type "syncv3" then click "Save"
Install Conpose.Manager from CA.
Navigate to the Docker tab, and then to the "Add New Stack". Put in "Sliding_Sync" in the stack_name field, then click "Advanced" and in the stack directory put /mnt/user/appdata/matrix/sliding-sync then click "OK"
Now scroll down and below your dockers you should see Sliding_sync under Compose, click the COG > Edit Stack > Compose File Scroll down again and there should be a text editor. Copy and past the following into that.
version: '3.8'
services:
slidingsync-proxy:
container_name: slidingsync-proxy
image: 'ghcr.io/matrix-org/sliding-sync:latest'
restart: unless-stopped
environment:
- 'SYNCV3_SERVER=https://chat.yourdomain.com'
- 'SYNCV3_SECRET=KEY'
- 'SYNCV3_BINDADDR=:8009'
- 'SYNCV3_DB=user=postgres-username dbname=syncv3 sslmode=disable host=slidingsync-db password=postgres-password'
ports:
- '8009:8009'
depends_on:
- slidingsync-db
slidingsync-db:
container_name: slidingsync-db
image: postgres:15
restart: unless-stopped
volumes:
- /mnt/user/appdata/matrix/sliding-sync/database:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres-passowrd
- POSTGRES_USER=postgres-username
- POSTGRES_DB=syncv3
Adjust `SYNCV3_SERVER`, `SYNCV3_DB`, `POSTGRES_PASSWOR`, `POSTGRES USER`, and 'POSTGRES_DB' to match your setup.
You can use this command in the unraid console to generate a random string to put in 'SYNCV3_SECRET'
echo -n $(openssl rand -hex 32)
Create a file called `client.json` with the following content. You can use any text editor for this.
{
"m.homeserver": {
"base_url": "https://matrix.yourdomain.com"
},
"org.matrix.msc3575.proxy": {
"url": "https://chat1.yourdomain.com"
}
}
Place this file in the Nginx directory on your Unraid server, I put it in /mnt/user/appdata/Nginx-Proxy-Manager-Official/data/nginx/.well-known/matrix/client.json
Open the Nginx Proxy Manager UI in your browser.
Add a New Proxy Host for Sliding Sync connections, I made mine chat1.yourdomain.com
Set it up like normal and have it point to you Sliding Sync Proxy. I have my matrix server on port 8008 and Silding Proxy on 8009.
Before you hit save, go to the "Advanced" tab and add this to Custom Nginx Configuration
location /.well-known/matrix/client {
root /data/nginx/;
try_files /.well-known/matrix/client.json =404;
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
Verify the Setup, go to https://chat1.yourdomain.com/.well-known/matrix/client
It should return the contents of the .json file you made earlier
And that's it, it should all be up and running.