Setting up a DEN Chat voice host with Cloudflare

DEN Chat group voice uses two Cloudflare Realtime services working together, here's how to get them

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).

Cloudflare dashboard — Quick search

2. Type sfu and open Realtime → Serverless SFU.

![Searching for Serverless SFU](insert s2 here)

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

![Serverless SFU overview — Create](insert s3 here)

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

![Create an application — name](insert s4 here)

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

![Serverless SFU app — App ID and API Token](insert s5 here)

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.

![Searching for TURN Server](insert s6 here)

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

![TURN Server overview — Create](insert s7 here)

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

![Create a TURN Server app — name](insert s8 here)

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

![TURN Server app — Turn Token ID and API Token](insert s9 here)

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 curl snippet 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