Docs / Hosting OwnBase

Voice and huddles

By default no third-party ICE server is contacted. LAN peers connect directly. For people on different networks, provide your own STUN/TURN configuration through OWNBASE_ICE_SERVERS. Compose reads it from the environment or a .env file beside the compose file:

OWNBASE_ICE_SERVERS=[{"urls":"stun:turn.example.org:3478"},{"urls":"turn:turn.example.org:3478","username":"workspace","credential":"replace-with-a-strong-secret"}]

The authenticated /api/rtc-config endpoint supplies it to members. A TURN password written there is visible to every member and lasts until you change it. A relay of your own that shares a secret with the server avoids that (see Your own relay with coturn), and so does Cloudflare's.

For Cloudflare's relay, give the server the TURN key instead, and it asks Cloudflare for a password that lasts a day whenever calls need one. Members only ever receive that password; the API token stays with the server:

OWNBASE_CLOUDFLARE_TURN_KEY_ID=your-turn-key-id
OWNBASE_CLOUDFLARE_TURN_API_TOKEN=your-turn-key-api-token

Set both or neither. They are given to calls after OWNBASE_ICE_SERVERS.

Your own relay with coturn#

coturn is the TURN server most self-hosted calls use. Give it and the OwnBase server the same secret, and the server signs each member a password from it as they join a call. The password names the member and lasts a day, so nobody holds one for good, and coturn counts its quotas per member. coturn checks a password when a connection through it starts, so a call already running carries on past the day. Someone who leaves the workspace can use their last password until it runs out.

The relay can share a machine with the server or have one of its own. Either way it needs a public address and these ports open: 3478 over UDP and TCP, and 49152 to 65535 over UDP for the calls it carries. On Ubuntu 24.04:

sudo apt-get install -y coturn
openssl rand -hex 32

The second line makes the secret. Replace /etc/turnserver.conf with this, putting in the secret, the relay's name, and the machine's own address as ip -4 addr shows it:

listening-port=3478
listening-ip=10.0.0.5
relay-ip=10.0.0.5
min-port=49152
max-port=65535
realm=turn.example.org
server-name=turn.example.org

use-auth-secret
static-auth-secret=the-secret-from-openssl
fingerprint
stale-nonce=600
no-cli
no-software-attribute

# Relayed connections each member may hold, and in all. In a call of 16, a
# member holds up to 15 for each address in OWNBASE_TURN_URLS, and more on a
# device with several networks.
user-quota=100
total-quota=2000

# Nobody may relay into this machine's networks, or any other private one: a
# relay that reaches them lets anyone with a password in.
no-multicast-peers
denied-peer-ip=0.0.0.0-0.255.255.255
denied-peer-ip=10.0.0.0-10.255.255.255
denied-peer-ip=100.64.0.0-100.127.255.255
denied-peer-ip=127.0.0.0-127.255.255.255
denied-peer-ip=169.254.0.0-169.254.255.255
denied-peer-ip=172.16.0.0-172.31.255.255
denied-peer-ip=192.0.0.0-192.0.0.255
denied-peer-ip=192.0.2.0-192.0.2.255
denied-peer-ip=192.88.99.0-192.88.99.255
denied-peer-ip=192.168.0.0-192.168.255.255
denied-peer-ip=198.18.0.0-198.19.255.255
denied-peer-ip=198.51.100.0-198.51.100.255
denied-peer-ip=203.0.113.0-203.0.113.255
denied-peer-ip=240.0.0.0-255.255.255.255
denied-peer-ip=::1
denied-peer-ip=64:ff9b::-64:ff9b::ffff:ffff
denied-peer-ip=::ffff:0.0.0.0-::ffff:255.255.255.255
denied-peer-ip=100::-100::ffff:ffff:ffff:ffff
denied-peer-ip=2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff
denied-peer-ip=2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
denied-peer-ip=fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
denied-peer-ip=fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
# Except the relay's own address, where two people who both need it meet.
allowed-peer-ip=10.0.0.5

When the machine's own address is a private one behind NAT, as on most cloud servers, also tell coturn the public address that reaches it, public first: external-ip=<public address>/10.0.0.5. When the machine has its public address itself, use that in listening-ip and relay-ip, and leave out allowed-peer-ip.

