Setting up VoIP on my matrix server
from guynamedzero@piefed.zeromedia.vip to selfhosted@lemmy.world on 18 Oct 04:03
https://piefed.zeromedia.vip/post/65896

Hi there! Recently I’ve been setting up a self-hosted instance of matrix, using Synapse in docker, but I’ve been struggling to get voice chat working, could anyone give me some pointers? It looks like I need something called a TURN server, but I can’t find any good instructions to set this up, or if this is actually what I need to enable voice chat.

Thank you so much to any responses!

Edit: this is what my compose file looks like (with some information ommitted)

services:  
  synapse:  
    image: ghcr.io/element-hq/synapse:latest  
    restart: unless-stopped  
    environment:  
      - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml  
    volumes:  
      - ./files:/data  
    depends_on:  
      - db  
    ports:  
      - 8008:8008/tcp  
    networks:  
      - npm_proxy  
  db:  
    image: docker.io/postgres:15-alpine  
    environment:  
      - POSTGRES_USER=**Ommitted**  
      - POSTGRES_PASSWORD=**Ommitted**  
      - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C  
    volumes:  
      - ./schemas:/var/lib/postgresql/data  
    restart: unless-stopped  
networks:  
  npm_proxy:  
    external: true  

Update: someone on windows is able to call me, but on their phone, it says MISSING_MATRIX_RTC_FOCUS. I’m going to look into this

#selfhosted

threaded - newest

yaroto98@lemmy.world on 18 Oct 04:30 next collapse

Did you create your own docker container, or did you use the official one?

I have the official one up and running, voice and video chat work out of the box.

guynamedzero@piefed.zeromedia.vip on 18 Oct 05:12 next collapse

I’ve tried using the docker container at ghcr.io/element-hq/synapse and https://hub.docker.com/r/matrixdotorg/synapse, whenever someone tries to call another, it just stays on “connecting” forever

guynamedzero@piefed.zeromedia.vip on 18 Oct 05:19 collapse

I just updated the post with my compose.yaml file in case that’s helpful

tekato@lemmy.world on 18 Oct 06:24 next collapse

You have a higher chance of solving this issue if you ask in #webrtc:matrix.org

olorin99@kbin.earth on 18 Oct 06:28 next collapse

I'd recommend using https://github.com/spantaleev/matrix-docker-ansible-deploy. It makes managing synapse and related services pretty easy.

Eirikr70@jlai.lu on 18 Oct 06:37 next collapse

Look at github.com/coturn/coturn

stratself@lemdro.id on 18 Oct 12:15 next collapse

You’ll need a TURN server to relay calls and provide signalling capabilities, which is needed most of the time. Here’s Synapse docs on it, and I’ll probably use coturn:

element-hq.github.io/synapse/…/turn-howto.html


There’s also this new technology called Element Call, which uses a diffent tool called LiveKit. You should check it out too

github.com/element-hq/element-call/…/README.md

domoel@feddit.org on 18 Oct 12:42 next collapse

I have written a tutorial to set it up. Here you go: ztfr.de/matrixrtc-with-synology-container-manager…

guynamedzero@piefed.zeromedia.vip on 20 Oct 20:58 collapse

Thanks! I had gotten it working by setting element_call in the .well-known to call.element.io, but I followed this and it works great! Unfortunately, the legacy call is oddly inconsistent, some people can use it, but some can’t.

JadedBlueEyes@programming.dev on 18 Oct 17:58 collapse

All of the other answers mentioning coturn here are wrong - your friend is trying to call you using element call, which needs an instance of a livekit and a JWT micro service to grant permissions to use the livekit instance. You can use a livekit cloud account, but you do need to host the JWT service. I would suggest looking up Element’s documentation

suzune@ani.social on 19 Oct 12:40 collapse

This is probably the reason. Older element versions has video and telephony via native interfaces and coturn/turnserver for firewall hole poking.

The newer Element X uses a different infrastructure that even allows multi user conferences. You need to update your well-known server response to point it to the new infrastructure: github.com/element-hq/element-call