Stun-Turn-Server

Stun-Turn-Server

Docker app from ich777's Repository

Overview

This is a Basic STUN & TURN server that was mainly created for Nextcloud Talk. It is fully automated and will create all the necessary files and passwords so that the server can sucessfully start and run. Please read all the discriptions from the Variables carefully and also look at the 'Show more settings' tab. ATTENTION: Please ignore the socket errors after the server startup if you don't have IPv6 enabled on your server.

Runtime arguments

Network
bridge
Shell
bash
Privileged
false
Extra Params
--restart=unless-stopped

Template configuration

Container PathPathrw

Container Path: /stun-turn

Target
/stun-turn
Value
/mnt/cache/appdata/stun-turn-server
TCP PortPorttcp

TCP Port

Target
5349
Value
5349
UDP PortsPortudp

UDP Port

Target
5349
Value
5349
Port VariableVariable

If you change this variable you have to create two new port forwardings with the corresponding ports one for TCP and one for UDP.

Target
PORT
Value
5349
Static SecretVariable

Create your own secret and enter it here or leave empty and the server creats a secret that is stored into 'secret.txt' in the main directory of the container (generate it for example in a linux terminal with the command 'openssl rand -hex 32' without quotes).

Target
SECRET
RealmVariable

Your hostname (eg: 'example.org' without quotes).

Target
REALM
Certificate File NameVariable

Name of the certification file (leave empty if the server should create one or replace it with your own).

Target
CERT_FILE
Value
cert.pem
Private Key File NameVariable

Name of the private key file (leave empty if the server should create one or replace it with your own).

Target
PRIVKEY_FILE
Value
privkey.pem
Diffie-Hellman Key File NameVariable

Name of the Diffie–Hellman key file (leave empty if the server should create one or replace it with your own - also plase look under the 'Show more settings' tab if you want to generate a bigger or smaller key default is: 2048).

Target
DH_FILE
Value
dhparam.pem
Display Secrets in logVariable

Display your secrets in the log (set to 'true' or leave empty to disable it).

Target
DISPLAY_SECRETS
Value
true
Certificate Generation - CountryVariable

Country code for your certificate if the server should create one (two letters eg: 'US' without quotes - also plase look under the 'Show more settings' tab there are more settings for generating your certificate).

Target
CA_COUNTRY
Extra Startup ParametersVariable

Here you can enter your Extra Startup Parameters if needed (you can get a full list of commands from here: https://github.com/coturn/coturn/wiki/turnserver)

Target
EXTRA_PARAMS
Total QuotaVariable

Total allocations quota: global limit on concurrent allocations (only change if you know what you are doing).

Target
TOTAL_QUOTA
Value
100
Maximum bpsVariable

Max bytes-per-second bandwidth a TURN session is allowed to handle (input and output network streams are treated separately). Anything above that limit will be dropped or temporary suppressed - within the available buffer limits (only change if you know what you are doing).

Target
MAX_BPS
Value
0
Cipher ListVariable

Allowed OpenSSL cipher list for TLS/DTLS connections (only change if you know what you are doing).

Target
CIPHER_LIST
Value
ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384
Certificate Generation - Key LengthVariable

Enter your preferred key length (the higher the value the longer it takes to generate the certificate).

Target
CERT_LENGTH
Value
2048
Certificate Generation - Valid DaysVariable

Specify how long that the certificate should be valid in days.

Target
CERT_VALID_DAYS
Value
3650
Certificate Generation - State or ProvinceVariable

Specify your state or province.

Target
CA_STATE_PROV
Value
None
Certificate Generation - LocalityVariable

Specify your locality.

Target
CA_LOCALITY
Value
None
Certificate Generation - OrganizationVariable

Specify your organiszation.

Target
CA_ORGANIZATION
Value
None
Diffie–Hellman Key LengthVariable

Enter your preferred key length (the higher the value the longer it takes to generate the key).

Target
DH_LENGTH
Value
2048
Command Line PasswordVariable

Enter your CLI password or leave empty if you want that the server creates a random one (please note that you have to manually enable the console with the '--cli-port PORT' - PORT stands for your preferred port - in the Extra Startup Parameters and create the corresponding port).

Target
CLI_PASSWORD
Listening IPVariable

Specify the listening port (only change if you know what you are doing).

Target
LISTENING_IP
Value
0.0.0.0
UMASKVariable

Container Variable: 000

Value
000
UIDVariable

Container Variable: UID

Value
99
GIDVariable

Container Variable: GID

Value
100
DATA_PERMVariable

Container Variable: DATA_PERM

Value
770

Categories

Download Statistics

102,817
Total Downloads
146
This Month
143
Avg / Month

Total Downloads Over Time

Loading chart...

Details

Repository
ghcr.io/ich777/stun-turn-server
Last Updated2025-12-11
First Seen2020-03-21

Run Stun-Turn-Server on Unraid.

Stun-Turn-Server is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.