Tweak91 Posted October 16, 2022 Share Posted October 16, 2022 On 12/4/2020 at 9:49 PM, HojojojoWololo said: Yep, the tutorial kinda works with a few adjustments. But since I had to work my way through multiple posts and other sites I would love to spare you the pains. My initial setup was an unraid server running Swag (since the Letsencrypt docker wont be supported anymore in the future due to naming rights - spaceinvaderone made a great tutorial how to switch from the Letsencrypt to the Swag docker). Yinzer's tutorial for the Letsencrypt docker still seems fine, though you really should use the Swag docker instead. Furthermore, Jitsi was already up and running when I started to install Matrix (thanks to spaceinvaderone, again 😄), so I will skip that part. If you have to set up a reverse proxy (be sure to use the Swag container instead of the Letsencrypt container) or want to switch to Swag, the spaceinvaders videos are really helpful. My adjustments to @yinzer's Matrix setup: Setting up Swag (formerly Letsencrypt) matrix.subdomain.conf - thanks to @akamemmnon for his config server { listen 443 ssl; listen 8448 ssl; server_name bridge.*; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app your.unraid.server.ip; set $upstream_port 8008; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header X-Forwarded-For $remote_addr; } location /.well-known/matrix/server { default_type application/json; return 200 '{"m.server": "yourdomain.com:443"}'; add_header Access-Control-Allow-Origin *; } } Make sure to change your.unraid.server.ip to your unraid server's IP adress and yourdomain.com to your domain name 😁 Since Riot was renamed to Element, there is a new container so we will use that one instead of Riot and have to adjust the Swag configuration file. element-web.subdomain.conf server { listen 443 ssl; server_name chat.*; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app element-web; set $upstream_port 80; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } } Install Matrix and configure it according to yinzer's tutorial. Adjustments: Setting up Matrix homeserver.yaml under "listeners" in the "# Unsecure HTTP listeners: for when matrix traffic passes through a reverse proxy" section: - port: 8008 tls: false type: http x_forwarded: true bind_addresses: ['0.0.0.0'] resources: - names: ['client', 'federation'] - port: 8448 tls: false type: http x_forwarded: true bind_addresses: ['0.0.0.0'] resources: - names: ['federation'] Make sure you respect the .yaml syntax - that's what created the syntax errors of @lewisd19, @jafi and @l2evy. No tabs, just spaces! Additionally, the resource names have to be commented with inverted commas: 'text'. The examples over this section can help you with this. If you use the standard SQLite database, make sure you changed the database's direction - thanks to @spyd4r for your input. database: name: sqlite3 args: database: /homeserver.db SHOULD BECOME database: name: sqlite3 args: database: /data/homeserver.db turnserver.conf Delete the first line which says "lt-cred-mech" since we use "use-auth-secret". Also think about adding the pidfile and userdb infos yinzer posted in his tutorial. My turnserver.conf looks like this: use-auth-secret static-auth-secret=YOUR-STATIC-AUTH-SECRET realm=turn.bridge.yourdomain.com cert=/data/bridge.yourdomain.com.tls.crt pkey=/data/bridge.yourdomain.com.tls.key dh-file=/data/bridge.yourdomain.com.tls.dh cipher-list="HIGH" pidfile=/data/turnserver.pid userdb=/data/turnserver.db Setting up Element-Web (based on @yinzer's tutorial for Riot Chat) 1. Before we start, we need to manually create the config path and pull in the default config. So open the terminal/SSH to your server. 2. Create the config path by executing mkdir -p /mnt/user/appdata/element-web/config 3. Download the default config by executing wget -O /mnt/user/appdata/element-web/config/config.json https://raw.githubusercontent.com/vector-im/element-web/develop/element.io/app/config.json 4. In Community Applications, search for `element-web' by vectorim 5. Set the `Network Type` to `Custom: ssl proxy` 6. Set the `Fixed IP address` to `172.20.0.20` (or whatever) 7. The rest of the settings should be fine. Create the container and run it. Now lets edit our Element config. It's a JSON file, so make sure you respect JSON syntax 1. Edit /mnt/user/appdata/riot-web/config/config.json 2. Change 'default_server_name' to "default_server_name": "bridge.yourdomain.com", 3. Insert your domain to the 'roomDirectory' "roomDirectory": { "servers": [ "bridge.yourdomain.com", "matrix.org", "gitter.im" ] } 4. Add the following lines in the config: { "jitsi": { "preferredDomain": "meet.yourdomain.com" } }, Caution: Using a Jitsi server with enabled authentification doesn't work with Element! And this should also be noticed: Jitsi Setup Just follow spaceinvaderone's instructions in this video. But for setting up a working Matrix synapse and the Element-web container, that should be it. @yinzer Feel free to update your initial post with this adjustments 😃 Hello can I use nginx proxy manager other than swag? And if so how thank you! Quote Link to comment
Tweak91 Posted October 16, 2022 Share Posted October 16, 2022 Can I use nginx proxy manager other than Swag for this and how ? Thank you!! Quote Link to comment
HojojojoWololo Posted January 5 Share Posted January 5 On 10/16/2022 at 9:23 PM, Tweak91 said: Hello can I use nginx proxy manager other than swag? And if so how thank you! Actually, I have no clue since I have not tried that and because I stopped using Matrix/Element, I won't try it any time soon. Sorry Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.