sudo systemctl restart coturn
sudo systemctl enable coturn

Then give OwnBase the relay's addresses, separated by commas, and the same secret. For the systemd service they go in /etc/ownbase/ownbase.env; for Compose, in a .env beside the compose file; for the Windows service, in NSSM's AppEnvironmentExtra:

OWNBASE_TURN_URLS=turn:turn.example.org:3478?transport=udp,turn:turn.example.org:3478?transport=tcp
OWNBASE_TURN_SECRET=the-secret-from-openssl

Restart the server. It refuses to start with only one of the two, with a secret shorter than 16 characters, or with Cloudflare's key set as well. Members then get the relay after OWNBASE_ICE_SERVERS, and Diagnostics shows relay routes for a call that went through it (see When a call will not connect).

To try the relay on its own, make a password by hand and give the address, username and password to the Trickle ICE page of the WebRTC samples (https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/). A relay line means coturn took the password:

user="$(( $(date +%s) + 3600 )):check"
echo "$user"
printf '%s' "$user" | openssl dgst -sha1 -hmac 'the-secret-from-openssl' -binary | base64

For networks that let only encrypted connections out, coturn can listen with TLS too: add tls-listening-port=5349, and cert= and pkey= naming a certificate for the relay's name that the turnserver user can read. Open TCP 5349, add turns:turn.example.org:5349?transport=tcp to OWNBASE_TURN_URLS, and restart coturn when the certificate is renewed.

Tried on 2026-10-28 on the same Ubuntu 24.04 machine as A Linux server with systemd, with coturn 4.6.1 from Ubuntu, the configuration above with the machine's address, which had no NAT, and the two settings in /etc/ownbase/ownbase.env:

  • In Chrome, two connections allowed only relayed routes, each with a password from /api/rtc-config, opened a data channel and passed a message. Both chose relay to relay, so the allowed-peer-ip exception works.
  • A password signed with another secret, and a correctly signed one that had run out a minute earlier, got 401 Unauthorized and no relay address.
  • The username and password made by hand with the lines above got one.
  • coturn's own test client, turnutils_uclient, was refused with 403 Forbidden IP when it asked to relay to 127.0.0.1, to 172.17.0.1 (Docker's network on that machine) and to 169.254.169.254, the address cloud machines answer their metadata on.
  • With the TLS lines added and a self-signed certificate, turnutils_uclient relayed between two allocations over port 5349 and lost nothing.

Not tried: external-ip behind NAT, and a browser over TLS, which would need a certificate it trusts.

When a call will not connect#

Someone who can chat but stays on Connecting… in a huddle has a connection that never came up. After 15 seconds the huddle bar says Can't connect to …, tries again with the call settings read afresh (twice at most), and offers Why? See the call log, which opens Diagnostics at that device's call log: each step of the setup, the kinds of route each side found (host on its own network, srflx its public address via STUN, relay through TURN) and why it did not connect. Routes are named by kind only; no address or SDP is recorded. The owner and admins also see Calls on this server in their own Diagnostics: who joined and left, which setups the server passed on or dropped, and each side's report of its connection, so the host can read both sides without asking for anyone's screen. That log is kept in memory, the latest 500 lines, and only for conversations the reader can see.

What the cause means:

  • No STUN or TURN server: the device can reach only its own network. Leave and rejoin, or open the workspace to all again, so it reads current settings.
  • No public address here / only its own network's addresses from them: a firewall or network on that side blocks reaching STUN; try another network.
  • Public addresses on both sides that do not meet: one network is too strict for a direct connection (often mobile data or a corporate network). Calls between them need a TURN relay in OWNBASE_ICE_SERVERS.

Browser microphone/camera access requires HTTPS (localhost is an exception). Use the Electron app for voice on plain HTTP LAN servers. Cameras are asked for 960 by 540 at 24 frames a second, and at most 1280 by 720 at 30. A shared screen goes at up to 1080p and 15 frames a second unless the sharer chooses 720p or a smoother rate. These defaults reduce processing and bandwidth but do not guarantee a fixed RAM budget.

How many people a call holds#

