1. System Requirements
Supported Platforms
- Operating System: Linux (Ubuntu, Debian, CentOS, RHEL, Rocky Linux, AlmaLinux, Fedora, etc.) with the
systemdinit system. - CPU Architecture:
amd64(x86_64) - standard cloud and dedicated servers (Intel / AMD).arm64(aarch64) - ARM-based servers.- Utilities:
curlinstalled for downloading the installation script and binary.
Security Model and Permissions
The privileges required during installation and the privileges under which the server itself runs are strictly separated:
- During installation (
| sudo bash): Superuser privileges (root/sudo) are required only once when running the installation script to tune Linux kernel network buffers (sysctl), open ports in the system firewall (UFW/firewalld), and register thesystemdservice. - At runtime: The
slyber_turnbinary itself does not run asroot. The installer automatically creates an isolated, unprivileged system userslyber_turnwithout a home directory (--no-create-home) and without interactive shell login access (/usr/sbin/nologin). - Process hardening in
systemd: - The service starts with the
NoNewPrivileges=truedirective, blocking any privilege escalation by the process. - The process is granted only a single targeted Linux kernel capability -
AmbientCapabilities=CAP_NET_BIND_SERVICE. This allowsslyber_turn, while remaining an unprivileged user, to bind to ports below1024if needed (for example, port443forTLS_PORTto bypass strict corporate firewalls).
2. Required Network Ports
For proper TURN server operation, the following ports must be open on the host (as well as in your cloud provider's external firewall panel: AWS Security Groups, Hetzner Cloud Firewall, GCP Firewall, DigitalOcean Firewalls):
| Port / Range | Protocol | Purpose | Internet Access |
3478 | UDP and TCP | Primary control port for STUN and TURN requests. | Required (0.0.0.0/0) |
5349 (or 443) | TCP | Port for encrypted TURN-over-TLS (turns:) connections. | Required when using TLS (0.0.0.0/0) |
49152–65535 | UDP | Relay port pool (Relay Port Pool) used to relay audio and video streams between call participants. | Required (0.0.0.0/0) |
8080 | TCP | Built-in HTTP API server (issuing temporary tokens via /api/turn-credentials, metrics via /metrics, and statistics). | Recommended to restrict to your backend IP address, place behind Nginx, or enable REQUIRE_SECRET=true. |
3. Automated One-Command Installation
To install the latest stable version of Slyber Turn Server, run the following command on your server. This command will download install.sh script and execute it on your device:
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-turn-server/main/install.sh | sudo bash
What the Installer Does Step by Step:
- Platform Detection: Checks the OS and CPU architecture (
amd64orarm64), selecting the correspondingslyber_turn-linux-<arch>binary. - Download and SHA256 Cryptographic Verification: Downloads the binary from the
slyber-app/slyber-turn-serverrepository releases (or from the fallbackmain/binbranch) into a temporary directory and verifies its checksum against theSHA256SUMSfile. - System Time Synchronization (NTP): Enables the network time service (
timedatectl set-ntp true). Because temporary TURN passwords embed an expiration Unix timestamp (timestamp:user_id), synchronized server clocks are mandatory. - Linux Kernel Network Stack Tuning (
sysctl): Sets the maximum kernel socket read and write buffer sizes to 8 MB (net.core.rmem_max=8388608andnet.core.wmem_max=8388608) and saves them to/etc/sysctl.d/99-slyber-turn.conf. This prevents UDP packet drops under heavy load. - Creating the
slyber_turnSystem User: Creates an isolatedslyber_turnuser account under which the service will run. - Installing Files and Generating
.env: - Installs the binary to
/opt/slyber_turn/slyber_turnand creates a global symlink at/usr/local/bin/slyber_turn. - Creates the
/opt/slyber_turn/certsdirectory for storing SSL/TLS certificates. - If
/opt/slyber_turn/.envdoes not exist yet, generates a random 32-character cryptographically secureTURN_SECRETkey via/dev/urandomand creates the initial configuration file. - Sets
chmod 750permissions on the/opt/slyber_turndirectory,chmod 600on.env, and assigns ownership toslyber_turn:slyber_turn. - Automatic Firewall Configuration (
UFW/firewalld): IfUFWorfirewalldis active on the system, the script automatically opens ports3478/udp,3478/tcp,5349/tcp, and the range49152:65535/udp. - Starting the
systemdService and Self-Diagnostics: Registers and starts theslyber_turn.serviceunit with an open file descriptor limit ofLimitNOFILE=1048576, then automatically runs theslyber_turn doctorcheck and prints the generatedTURN_SECRETto the console.
4. Installation with Custom Parameters
If you want to specify your domain (REALM), custom secret key, ports, or per-session bandwidth limit right during the initial installation (for example, in Ansible automation scripts, Terraform cloud-init, or CI/CD pipelines), pass the environment variables before bash:
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-turn-server/main/install.sh | sudo \
REALM="turn.yourdomain.com" \
PUBLIC_IP="auto" \
TURN_SECRET="my-custom-production-secret-key-2026" \
UDP_PORT=3478 \
TCP_PORT=3478 \
TLS_PORT=5349 \
HTTP_PORT="127.0.0.1:8080" \
MAX_KBPS_PER_SESSION=3000 \
VERSION="latest" \
bash
Supported Installer Variables:
VERSION- release version to download (defaults tolatest).TURN_SECRET- custom secret key (minimum 16 characters; auto-generated if omitted).REALM- server domain realm (defaults toturn.local).PUBLIC_IP- external IPv4 address of the server orautofor automatic STUN detection (defaults toauto).UDP_PORT,TCP_PORT,TLS_PORT- STUN/TURN ports (default to3478,3478,5349).HTTP_PORT- HTTP API address and port (defaults to:8080; specify127.0.0.1:8080if the API should only be accessible locally).MAX_KBPS_PER_SESSION- per-session bandwidth limit in Kbps (defaults to0- unlimited).
5. File System Layout
Once installation is complete, all server files are located at the following paths:
| Path | Description | Permissions |
/opt/slyber_turn/ | Server working directory (WorkingDirectory and DATA_DIR). | 0750 (slyber_turn:slyber_turn) |
/opt/slyber_turn/slyber_turn | Main executable server binary. | 0755 (slyber_turn:slyber_turn) |
/usr/local/bin/slyber_turn | Symbolic link to the binary for global CLI execution. | Symlink |
/opt/slyber_turn/.env | Main configuration file containing secrets and settings. | 0600 (slyber_turn:slyber_turn) |
/opt/slyber_turn/certs/ | Directory for storing SSL/TLS certificates (fullchain.pem, privkey.pem). | 0755 (slyber_turn:slyber_turn) |
/opt/slyber_turn/stats.json | Automatically persisted node statistics and 24-hour history. | 0600 (slyber_turn:slyber_turn) |
/opt/slyber_turn/events.jsonl | Audit log of events and blocked attacks. | 0600 (slyber_turn:slyber_turn) |
/etc/systemd/system/slyber_turn.service | systemd system service configuration. | 0644 (root:root) |
/etc/sysctl.d/99-slyber-turn.conf | Linux kernel network buffer settings (8 MB). | 0644 (root:root) |
Important when configuring custom TLS certificates:
If you copy Let's Encrypt certificates from/etc/letsencrypt/live/...into/opt/slyber_turn/certs/, make sure theslyber_turnuser has read permissions for them:
sudo chown -R slyber_turn:slyber_turn /opt/slyber_turn/certs
sudo chmod 600 /opt/slyber_turn/certs/*
6. Server Management, Verification, and Updates
Managing the systemd Service:
# Check server status
sudo systemctl status slyber_turn
# Restart the server after editing /opt/slyber_turn/.env
sudo systemctl restart slyber_turn
# Stop the server
sudo systemctl stop slyber_turn
# View server logs in real time
sudo journalctl -u slyber_turn -f
Quick Post-Installation Check:
Run the built-in diagnostics to verify that the external IP was detected properly and the TURN server is successfully allocating relay ports:
sudo slyber_turn doctor
Run a 5-second performance benchmark with 20 virtual clients:
sudo slyber_turn bench -clients 20 -duration 5s
Updating to a New Version:
To update Slyber Turn Server to the latest version, run the exact same installation command:
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-turn-server/main/install.sh | sudo bash
The installer will detect the existing /opt/slyber_turn/.env file, fully preserve your configuration and accumulated telemetry, update the binary, and restart the service.
7. Uninstalling the Server
Uninstallation is also performed directly with a single command and supports two modes:
1. Standard Uninstall (preserving .env and statistics)
Stops and removes the systemd service and binaries, but retains the /opt/slyber_turn directory containing your settings and traffic history in case of a future reinstallation:
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-turn-server/main/uninstall.sh | sudo bash
2. Complete Purge
Completely removes the service, binaries, the /opt/slyber_turn directory with all configurations and telemetry, as well as the slyber_turn system user:
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-turn-server/main/uninstall.sh | sudo PURGE_DATA=true bash