Setting up a DEN Chat voice host with Cloudflare
- Part 1 — Create a Serverless SFU app
- Part 2 — Create a TURN Server app
- Part 3 — Enter the credentials in DEN Chat
- What happens next
- Security notes
DEN Chat group voice uses two Cloudflare Realtime services working together:
- a Serverless SFU — routes everyone’s audio/video through Cloudflare’s network, and
- a TURN server — handles connectivity (NAT traversal) so peers behind firewalls can connect.
You’ll create both in the Cloudflare dashboard, copy four values, and paste them into DEN Chat’s Voice Hosting settings. Once published, your host shows up for the hub’s members, who can then join voice.
You’ll need: a Cloudflare account, and membership in the hub you want to host voice for.
NOTICE: Cloudflare shows each API Token only once. Copy it immediately — you can’t view it again later.
Part 1 — Create a Serverless SFU app
1. In the Cloudflare dashboard, open the Quick search box (top-left of the sidebar, or press Ctrl/⌘ + K).
2. Type sfu and open Realtime → Serverless SFU.

3. On the Serverless SFU page, click Create (top-right).

4. Give the app a name (e.g. den-voice) and click Create.

5. Copy the App ID and the API Token, then click Finish.

Keep these two for later:
| Cloudflare (Serverless SFU) | → | DEN Chat field |
|---|---|---|
| App ID | → | SFU App ID |
| API Token | → | SFU API Token |
Part 2 — Create a TURN Server app
1. Open Quick search again, type turn, and open Realtime → TURN Server.

2. On the TURN Server page, click Create (top-right).

3. Give it a name (e.g. den-turn) and click Create.

4. Copy the Turn Token ID and the API Token.

Keep these two:
| Cloudflare (TURN Server) | → | DEN Chat field |
|---|---|---|
| Turn Token ID | → | TURN Token ID |
| API Token | → | TURN API Token |
You do not need the
curlsnippet Cloudflare shows for generating credentials — DEN Chat does that for you using the Token ID + API Token you just copied.
Part 3 — Enter the credentials in DEN Chat
1. Open the hub you want to host voice for, then go to User Settings → Voice Hosting.
(Alternatively: open any voice channel in that hub and click Provide voice hosting.)
2. Choose your Publish scope — e.g. Hub (all members) so everyone in the hub can use it.
3. Make sure Cloudflare is selected as the provider.
4. Paste your four values into the matching fields:
| Field | Value |
|---|---|
| SFU App ID | Serverless SFU → App ID |
| SFU API Token | Serverless SFU → API Token |
| TURN Token ID | TURN Server → Turn Token ID |
| TURN API Token | TURN Server → API Token |
5. Turn on Hosting Active.
6. Click Save & Publish.
What happens next
- Your host now appears under Available Hosts in the hub’s voice channels — members can Join Voice and DEN Chat will route their audio/video through your Cloudflare SFU, using your TURN credentials for connectivity.
- Your credentials are published encrypted to the hub’s members, not stored in plaintext.
- To pause hosting later, toggle Hosting Active off and Save & Publish again.
Security notes
- Treat the two API Tokens like passwords — anyone with them can use your Cloudflare Realtime quota.
- If a token is ever exposed, delete/rotate the app in Cloudflare, create a new one, and re-publish your Voice Hosting with the new values.
Write a comment