A huddle is a mesh. Everyone sends their microphone and camera to everyone else on a connection of its own, and each connection has an encoder of its own, so every person who joins costs everyone else another encoder and another share of their upload. Two limits keep that down, and each connection takes the stricter of the two.

The first is the size of the call:

People in the callWhat the camera sends each of the others
2the picture as it comes, about 2 Mbit/s
3full size, up to 24 frames a second and 1.2 Mbit/s
4two thirds of its size, up to 20 frames a second, 800 kbit/s
5 or 6two thirds of its size, up to 15 frames a second, 600 or 480 kbit/s
7 or morehalf its size, up to 15 frames a second, 400 kbit/s or less

The second is what each person sees. Each app tells the others how tall it draws their camera and their share, rounded up to 180, 270, 360, 540, 720 or 1,080 lines, or 0 when it draws them nowhere. The call hidden behind the chat, a window minimised or covered, and the row under a share put away all count as nowhere. A camera drawn 180 lines tall or less is sent at that size, at up to 15 frames a second and 200 kbit/s. At 270 lines it gets up to 350 kbit/s, and at 360 lines 20 frames a second and 600 kbit/s. A share is sent no taller than it is drawn. Nothing goes to someone who draws neither, and the encoder for them stops. An app from before this never says how it draws, and gets what the call's size allows.

Both change each connection in place, without setting the call up again, and the call log says each change.

A muted microphone sends nothing at all. It used to send silence, encoded once for every connection and decoded by everyone, so in a big call of mostly muted people that silence was most of what each person spent on sound. Turning the microphone on puts it back on every connection at once, again without setting the call up again.

A call with more than eight cameras on, or more than sixteen people, tells everyone in it once, in a notice that goes by itself, that it can stutter and what helps: turning cameras off, or muting when not talking. Nothing stops anyone joining.

The call view has nothing that moves forever and blurs nothing over a video. Either one made the browser draw the whole call again, every video in it, many times a second. In a call of seven, the pulsing "In huddle" dot and the blur behind each tile's name cost each person a third of a core between them.

These are the measurements behind it, taken on 24 and 25 October 2026 with scripts/measure-calls.mts:

  • Machine: Windows 11 desktop, Intel Core i5-12400F (6 cores, 12 threads), 16 GB, NVIDIA GeForce RTX 3060. Chromium 153, headless and drawing on the graphics card as a person's own browser does. VP8 encoded in software.
  • Setup: one browser per person, all on that machine, in one huddle over loopback, each in a 1280 by 800 window showing the call with everyone the same size. The camera played a 960 by 540 clip made by the script, someone swaying in front of a wall and a bookshelf with a webcam's grain; Chromium's own fake camera is flat colour and needs a quarter of the bits. Each size settled for 20 seconds, then ran for a minute.
  • CPU per person is every process of that person's browser, as a share of one core. All of them ran on one machine, so once the machine was busy all the time they were fighting each other for it, and the call broke down there before it would on separate computers.

With everyone's camera on and everyone watching:

PeopleCPU per personMachine busyUpload per personCamera sent asRound trip p95Audio concealedFreezes
223%11%0.4 Mbit/s270p, 15 fps1 ms0%0
333%22%0.5 Mbit/s180p, 15 fps1 ms0%0
443%25%0.8 Mbit/s180p, 15 fps1 ms0%0
554%31%1.0 Mbit/s180p, 15 fps1 ms0%0
669%46%1.3 Mbit/s180p, 15 fps3 ms0%0
780%52%1.5 Mbit/s180p, 15 fps3 ms0%0
894%74%1.8 Mbit/s180p, 15 fps7 ms0.1%12
9104%93%2.0 Mbit/s180p, 15 fps79 ms0.8%220

The tiles in that window are small, so the cameras went out small. Someone drawn larger, pinned or with the call given the whole window, is sent larger, up to what the call's size allows.

Ten browsers with every camera on needed more than the machine's 12 threads. It was busy all the time and the call broke down there, with a round trip of 1.7 seconds. Each person's own share grew by 10 to 14 points of a core with each person who joined, which puts ten at about 115% of a core each on separate computers, a fifth of this desktop's six cores. Ten people did fit with fewer cameras:

