diff --git a/IPAM.md b/IPAM.md index 451ec88..1b25c13 100644 --- a/IPAM.md +++ b/IPAM.md @@ -30,7 +30,7 @@ All DNS entries are registered by OpnSense-DeLoreane to point to each machine (u All public DNS entries are also registered on Cloudflare with a CNAME entry to `rack.fantomitechno.dev` which points to my public IP. -There is a Port forward for all traffic from the Internet to ports 80, 443 and 17230 of OpnSense-DeLoreane to fant0mib0t. +There is a Port forward for all traffic from the Internet to ports 80, 443, 7881, 17230 and the range from 50100 to 50200 of OpnSense-DeLoreane to fant0mib0t. | Ranges | Description | | :----- | :------------- | @@ -76,6 +76,7 @@ Global DNS: `fant0mib0t.renoux.dev` | 222 | Gitea SSH | | | 1099 | CelesteNet Admin | `cneta.fantomitechno.dev` | | 2000 | Matrix | `matrix.fantomitechno.dev` | +| 2001, 2002 | Livekit (Call for Matrix) | `livekit.fantomitechno.dev` | | 2010 | Tranquill PDS | `pds.fantomitechno.dev` | | 2020, 2021 | Mastodon | `mastodon.fantomitechno.dev` | | 3000 | Graphana | `graph.fantom.home` | @@ -100,4 +101,6 @@ Global DNS: `fant0mib0t.renoux.dev` | 4094 | Sonarr | `sonarr.fantom.home` | | 4095 | Radarr | `radarr.fantom.home` | | 4096 | Bazarr | `bazarr.fantom.home` | +| 7881 | Livekit | | | 17230 | CelesteNet | `cnet.fantomitechno.dev` | +| 50100-50200 | Livekit Voice ports | | diff --git a/docker/fant0mib0t/continuwuity/continuwuity-resolv.conf b/docker/fant0mib0t/continuwuity/continuwuity-resolv.conf new file mode 100644 index 0000000..b55dc9f --- /dev/null +++ b/docker/fant0mib0t/continuwuity/continuwuity-resolv.conf @@ -0,0 +1,3 @@ +nameserver 172.16.20.1 +nameserver 9.9.9.9 +nameserver 1.1.1.1 \ No newline at end of file diff --git a/docker/fant0mib0t/continuwuity/docker-compose.yml b/docker/fant0mib0t/continuwuity/docker-compose.yml new file mode 100644 index 0000000..05f0abb --- /dev/null +++ b/docker/fant0mib0t/continuwuity/docker-compose.yml @@ -0,0 +1,49 @@ +name: continuwuity +services: + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:v26-maxperf" + restart: unless-stopped + command: /sbin/conduwuit + ports: + - 127.0.0.1:2000:8008 + + volumes: + - rockdb:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf + #- ./continuwuity.toml:/etc/continuwuity.toml + environment: + CONTINUWUITY_SERVER_NAME: matrix.fantomitechno.dev + CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity + CONTINUWUITY_ADDRESS: 0.0.0.0 + CONTINUWUITY_PORT: 8008 + CONTINUWUITY_MATRIX_RTC__foci: '[{ type = "livekit", livekit_service_url = "https://livekit.fantomitechno.dev" }]'' + + lk-jwt-service: + image: ghcr.io/element-hq/lk-jwt-service:0.5.0 + container_name: lk-jwt-service + environment: + - LIVEKIT_JWT_BIND=:8081 + - LIVEKIT_URL=wss://livekit.fantomitechno.dev + - LIVEKIT_FULL_ACCESS_HOMESERVERS=matrix.fantomitechno.dev + - LIVEKIT_KEY=${LK_MATRIX_KEY} + - LIVEKIT_SECRET=${LK_MATRIX_SECRET} + restart: unless-stopped + ports: + - "127.0.0.1:2001:8081" + + livekit: + image: livekit/livekit-server:v1.13.4 + container_name: livekit + command: --config /etc/livekit.yaml + restart: unless-stopped + volumes: + - ./livekit.yaml:/etc/livekit.yaml:ro + ports: + - "127.0.0.1:2002:7880/tcp" + - "7881:7881/tcp" + - "50100-50200:50100-50200/udp" + environment: + LIVEKIT_KEYS: "${LK_MATRIX_KEY}: ${LK_MATRIX_SECRET}" + +volumes: + rockdb: diff --git a/docker/fant0mib0t/continuwuity/livekit.yaml b/docker/fant0mib0t/continuwuity/livekit.yaml new file mode 100644 index 0000000..a8c58ce --- /dev/null +++ b/docker/fant0mib0t/continuwuity/livekit.yaml @@ -0,0 +1,7 @@ +port: 7880 +rtc: + tcp_port: 7881 + port_range_start: 50100 + port_range_end: 50200 + use_external_ip: true + enable_loopback_candidate: false diff --git a/hosts/fant0mib0t/default.nix b/hosts/fant0mib0t/default.nix index 9b7f99f..f50dc9f 100644 --- a/hosts/fant0mib0t/default.nix +++ b/hosts/fant0mib0t/default.nix @@ -18,7 +18,6 @@ "tangled" "copyparty.nix" "docker.nix" - "matrix.nix" ]); # Bootloader diff --git a/modules/caddy/fant0mib0t b/modules/caddy/fant0mib0t index 745bb3d..92dae81 100644 --- a/modules/caddy/fant0mib0t +++ b/modules/caddy/fant0mib0t @@ -30,6 +30,18 @@ matrix.fantomitechno.dev { reverse_proxy 127.0.0.1:2000 } +livekit.fantomitechno.dev { + import logging livekit + # for lk-jwt-service + @lk-jwt-service path /sfu/get* /healthz* /get_token* + route @lk-jwt-service { + reverse_proxy 127.0.0.1:2001 + } + + # for livekit + reverse_proxy 127.0.0.1:2002 +} + pds.fantomitechno.dev { import logging pds reverse_proxy 127.0.0.1:2010 diff --git a/modules/matrix.nix b/modules/matrix.nix deleted file mode 100644 index af5b222..0000000 --- a/modules/matrix.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: { - services.matrix-conduit = { - enable = true; - - settings = { - global = { - allow_registration = false; - allow_federation = true; - - database_backend = "rocksdb"; - - server_name = "matrix.fantomitechno.dev"; - trusted_servers = [ - "matrix.org" - "faimaison.net" - ]; - - address = "127.0.0.1"; - port = 2000; - }; - }; - }; -}