Advertisement
Guest User

Matrix config

a guest
Apr 27th, 2025
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # Composer
  2.  
  3. services:
  4. coturn:
  5. image: coturn/coturn:latest
  6. restart: unless-stopped
  7. network_mode: host
  8. volumes:
  9. - "./turnserver.conf:/etc/turnserver.conf:ro"
  10.  
  11. element-jwt:
  12. image: ghcr.io/element-hq/lk-jwt-service:latest
  13. environment:
  14. - LIVEKIT_URL=wss://{domain}
  15. - LIVEKIT_KEY=devkey
  16. - LIVEKIT_SECRET={key}
  17. restart: unless-stopped
  18. ports:
  19. - "127.0.0.1:8080:8080"
  20.  
  21. livekit:
  22. image: livekit/livekit-server:latest
  23. command: --config /etc/livekit.yaml
  24. ports:
  25. - "127.0.0.1:7880:7880/tcp"
  26. - "7881:7881/tcp"
  27. - "50100-50200:50100-50200/udp"
  28. volumes:
  29. - ./livekit/config.yaml:/etc/livekit.yaml:ro
  30. restart: unless-stopped
  31.  
  32. caddy:
  33. image: caddy:latest
  34. restart: unless-stopped
  35. ports:
  36. - "80:80"
  37. - "443:443"
  38. volumes:
  39. - ./Caddyfile:/etc/caddy/Caddyfile
  40. - ./caddy_data:/data/caddy/
  41.  
  42. synapse:
  43. image: docker.io/matrixdotorg/synapse:latest
  44. restart: always
  45. environment:
  46. - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
  47. - SYNAPSE_SERVER_NAME={domain}
  48. - SYNAPSE_SERVER_ADDRESS={domain}
  49. - SYNAPSE_REPORT_STATS=yes
  50. volumes:
  51. - ./synapse:/data
  52. depends_on:
  53. - db
  54.  
  55. db: ...
  56.  
  57. # Livekit config:
  58. # I could have messed something here
  59.  
  60. port: 7880
  61. bind_addresses:
  62. - "0.0.0.0"
  63. rtc:
  64. tcp_port: 7881
  65. port_range_start: 50100
  66. port_range_end: 50200
  67. use_external_ip: true
  68. logging:
  69. level: debug
  70. turn:
  71. enabled: false # I have coturn, so not sure if I need this or I should remove coturn and proceed with livekit
  72. keys:
  73. devkey: {key}
  74.  
  75. # Caddy
  76.  
  77. {domain} {
  78. reverse_proxy /_matrix/* synapse:8008
  79. reverse_proxy /_synapse/* synapse:8008
  80. header /.well-known/matrix/* Content-Type application/json
  81. header /.well-known/matrix/* Access-Control-Allow-Origin *
  82. header /.well-known/matrix/* Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
  83. header /.well-known/matrix/* Access-Control-Allow-Headers: X-Requested-With, Content-Type, Authorization
  84. respond /.well-known/matrix/server `{"m.server": "{domain}:443"}`
  85. respond /.well-known/matrix/client `{"m.homeserver": {"base_url": "https://{domain}"}, "org.matrix.msc4143.rtc_foci": [{"type": "livekit", "livekit_service_url": "https://sfu-domain"}]}`
  86. }
  87.  
  88. sfu-domain {
  89. encode gzip
  90. reverse_proxy /livekit/jwt/* element-jwt:8080
  91. reverse_proxy /livekit/sfu/* livekit:7880
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement