Make a Website

How to Make a Voice and Video Calling Website with NextCloud

Run your own Zoom with NextCloud Talk. Why two-person calls work instantly but group calls need a second server, how to set up TURN, and what it costs.

A NextCloud Talk video call running in a browser

You can run your own Zoom. NextCloud Talk gives you voice calls, video calls, screen sharing and chat on your own server, with no time limits and no per-user fees.

There is one thing you must understand before you start, because it explains almost every problem people hit: two-person calls and group calls work in completely different ways. One is easy. The other needs a second server.

The difference that explains everything

Two peopleThree or more
How it worksBrowsers connect directly to each otherEverything routes through your server
Your server doesIntroduces them, then steps asideReceives and forwards every video stream
NeedsNextCloud + TURNNextCloud + TURN + a signalling server
Server loadAlmost noneHeavy
Setup effortAn hourMost of a day

With the built-in signalling, NextCloud Talk handles about four people before quality collapses. Everyone sends their video to everyone else, so four people means twelve streams. Beyond that you need a proper back end.

Start with the simple setup. If two-person calls are all you need — support calls, consultations, tutoring — you are finished in an hour.

What you need

  • NextCloud already installed. If not, start with how to install NextCloud on Ubuntu with Apache2.
  • A domain with a valid SSL certificate. Not optional — browsers refuse camera and microphone access on plain HTTP, and calls will fail silently with no useful error.
  • A VPS with a public IP. 2 GB RAM for small calls, 4 GB or more for groups.
  • Ports open — 3478 and 5349 for TURN, plus a UDP range for media.

Step 1: Install NextCloud Talk

In NextCloud, open Apps, find Talk and enable it. A chat icon appears in the top bar.

Test straight away: open a conversation and start a call in two different browsers. On the same network it will probably work. That is not proof it works — the real test comes after TURN.

Step 2: Install a TURN server

This is the step people skip, and then spend days wondering why calls ring and never connect.

Why TURN is needed

Most people are behind a home router or a mobile network that hides their real address. Two such browsers cannot find each other directly. A TURN server sits in the middle with a public address and relays the call.

Without TURN, calls work on your office Wi-Fi and fail for real users. That is exactly why it seems to work while you are testing.

Install coturn

sudo apt-get update
sudo apt-get install coturn

Enable the service:

sudo sed -i '/TURNSERVER_ENABLED/c\TURNSERVER_ENABLED=1' /etc/default/coturn

Generate a secret you will need twice — once here, once in NextCloud:

openssl rand -hex 32

Open the config:

sudo nano /etc/turnserver.conf

Put this in, replacing the IP, domain and secret with your own:

listening-port=3478
tls-listening-port=5349
listening-ip=YOUR.SERVER.IP
relay-ip=YOUR.SERVER.IP

fingerprint
use-auth-secret
static-auth-secret=YOUR_GENERATED_SECRET
realm=yourdomain.com

total-quota=100
stale-nonce

cert=/etc/letsencrypt/live/yourdomain.com/fullchain.pem
pkey=/etc/letsencrypt/live/yourdomain.com/privkey.pem

no-loopback-peers
no-multicast-peers
no-cli

Save and restart:

sudo systemctl restart coturn
sudo systemctl enable coturn

The relay-ip must be your public IP, not something like 10.0.0.5. Getting this wrong is the most common reason calls still fail after installing TURN.

Open the firewall

sudo ufw allow 3478
sudo ufw allow 5349
sudo ufw allow 49152:65535/udp

Tell NextCloud about it

Go to Administration settings → Talk. Under STUN and TURN servers add:

  • Server: yourdomain.com:3478
  • Secret: the string you generated
  • Protocols: UDP and TCP

Press the test button. A green tick means TURN is reachable. Do not continue until you see it.

Step 3: Test properly

The only test that counts: two devices on different networks. One on Wi-Fi, one on mobile data with Wi-Fi switched off.

Calls between two devices on the same Wi-Fi almost always work, with or without TURN. That test tells you nothing.

Step 4: Group calls (only if you need them)

For more than about four people, install the High Performance Back End — a signalling server plus an SFU, which receives every participant's video once and forwards it, instead of everyone sending to everyone.

