Jon_Hanson Posted February 11, 2021 Share Posted February 11, 2021 On 1/10/2021 at 5:16 AM, Sharpie said: @HojojojoWololo Thanks again for updating this guide. I am still getting the "Bad Gateway" issue I have made every change you have listed and to no avail. I even added the inverted commas. I was able to get my Element-web container online but not matrix keep getting this Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 512, in <module> main() File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 507, in main hs = setup(sys.argv[1:]) File "/usr/local/lib/python3.7/dist-packages/synapse/app/homeserver.py", line 342, in setup "Synapse Homeserver", config_options File "/usr/local/lib/python3.7/dist-packages/synapse/config/_base.py", line 722, in load_or_generate_config config_dict, config_dir_path=config_dir_path, data_dir_path=data_dir_path File "/usr/local/lib/python3.7/dist-packages/synapse/config/_base.py", line 744, in parse_config_dict data_dir_path=data_dir_path, File "/usr/local/lib/python3.7/dist-packages/synapse/config/_base.py", line 369, in invoke_all res[name] = getattr(config, func_name)(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/synapse/config/registration.py", line 90, in read_config strtobool(str(config.get("enable_registration", False))) File "/usr/lib/python3.7/distutils/util.py", line 307, in strtobool raise ValueError("invalid truth value %r" % (val,)) ValueError: invalid truth value 'ture' At the end of my logs, I cant even seem to find those files nor are they mentioned in any of the guides. Got any more tips on how I can correct this? or get past the Bad gateway issue? Thanks Again 😃 Somewhere in a configuration file you have "true" misspelled. Notice the line that says "invalid truth value 'ture'". Quote Link to comment
l2evy Posted February 19, 2021 Share Posted February 19, 2021 Did anything change with Element ? Somehow my server has completely halted on sending messages. The server shows up like everything is fine and connected just can't send any messages. Matrix server seems ok, however I am getting a weird error with Element: 2021/02/17 15:00:32 [error] 21#21: *48 open() "/usr/share/nginx/html/config.chat.mydomain.net.json" failed (2: No such file or directory), client: 172.18.0.2, server: localhost, request: "GET /config.chat.mydomain.net.json?cachebuster=1613592032263 HTTP/1.1", host: "chat.mydomain.net" I have not done any changes and this happened right after an update so I believe something has been broken by either the matrix update or element update recently. Before I go breaking things thought I would check for any tips or suggestions on recent changes maybe I missed. Quote Link to comment
swiss01 Posted April 2, 2021 Share Posted April 2, 2021 (edited) Many thanks to everyone involved here. Especially to @yinzerwho created this forum post and to @HojojojoWololo who summarized the changes. I found a small bug in the swag config, which made it difficult to communicate with the integration server. Original: location /.well-known/matrix/server { default_type application/json; return 200 '{"m.server": "yourdomain.com:443"}'; add_header Access-Control-Allow-Origin *; } New: location /.well-known/matrix/server { default_type application/json; return 200 '{"m.server": "bridge.yourdomain.com:443"}'; add_header Access-Control-Allow-Origin *; } the complete config would then be matrix.subdomain.conf: 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": "bridge.yourdomain.com:443"}'; add_header Access-Control-Allow-Origin *; } } Edited April 2, 2021 by swiss01 1 Quote Link to comment
swiss01 Posted April 8, 2021 Share Posted April 8, 2021 (edited) So I still have a problem When I want to call someone it only works if they are both on the same LAN as the server. If not, it rings, but then it gets stuck on "Call connection ...". Unfortunately, I haven't found much about it on the internet. Do any of you know the problem? Edit: oh and what also doesn't work is that the correct matrix server address is stored on my element web. the server also always reports this warning. can that have a connection? 2021/04/08 10:42:36 [error] 31#31: *600 open() "/usr/share/nginx/html/config.chat.medomain.com.json" failed (2: No such file or directory), client: 172.18.0.3, server: localhost, request: "GET /config.chat.medomain.com.json?cachebuster=1617871354966 HTTP/1.1", host: "chat.medomain.com" Edited April 8, 2021 by swiss01 Quote Link to comment
yogy Posted April 10, 2021 Share Posted April 10, 2021 Many thanks to @yinzer for making an initial guide and @HojojojoWololo for the update. I have successfuly created a working Matrix and Element-web docker with Nginx Proxy Manager. I have a few questions but first let me introduce this guide how to become an administrator of your own server. This gide is provided by BRIAN MCGONAGILL and you can find the whole article on his webpage: Open terminal and go to your appdata matrix folder (mine is in /mnt/user/appdata/matrix Now we need to get into the sqlite shell for the file homeserver.db. So we use the command sqlite3 homeserver.db Now we'll search for our user in the database with the command SELECT * FROM users; It should look something like this @your-user:your-server-url|sNyRQNH/aCDj7XSeRqreHtGuVe9ZoxGEUyyT5UF78QWw3S|76098|0||0|||||0|0 And make note of your username. It looks like this @youruser:your-server-url Copy your username and paste it in the next command to look like this UPDATE users SET admin=1 WHERE name='@your-user:your-server-url'; Now re-run the command to search you should see that a 0 (zero) is now a 1 (one) out to the right SELECT * FROM users; You should see that a 0 (zero) is now a 1 (one) out to the right and should look like this @your-user:your-server-url|sNyRQNH/aCDj7XSeRqreHtGuVe9ZoxGEUyyT5UF78QWw3S|76098|1||0|||||0|0 Finally type .quit and press Enter to exit the SQLite shell All thanks go to BRIAN MCGONAGILL for providing this guide, I just modified it (just a little bit). Now to my question. I would like to see who registered in my self hosted server (registration is enabled). It's obvious I can't see this now. Is it possible to approve users registration before they log in. I have setup SMTP and it's working in homeserver.yaml 1 Quote Link to comment
swiss01 Posted April 11, 2021 Share Posted April 11, 2021 16 hours ago, yogy said: Now to my question. I would like to see who registered in my self hosted server (registration is enabled). It's obvious I can't see this now. Is it possible to approve users registration before they log in. I have setup SMTP and it's working in homeserver.yaml I don't know if they can accept a registration. But with "synapse admin" you can easily see who has registered and assign roles or create users yourself. just download it from the app store and test it 1 Quote Link to comment
SeattleBandit Posted September 10, 2021 Share Posted September 10, 2021 has anyone set up dimension to work with their stack? i have matrix and element up and running happily thanks to this thread - but now i wnt to add some custom bridges to the matrix stack - i have matrix-dimension up and running and talking to my server but now am kind of at a loss .... Quote Link to comment
SeattleBandit Posted September 10, 2021 Share Posted September 10, 2021 oooh - i also discovered that my matrix server is not seeing other servesr .... Quote Link to comment
Sharpie Posted September 10, 2021 Share Posted September 10, 2021 @SeattleBanditWhat does matrix-dimension do? I have a up and running server is there a guide you used to set that up on your server? Quote Link to comment
SeattleBandit Posted September 10, 2021 Share Posted September 10, 2021 @Sharpiematrix-dimension is a integration manager - that allows you to run different bridges such as telegram or hangouts and handle them all in element (allegedly) i've been messing with it - i got dimension up and working - would be happy do do a little write up if you are interestd - but as i'm still learnbing HOW to use the software it would be a bit of the blind leading the blind. but now i'm running into issues sending DM's to normal users on matrix.org - i can send from my personal server (homeserver) and the receiver (matrix.rog) is unable to accept the chat - nor am i able to create a DM from my matrix.org acct to my homeserver ... but i can log into and post in public rooms..... Quote Link to comment
Sharpie Posted September 10, 2021 Share Posted September 10, 2021 @SeattleBandit If you would be so kind I would read the crap out of it. Anyway I can add new features/functions/uses for my users on my homeserver I am all about. What bridges and bots are you using? Thanks again =D Quote Link to comment
SeattleBandit Posted September 11, 2021 Share Posted September 11, 2021 2 hours ago, Sharpie said: @SeattleBandit If you would be so kind I would read the crap out of it. Anyway I can add new features/functions/uses for my users on my homeserver I am all about. What bridges and bots are you using? Thanks again =D @Sharpiesoooo ... again blind leading the blind here - turns out dimension perhaps isn't really necessary ideally what im trying to do is to stand up a stack that will be a matrix messenger - that will integrate all the 'major' chat services telegram isntagram linkedin hangouts imessage discord slack signal and a few others there is a service out there called beeper which already does this - but its all open source software for their back end - and while their app is sexier than element - if i can accomplish the same thing for free then i'm a happy camper - also keeping everything self hosted makes me happy even if i can't have data center redundancy once i get some stacks up and running - and figure out the bridges - i'll do a write up and post it here - i'll try and incorporate the privious how-tos for a soup to nuts type solution targeted at unraid users Quote Link to comment
b0n3v Posted October 2, 2021 Share Posted October 2, 2021 (edited) Thanks for this perfect Guide and thank to all users for correction and updates. I have strugle to run fail2ban i found failregex here but is out of date format.. link - https://ardsite.medium.com/how-to-create-a-fail2ban-filter-for-the-application-matrix-matrix-synapse-bdbcd7e07e9 Could some one will help me with right failregex, in the log i see: 2021-10-03 01:12:02,895 - synapse.rest.client.login - 264 - INFO - POST-192 - Got login request with identifier: {'type': 'm.id.user', 'user': 'test'}, medium: None, address: None, user: None 2021-10-03 01:12:03,084 - synapse.handlers.auth - 1314 - WARNING - POST-192 - Failed password login for user @test:matrix.mydomain.com 2021-10-03 01:12:03,085 - synapse.http.server - 88 - INFO - POST-192 - <XForwardedForRequest at 0x14a1602767f0 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:12:03,085 - synapse.access.http.8008 - 410 - INFO - POST-192 - my.ip.add.res - 8008 - {None} Processed request: 0.191sec/-0.000sec (0.188sec, 0.000sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:12:03,199 - synapse.rest.client.login - 264 - INFO - POST-193 - Got login request with identifier: {'type': 'm.id.user', 'user': 'test'}, medium: None, address: None, user: None 2021-10-03 01:12:03,390 - synapse.handlers.auth - 1314 - WARNING - POST-193 - Failed password login for user @test:matrix.mydomain.com 2021-10-03 01:12:03,391 - synapse.http.server - 88 - INFO - POST-193 - <XForwardedForRequest at 0x14a160970710 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:12:03,391 - synapse.access.http.8008 - 410 - INFO - POST-193 - my.ip.add.res - 8008 - {None} Processed request: 0.192sec/-0.000sec (0.190sec, 0.000sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:12:03,521 - synapse.rest.client.login - 264 - INFO - POST-194 - Got login request with identifier: {'type': 'm.id.user', 'user': 'test'}, medium: None, address: None, user: None 2021-10-03 01:12:03,551 - synapse.metrics - 598 - INFO - sentinel - Collecting gc 1 2021-10-03 01:12:03,714 - synapse.handlers.auth - 1314 - WARNING - POST-194 - Failed password login for user @test:matrix.mydomain.com 2021-10-03 01:12:03,715 - synapse.http.server - 88 - INFO - POST-194 - <XForwardedForRequest at 0x14a160a1c390 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:12:03,715 - synapse.access.http.8008 - 410 - INFO - POST-194 - my.ip.add.res - 8008 - {None} Processed request: 0.195sec/-0.000sec (0.191sec, 0.001sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:12:03,832 - synapse.rest.client.login - 264 - INFO - POST-195 - Got login request with identifier: {'type': 'm.id.user', 'user': 'test'}, medium: None, address: None, user: None 2021-10-03 01:12:04,024 - synapse.handlers.auth - 1314 - WARNING - POST-195 - Failed password login for user @test:matrix.mydomain.com 2021-10-03 01:12:04,025 - synapse.http.server - 88 - INFO - POST-195 - <XForwardedForRequest at 0x14a160aef358 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:12:04,025 - synapse.access.http.8008 - 410 - INFO - POST-195 - my.ip.add.res - 8008 - {None} Processed request: 0.193sec/-0.000sec (0.190sec, 0.001sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:12:04,184 - synapse.rest.client.login - 264 - INFO - POST-196 - Got login request with identifier: {'type': 'm.id.user', 'user': 'test'}, medium: None, address: None, user: None 2021-10-03 01:12:04,374 - synapse.handlers.auth - 1314 - WARNING - POST-196 - Failed password login for user @test:matrix.mydomain.com 2021-10-03 01:12:04,375 - synapse.http.server - 88 - INFO - POST-196 - <XForwardedForRequest at 0x14a160279550 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:12:04,375 - synapse.access.http.8008 - 410 - INFO - POST-196 - my.ip.add.res - 8008 - {None} Processed request: 0.192sec/-0.000sec (0.189sec, 0.000sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:13:01,940 - synapse.rest.client.login - 264 - INFO - POST-198 - Got login request with identifier: {'type': 'm.id.user', 'user': 'UseR'}, medium: None, address: None, user: None 2021-10-03 01:13:02,142 - synapse.handlers.auth - 1314 - WARNING - POST-198 - Failed password login for user @UseR:matrix.mydomain.com 2021-10-03 01:13:02,143 - synapse.http.server - 88 - INFO - POST-198 - <XForwardedForRequest at 0x14a160a3c748 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:13:02,143 - synapse.access.http.8008 - 410 - INFO - POST-198 - my.ip.add.res - 8008 - {None} Processed request: 0.203sec/-0.000sec (0.200sec, 0.000sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] 2021-10-03 01:13:02,832 - synapse.rest.client.login - 264 - INFO - POST-199 - Got login request with identifier: {'type': 'm.id.user', 'user': 'UseR'}, medium: None, address: None, user: None 2021-10-03 01:13:03,028 - synapse.handlers.auth - 1314 - WARNING - POST-199 - Failed password login for user @UseR:matrix.mydomain.com 2021-10-03 01:13:03,029 - synapse.http.server - 88 - INFO - POST-199 - <XForwardedForRequest at 0x14a16027d780 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site='8008'> SynapseError: 403 - Invalid password 2021-10-03 01:13:03,029 - synapse.access.http.8008 - 410 - INFO - POST-199 - my.ip.add.res - 8008 - {None} Processed request: 0.197sec/-0.000sec (0.194sec, 0.000sec) (0.000sec/0.000sec/1) 52B 403 "POST /_matrix/client/r0/login HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" [0 dbevts] Edited October 2, 2021 by b0n3v Quote Link to comment
djskycapt Posted October 3, 2021 Share Posted October 3, 2021 First off, this guide was fantastic and I was able to get everything up and running within a few hours. Thank you so much for all the effort that went into this! Now that I have everything up, I'm having one issue preventing from making this a true discord alternative for myself and friends. I can't seem to get gifs to work when copying from a gif keyboard (i.e. Giphy) on mobile. It seems to always just copy the first frame and post that into chat. Has anyone been able to get gifs to work using the setup in this guide, and if so, can you lend some guidance? Quote Link to comment
Mr_Jay84 Posted October 16, 2021 Share Posted October 16, 2021 Having some issues with the federation here guys and looking for some advice. Issue 1 I can browse public rooms in element however joining them takes a good five minutes at which point I usually get a "failed to join room notification", then it strangely joins the room. Leaving also take five mins but does eventually leave. Sending a message takes about the same time. There's obviously a federation issue here as the homeserver.log is full of federation errors. I ahve attached the various logs. Issue 2 The homeserver.log and homeserver.db fills up dramatically 30M an hour, any way of limiting this? homeserver.log homeserver.yaml matrix.subdomain.conf Quote Link to comment
Sharpie Posted October 16, 2021 Share Posted October 16, 2021 (edited) @Mr_Jay84 Comparing your subdomain.conf to mine I see that your Resolver is your 127.0.0.11 I hope that is not your gateway but I could be wrong. (It should be your network gateway) Comparing your homeserver.yaml Your "Server name" is your sub-domain...this is wrong it needs to be just your domain "Contoso.com" not "bridge.contoso.com" you dont need a public_baseurl as you are behind a reverse proxy so re-# that The Bind address on line 290 needs to be the IP the container gets from docker I am sure I missed something but this is what I see just comparing yours to mine and its late here in the PST....Good Luck Edited October 16, 2021 by Sharpie Quote Link to comment
Mr_Jay84 Posted October 16, 2021 Share Posted October 16, 2021 2 hours ago, Sharpie said: @Mr_Jay84 Comparing your subdomain.conf to mine I see that your Resolver is your 127.0.0.11 I hope that is not your gateway but I could be wrong. (It should be your network gateway) Comparing your homeserver.yaml Your "Server name" is your sub-domain...this is wrong it needs to be just your domain "Contoso.com" not "bridge.contoso.com" you dont need a public_baseurl as you are behind a reverse proxy so re-# that The Bind address on line 290 needs to be the IP the container gets from docker I am sure I missed something but this is what I see just comparing yours to mine and its late here in the PST....Good Luck The resolver part is for the docker network. I did make a mistake though as $upstream_app should have had the container ID, fixed now. Amending the "Server name" and "Public_baseurl" resulted in a non functional server. I changed the bind address at 290 to the docker IP. No change in described behaviour. Homeserver.log & .db continue to fill up. Very strange. Quote Link to comment
Sharpie Posted November 15, 2021 Share Posted November 15, 2021 On 9/10/2021 at 6:10 PM, SeattleBandit said: @Sharpiesoooo ... again blind leading the blind here - turns out dimension perhaps isn't really necessary ideally what im trying to do is to stand up a stack that will be a matrix messenger - that will integrate all the 'major' chat services telegram isntagram linkedin hangouts imessage discord slack signal and a few others there is a service out there called beeper which already does this - but its all open source software for their back end - and while their app is sexier than element - if i can accomplish the same thing for free then i'm a happy camper - also keeping everything self hosted makes me happy even if i can't have data center redundancy once i get some stacks up and running - and figure out the bridges - i'll do a write up and post it here - i'll try and incorporate the privious how-tos for a soup to nuts type solution targeted at unraid users Were you able to find a way to install a integration manager on an Unraid setup? Quote Link to comment
sternbear Posted June 20, 2022 Share Posted June 20, 2022 Can anyone help? Tried installing Matrix and there is no homeserver.yaml or turnserver.conf files. I tried creating the files manually and getting a lot of errors. So my question is, are these supposed to be auto generated when you install matrix? Quote Link to comment
Sharpie Posted June 20, 2022 Share Posted June 20, 2022 when you start the surver for the first time it generates the files then shutdown the server and edit away what you need to. Quote Link to comment
sternbear Posted June 20, 2022 Share Posted June 20, 2022 49 minutes ago, Sharpie said: when you start the surver for the first time it generates the files then shutdown the server and edit away what you need to. Yeah, did that and had no files generated. Quote Link to comment
swiss01 Posted June 28, 2022 Share Posted June 28, 2022 On 6/20/2022 at 7:41 PM, sternbear said: Yeah, did that and had no files generated. You can found the Sample here https://matrix-org.github.io/synapse/latest/usage/configuration/homeserver_sample_config.html Quote Link to comment
Gazeley Posted August 23, 2022 Share Posted August 23, 2022 (edited) If anyone else gets that permission error regarding "media_store", you have to edit your homeserver.yaml file's media_store_path to: media_store_path: /data/media_store Didn't see this mentioned in any other guides and it had me stuck for quite a while. Edited August 26, 2022 by Gazeley Quote Link to comment
Gazeley Posted August 23, 2022 Share Posted August 23, 2022 (edited) I've probably spent a dozen hours on this but I'm still hitting snags all over the place. An updated guide seems necessary because apparently a lot has changed since the first couple pages in this thread. After combing through every post here I have a semi-working matrix server but: • I can't invite or chat with people outside of my server. Assuming this has something to do with federation but I have no idea what's wrong. • Element docker doesn't work. I get a generic "Your Element is misconfigured - Unexpected error resolving homeserver configuration" message. Pretty stumped on this because according to the setup guide all there is to do is add my domain to 2 spots in the config.json file.... not sure how I could have screwed it up. • I can't get Jitsi installed at all. I followed spaceinvaderone's video precisely but when it comes time to download/install the 4 docker images with that script, 2 of them throw a bunch of errors and fail to start. If anyone has any input it'd be appreciated. ------------------------------------------------------ ------------------------------------------------------ (EDIT 2) Finally fixed the federation issue! I've been tearing my hair out over this. Its been a Cloudflare issue all along - you have to toggle the "Proxy Status" on the CNAME record from the default "Proxied" to "DNS Only" I pass all checks at https://federationtester.matrix.org/ Also I fixed element by adding the following to the matrix homeserver.yaml: web_client_location: https://chat.mydomain.com ------------------------------------------------------ ------------------------------------------------------ (EDIT 3) 😭 I spoke too soon. Switching the CNAME from 'Proxied' to 'DNS Only' did fix federation, but eventually it broke my subdomain to where I couldn't reach bridge.mydomain.com anymore. Somehow the issue is with DNS and Cloudflare and Federation but it's all over my head and I can't find any good documentation. ------------------------------------------------------ ------------------------------------------------------ (EDIT 4) Apparently if you want federation the subdomain (bridge.mydomain.com) needs to be an A record NOT a CNAME record. You also need to create an SRV record like so: After days of banging my head against the wall this finally got federation working for me. ------------------------------------------------------ ------------------------------------------------------ (EDIT 5) AAAAAHHHHHHHHHHH!!!! I spoke to ****ing soon again! After changing the Cloudflare settings above I finally pass the federation check - but I still can't chat with other users. This is a living nightmare but I'm in too deep to give up. ------------------------------------------------------ ------------------------------------------------------ (EDIT 6) *incoherent cursing and sobbing* ------------------------------------------------------ ------------------------------------------------------ (EDIT 7) Finally got it!!! 😄 The A record on Cloudflare has to be toggled to "DNS Only". I knew it was going to be something stupid simple. I've never had an issue with Cloudflare proxies before - but apparently matrix federation does not like it one bit. ------------------------------------------------------ ------------------------------------------------------ (EDIT 8 ) This is a goddamn Greek tragedy. I made the above edit while I was at work - on a different IP. But I just got home from work to discover I can't access bridge.mydomain.com at all, presumably because DNS doesn't work properly when the source and destination IP are the same. If I turn proxy back on everything works great internally but then I'm isolated to my own server with no federation again. Curse you @yinzer!!!! And you @HojojojoWololo!!! And everyone else who made this look easy and led me down this dark path! I rue the day I ever found this thread. ------------------------------------------------------ ------------------------------------------------------ (EDIT 9) I'm almost scared to write this for fear of tempting fate - but I seem to have resolved the issue. Turns out the issue was my firewall. I had to enable "Automatic outbound NAT for Reflection" in OPNsense under Firewall > Settings > Advanced. It's been a long hard road and this journey has transformed me. I'm no longer the same naive boy who thought setting up a matrix server would be a fun Saturday project. I'm now a grizzled veteran of unraid networking, a guru of OPNsense, and a master of matrix. But I've lost the gleam in my eye and the wind in my soul. homeserver.yaml config.json turnserver.conf matrix.subdomain.conf element-web.subdomain.conf Edited August 31, 2022 by Gazeley 1 Quote Link to comment
HojojojoWololo Posted September 1, 2022 Share Posted September 1, 2022 (edited) On 8/23/2022 at 11:17 AM, Gazeley said: I've probably spent a dozen hours on this but I'm still hitting snags all over the place. An updated guide seems necessary because apparently a lot has changed since the first couple pages in this thread. After combing through every post here I have a semi-working matrix server but: • I can't invite or chat with people outside of my server. Assuming this has something to do with federation but I have no idea what's wrong. • Element docker doesn't work. I get a generic "Your Element is misconfigured - Unexpected error resolving homeserver configuration" message. Pretty stumped on this because according to the setup guide all there is to do is add my domain to 2 spots in the config.json file.... not sure how I could have screwed it up. • I can't get Jitsi installed at all. I followed spaceinvaderone's video precisely but when it comes time to download/install the 4 docker images with that script, 2 of them throw a bunch of errors and fail to start. If anyone has any input it'd be appreciated. ------------------------------------------------------ ------------------------------------------------------ (EDIT 2) Finally fixed the federation issue! I've been tearing my hair out over this. Its been a Cloudflare issue all along - you have to toggle the "Proxy Status" on the CNAME record from the default "Proxied" to "DNS Only" I pass all checks at https://federationtester.matrix.org/ Also I fixed element by adding the following to the matrix homeserver.yaml: web_client_location: https://chat.mydomain.com ------------------------------------------------------ ------------------------------------------------------ (EDIT 3) 😭 I spoke too soon. Switching the CNAME from 'Proxied' to 'DNS Only' did fix federation, but eventually it broke my subdomain to where I couldn't reach bridge.mydomain.com anymore. Somehow the issue is with DNS and Cloudflare and Federation but it's all over my head and I can't find any good documentation. ------------------------------------------------------ ------------------------------------------------------ (EDIT 4) Apparently if you want federation the subdomain (bridge.mydomain.com) needs to be an A record NOT a CNAME record. You also need to create an SRV record like so: After days of banging my head against the wall this finally got federation working for me. ------------------------------------------------------ ------------------------------------------------------ (EDIT 5) AAAAAHHHHHHHHHHH!!!! I spoke to ****ing soon again! After changing the Cloudflare settings above I finally pass the federation check - but I still can't chat with other users. This is a living nightmare but I'm in too deep to give up. ------------------------------------------------------ ------------------------------------------------------ (EDIT 6) *incoherent cursing and sobbing* ------------------------------------------------------ ------------------------------------------------------ (EDIT 7) Finally got it!!! 😄 The A record on Cloudflare has to be toggled to "DNS Only". I knew it was going to be something stupid simple. I've never had an issue with Cloudflare proxies before - but apparently matrix federation does not like it one bit. ------------------------------------------------------ ------------------------------------------------------ (EDIT 8 ) This is a goddamn Greek tragedy. I made the above edit while I was at work - on a different IP. But I just got home from work to discover I can't access bridge.mydomain.com at all, presumably because DNS doesn't work properly when the source and destination IP are the same. If I turn proxy back on everything works great internally but then I'm isolated to my own server with no federation again. Curse you @yinzer!!!! And you @HojojojoWololo!!! And everyone else who made this look easy and led me down this dark path! I rue the day I ever found this thread. ------------------------------------------------------ ------------------------------------------------------ (EDIT 9) I'm almost scared to write this for fear of tempting fate - but I seem to have resolved the issue. Turns out the issue was my firewall. I had to enable "Automatic outbound NAT for Reflection" in OPNsense under Firewall > Settings > Advanced. It's been a long hard road and this journey has transformed me. I'm no longer the same naive boy who thought setting up a matrix server would be a fun Saturday project. I'm now a grizzled veteran of unraid networking, a guru of OPNsense, and a master of matrix. But I've lost the gleam in my eye and the wind in my soul. homeserver.yaml 1.23 kB · 0 downloads config.json 1.94 kB · 0 downloads turnserver.conf 325 B · 0 downloads matrix.subdomain.conf 1.4 kB · 0 downloads element-web.subdomain.conf 469 B · 0 downloads In my defense, the post is almost two years old (so it's pretty outdated) and it took me a days-long odyssey to get it to work, too. I mentioned that here, though, so you could have been forewarned But I can absolutely understand your annoyance and when an update of Jitsi failed last year, I decided to get rid of it cause the setup was so painful. Edited September 1, 2022 by HojojojoWololo typos 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.