From ae765a2cc6e8b3b0a810454220ffd5b95df286d3 Mon Sep 17 00:00:00 2001 From: Jacob Schlecht Date: Wed, 18 Feb 2026 17:45:20 -0700 Subject: [PATCH] feat: add voice to the compose, caddyfile, and livekit config Web section of the compose is commented out for now Added section to readme about the name of the project changing This commit was made without the use of generative AI. Signed-off-by: Jacob Schlecht --- Caddyfile | 14 ++++++++++++++ README.md | 21 +++++++++++++++------ compose.yml | 31 +++++++++++++++++++++++++++++++ generate_config.sh | 25 +++++++++++++++++++++++++ livekit.yml | 9 +++++++++ 5 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 livekit.yml diff --git a/Caddyfile b/Caddyfile index b14a88d..4bee7b0 100644 --- a/Caddyfile +++ b/Caddyfile @@ -34,5 +34,19 @@ } } + route /livekit* { + uri strip_prefix /livekit + reverse_proxy http://livekit:7880 { + header_down Location "^/" "/livekit/" + } + } + + route /ingress* { + uri strip_prefix /ingress + reverse_proxy http://voice-ingress:8500 { + header_down Location "^/" "/ingress/" + } + } + reverse_proxy http://web:5000 } diff --git a/README.md b/README.md index 1eec0ae..4b15ebd 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ This repository contains configurations and instructions that can be used for de > [!WARNING] > If you are updating an instance from before November 28, 2024, please consult the [notices section](#notices) at the bottom. +> If you are updating an instance from before October 5, 2025, please consult the [notices section](#notices) at the bottom. > [!IMPORTANT] > A list of security advisories is [provided at the bottom](#security-advisories). @@ -24,12 +25,6 @@ This repository contains configurations and instructions that can be used for de > [!NOTE] > Please consult _[What can I do with Stoat, and how do I self-host?](https://developers.revolt.chat/faq.html#admonition-what-can-i-do-with-revolt-and-how-do-i-self-host)_ on our developer site for information about licensing and brand use. -> [!NOTE] -> amd64 builds are not currently available for the web client. - -> [!NOTE] -> This guide does not include working voice channels ([#138](https://github.com/revoltchat/self-hosted/pull/138#issuecomment-2762682655)). A [rework](https://github.com/revoltchat/backend/issues/313) is currently in progress. - ## Table of Contents - [Deployment](#deployment) @@ -102,6 +97,8 @@ apt-get update && apt-get upgrade -y ufw allow ssh ufw allow http ufw allow https +ufw allow 7881/tcp +ufw allow 50000:50100/udp ufw default deny ufw enable @@ -416,6 +413,18 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" }) > > - Added `rabbit` (RabbitMQ) and `pushd` (Stoat push daemon) +> [!IMPORTANT] +> As of October 5, 2025, the following breaking changes have been applied: +> +> - Rename docker compose project from revolt to stoat +> +> These will NOT automatically be applied to your environment. +> +> You must run the environment with the old revolt name to apply the update. After you run `docker compose pull` during the upgrade procedure, you must run `docker compose -p revolt down`. You may then continue with the upgrade procedure. +> +> ```bash +> + ## Security Advisories - (`2024-06-21`) [GHSA-f26h-rqjq-qqjq revoltchat/backend: Unrestricted account creation.](https://github.com/revoltchat/backend/security/advisories/GHSA-f26h-rqjq-qqjq) diff --git a/compose.yml b/compose.yml index 4f92e5c..e1f742a 100644 --- a/compose.yml +++ b/compose.yml @@ -169,6 +169,30 @@ services: target: /Revolt.toml restart: always + # Voice ingress daemon + voice-ingress: + image: ghcr.io/stoatchat/voice-ingress:v0.11.1 + restart: always + depends_on: + database: + condition: service_healthy + rabbit: + condition: service_healthy + volumes: + - type: bind + source: ./Revolt.toml + target: /Revolt.toml + + livekit: + image: ghcr.io/stoatchat/livekit-server:v1.9.6 + command: --config /etc/livekit.yml + volumes: + - ./livekit.yml:/etc/livekit.yml + ports: + - "7881:7881" + - "50000-50100:50000-50100/udp" + restart: always + # Create buckets for minio. createbuckets: image: docker.io/minio/mc @@ -183,3 +207,10 @@ services: /usr/bin/mc mb minio/revolt-uploads; exit 0; " + + # Web App + # Commented out for now, waiting on official image + # web: + # image: ghcr.io/stoatchat/for-web:v0.3.0 + # restart: always + # env_file: .env.web \ No newline at end of file diff --git a/generate_config.sh b/generate_config.sh index f16052f..5b30565 100644 --- a/generate_config.sh +++ b/generate_config.sh @@ -12,6 +12,9 @@ echo "events = \"wss://$1/ws\"" >> Revolt.toml echo "autumn = \"https://$1/autumn\"" >> Revolt.toml echo "january = \"https://$1/january\"" >> Revolt.toml +echo "[hosts.livekit]" >> Revolt.toml +echo "worldwide = \"wss://$1/livekit\"" >> Revolt.toml + # VAPID keys echo "" >> Revolt.toml echo "[pushd.vapid]" >> Revolt.toml @@ -24,3 +27,25 @@ rm vapid_private.pem echo "" >> Revolt.toml echo "[files]" >> Revolt.toml echo "encryption_key = \"$(openssl rand -base64 32)\"" >> Revolt.toml + +livekit_key=$(openssl rand -hex 6) +livekit_secret=$(openssl rand -hex 24) + +# livekit key +echo "" >> livekit.yml +echo "keys:" >> livekit.yml +echo " $livekit_key: $livekit_secret" >> livekit.yml +echo "" >> livekit.yml +echo "webhook:" >> livekit.yml +echo " api_key: $livekit_key" >> livekit.yml +echo " urls:" >> livekit.yml +echo " - \"https://$1/ingress/worldwide\"" >> livekit.yml + +# livekit config +echo "" >> Revolt.toml +echo "[api.livekit.nodes.worldwide]" >> Revolt.toml +echo "url = \"https://$1/livekit\"" >> Revolt.toml +echo "lat = 0.0" >> Revolt.toml +echo "lon = 0.0" >> Revolt.toml +echo "key = \"$livekit_key\"" >> Revolt.toml +echo "secret = \"$livekit_secret\"" >> Revolt.toml \ No newline at end of file diff --git a/livekit.yml b/livekit.yml new file mode 100644 index 0000000..6fe2a63 --- /dev/null +++ b/livekit.yml @@ -0,0 +1,9 @@ +rtc: + use_external_ip: true + port_range_start: 50000 + port_range_end: 50100 + tcp_port: 7881 +redis: + address: redis:6379 +turn: + enabled: false \ No newline at end of file