It has three parts: the signalling server, Janus as the media server, and NATS for messaging between them. NextCloud publishes a Docker setup that installs all three together, which is far easier than assembling them by hand.

Plan on most of a day, and a server with at least 4 GB of RAM. Group video is genuinely demanding: ten people in a call can saturate a small VPS on its own.

What it costs

SetupServerCostHandles
NextCloud + TURN2 GB VPS$10–12 / monthTwo-person calls, unlimited
Plus high performance back end4–8 GB VPS$25–50 / monthGroup calls, 10–30 people

Compare with Zoom at roughly $15 per host per month. With five hosts, self-hosting pays for itself immediately — and there is no 40-minute limit.

Common problems

Calls ring, then nothing happens

TURN is missing or misconfigured. Check relay-ip is the public IP, confirm coturn is running with sudo systemctl status coturn, and use the test button in NextCloud Talk settings.

Camera and microphone never activate

The site is not on HTTPS, or the certificate is invalid. Browsers block media access on insecure origins and often give no visible error.

Calls work on Wi-Fi but not on mobile data

Classic TURN problem. Mobile networks use carrier-grade NAT, so a direct connection is impossible and the relay must work. Confirm UDP 3478 is genuinely reachable from outside.

Group calls freeze with four or more people

You are still on the built-in signalling, which does not scale. Install the High Performance Back End.

Echo or robotic audio

Usually one participant without headphones, feeding speaker output back into the microphone. If everyone sounds bad, the server is short of CPU.

Screen sharing is blank

A browser permission issue rather than a server one. On macOS the browser needs screen recording permission in System Settings.

Where to go next

NextCloud Talk also does text chat, file sharing inside conversations and a browser-based lobby for guests, so people can join a call without an account.

If you want calls inside a mobile app rather than a browser, how to create a chat app in Android Studio uses the same TURN setup with an XMPP server behind it.

And if files are really what you need, the file sharing guide covers the storage side of NextCloud.

Questions people ask

Why do my NextCloud Talk calls ring but never connect?
Almost always a missing or misconfigured TURN server. Install coturn, make sure relay-ip is your public IP and not a local address, open UDP ports 3478 and 5349, and use the test button in NextCloud Talk settings until it shows green.
How many people can join a NextCloud Talk call?
About four with the built-in signalling, because every participant sends video to every other participant. For larger calls you need the High Performance Back End, which handles ten to thirty people on a 4 to 8 GB server.
Do I need HTTPS for video calls?
Yes, always. Browsers block camera and microphone access on plain HTTP and usually show no useful error, so the call simply fails. A free Let's Encrypt certificate is enough.
What is a TURN server and why do I need one?
Most people are behind a router or mobile network that hides their real address, so two browsers cannot connect directly. A TURN server has a public address and relays the call between them. Without it, calls work on your own network and fail for real users.
Why do calls work on Wi-Fi but fail on mobile data?
Mobile networks use carrier-grade NAT, which makes a direct connection impossible, so the call depends entirely on TURN. Check that UDP port 3478 is genuinely reachable from outside and that relay-ip is the public IP.
How much does it cost to run your own video calling site?
About $10 to $12 a month for a 2 GB VPS handling two-person calls, or $25 to $50 for a 4 to 8 GB server running the High Performance Back End for group calls. Compared with roughly $15 per host per month for Zoom, it pays for itself at about five hosts.
Is NextCloud Talk a good replacement for Zoom?
For small teams, yes — there is no time limit, no per-user fee and no third party holding the recordings. For large webinars it is weaker, because scaling group video needs real server capacity and tuning.
Can people join a call without an account?
Yes. Share a conversation link and enable guest access. They join in the browser with just a name. Set a password on the conversation if it is not meant to be public.
Why is the audio echoing?
Usually one participant without headphones, so their speaker output goes back into their microphone. If everybody sounds distorted rather than echoing, the server is short of CPU.
What ports need to be open for NextCloud Talk?
TCP and UDP 3478 and 5349 for TURN, and a UDP range for the media itself, commonly 49152 to 65535. Open them in the firewall and also in the provider control panel if it has its own.

Written by Habib Baloch

I build Android apps, websites and Ubuntu servers, and write down exactly how I did it.

Ask me about this guide →