Ten peopleCPU per personMachine busyUpload per personRound trip p95Audio concealedFreezes
4 on camera94% on camera, 52% off63%2.3 Mbit/s on camera, 0.4 off4 ms0%0
Voice only28%30%0.4 Mbit/s1 ms0%0

Bigger calls are mostly people listening. With two cameras on, two people talking and everyone else muted:

PeopleCPU per personMachine busyUpload per person, on averageRound trip p95Audio concealed
1231%38%0.5 Mbit/s2 ms0%
1637%70%0.5 Mbit/s5 ms0%

While a muted microphone still sent silence, twelve such people cost 66% of a core each with the machine 76% busy, and sixteen could not all get into the call. Twenty were not measured. At sixteen the machine was already 70% busy, more than the browsers' own share, because every browser's sound went through its one audio engine, which on separate computers each would have to itself.

Before any of this, with the camera sized to the call alone, seven people with every camera on cost 138% of a core each with the machine 96% busy, and eight could not all get into the call.

Most of what is left is the mesh itself. Of each person's 80% in a call of seven, the page took 50%, nearly all of it WebRTC encoding, decoding and sending, and 3% the page's own script. Drawing took 17%, the network 6%, and sound and the camera 3% each. Voice alone was 20% of the whole. Capturing the camera only as big as anyone was sent it saved another 3 points, too few to be worth a softer preview of yourself.

Download is the same as upload, since everyone receives what everyone sends. Over loopback the network adds no delay or loss, so round trip and jitter show only what the load did to the call. A connection with less upload than the table says holds the picture back further by itself.

Not measured: real networks with delay and loss, calls through a TURN relay, slower laptops, the desktop app (the same Chromium engine), and screen sharing in a call this size, which goes to each viewer no taller than they draw it and at up to 1080p. To measure on your own computers, build the web client and run the script. --sizes, --seconds, --camera=off, --cameras (how many turn theirs on) and --browser=shell (Playwright's headless shell, which draws in software) change what it measures:

pnpm --filter @ownbase/web build
pnpm --filter @ownbase/server exec tsx ../../scripts/measure-calls.mts --out=calls.json

What the desktop app holds in memory#

Measured on 12 November 2026 with scripts/measure-memory.mts, on the same machine: the built desktop app, joined to a workspace with 600 messages and eight large pictures in one channel, then in a huddle of four. The figure is the private working set of all the app's processes together, which is what Task Manager shows as Memory.

StageMemory
Welcome screen118 MiB
Workspace, just opened158 MiB
Workspace, after reading back a long channel203 MiB
Huddle of four, sound only237 MiB
Huddle of four, every camera on268 MiB
Huddle of four, cameras off again254 MiB
After leaving228 MiB

Before the four changes below, the same run read 232 MiB after reading back the channel, 281 MiB with sound only, 337 MiB once the cameras were off again, and 286 MiB after leaving. Each was found with that script:

  • A camera or share that sends someone nothing is set to an eighth of its size as well as stopped. The browser keeps a video encoder for every other person for the rest of the call once a picture has gone to them, holding working pictures at whatever size the sender is set to: 12 MiB each at 640 by 360 and 28 MiB each at 960 by 540, with the camera off.
  • The conversation's messages are drawn again only for a change to them. A call starting or a dialog opening used to draw all of them again, and the second copy of each that this leaves cost 14 MiB for a full history.
  • Pictures no longer on screen stay held up to 8 MiB, not 32. They are held in the app's main process, which is where the rest went.
  • A message's toolbar is made only while the pointer is on the message or focus is in it. Its nine buttons and six icons were two thirds of every row, for all 300 of a long conversation: 22 MiB.

Most of what is left is not the conversation's. In a call with every camera on, the app's main process, the graphics process and the sound, camera and network services hold about 133 MiB between them before the page holds anything, and the page holds 52 MiB with a workspace just opened.

To measure a build of your own, on Windows:

pnpm --filter @ownbase/web build
pnpm --filter @ownbase/desktop build
pnpm --filter @ownbase/server exec tsx ../../scripts/measure-memory.mts --out=memory.json

This page is made from docs/DEPLOYMENT.md.