this post was submitted on 20 Nov 2024
14 points (93.8% liked)

Selfhosted

40474 readers
472 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (donโ€™t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I am trying to get coturn working on my vps provider (I am using digital ocean) for matrix rtc.

I cannot seem to get matrix dendrite to connect to it. I think I have landed on the issue being dns records in cloudflare but I am unsure. Recently I switched to cloudflare and have been using tunnels (which I use for matrix)

Matrix dendrite works fine besides rtc when I uncomment the lines for the turn server but then doesn't function at all when they are there.

I am using ubuntu with docker for matrix dendrite and I am using a debian vps with digital ocean for the coturn server.

Any help is appreciated!

EDIT: Lemmy you beautiful community you!!! Solved yet another issue of mine!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ludicolo@lemmy.ml 2 points 1 week ago* (last edited 1 week ago) (7 children)

Sorry I jusy recently updated my comment. I was able to get it to say "relay" when using the regular public ip and port for my vps. It doesn't work if I use the domain I created for it though "turn.domainexample.com"

The domain name should be pointed to the vps public ip type A

Paid subscription? No I only have the cloudflare domain and the vps subscription. Do I need the subscription to get this working? ๐Ÿ˜ฎโ€๐Ÿ’จ

Or is there another solution?

[โ€“] hendrik@palaver.p3x.de 1 points 1 week ago* (last edited 1 week ago) (6 children)

Once the TURN testing tools I linked, work with the domain name: You should be able to fill out the turn section in config/dendrite.yaml with that. It should be something like turn:turn.domainexample.com?transport=udp.

Maybe your DNS isn't pointing to the correct IP? You could try pinging it, or use the command dig A turn.domainexample.com and see if it returns the correct IP for the VPS.

(Edited)

[โ€“] ludicolo@lemmy.ml 2 points 1 week ago (5 children)

I did fill that out, anytime I do matrix crashes and I think the logs say something along the lines of not being able to find the turn server. I just tried it now with the vps ip and port and it still caused matrix to crash.

The turn tesying tools don't work with the URI at all its only the ip and port they work with.

When I use the dig A command it gives me different ips than the vps ip.

[โ€“] hendrik@palaver.p3x.de 1 points 1 week ago* (last edited 1 week ago) (1 children)

Alright. I believe that means you need to fix your DNS.
"turn.domainexample.com" is pointing to a different server, and not the one running coturn.

Do you use Cloudflare as a DNS provider? I mean I don't know how that works, since I've never used it... But judging by the following documentation: https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/

I believe you need a dedicated record for the turn subdomain that's not "Proxied", but "DNS only".

But(!) there seems to be a caveat. There is a note on that page, saying: "If you have multiple A/AAAA records on the same name and at least one of them is proxied, Cloudflare will treat all A/AAAA records on this name as being proxied." I believe that means you can't point one of the subdomains directly at your VPS. At least not with Cloudflare DNS.

Edit: I'm not sure though, why putting in the IP address doesn't work... I think that should work. I'm not sure what Dendrite does in the background. Have you added the correct secret or username/password and set the correct transport type (TCP/UDP)? Maybe you could add the port number if it's non-standard...

[โ€“] ludicolo@lemmy.ml 2 points 1 week ago* (last edited 1 week ago) (1 children)

Progress has been made!

So I got it working with the domain name. The turn testing tools now respond with relay and pin point the vps server! Nice!

However when I put the info into the matrix dendrite.yaml it still crashes. The logs say

"Invalid config file: yaml: line 210: did not find expected key"

"Invalid config file: yaml: line 206: did not find expected " - " indicator"

Line 210 and 206 refer to the turn section which is formatted:

turn: turn_user_lifetime: "5m" turn_uris: - turn:turn.exampledomain.com?transport=udp - turn:turn.exampledomain.com?transport=tcp

turn_username: user
turn_password: password

EDIT: line 206 seems to be

  • turn:turn.exampledomain.com?transport=tcp

And line 210 is uncommented description so I don't know what that is about

[โ€“] hendrik@palaver.p3x.de 1 points 1 week ago* (last edited 1 week ago) (1 children)

Check your indentation. I'm not sure if Lemmy is messing with that, but there seems to be an additional erraneous space before turn_username and password in your config. And the dash should (I guess) be indented two spaces further than the previous line and then one space after the dash. I'm not sure if it's that.

[โ€“] ludicolo@lemmy.ml 2 points 1 week ago* (last edited 1 week ago) (1 children)

Holy. Fuck. You just did it. You absolute madlad. It works no issues!!!

Thank you!!

[โ€“] hendrik@palaver.p3x.de 1 points 1 week ago* (last edited 1 week ago)

You're welcome! Glad I could help, happy self-hosting โ˜บ๏ธ Hope it also forwards everything correctly and the chat client/app works, too.

load more comments (3 replies)
load more comments (3 replies)
load more comments (3 replies)