Sign inSign up

ich777/stun-turn-server

By ich777

•Updated 10 months ago

Image
5

100K+

ich777/stun-turn-server repository overview

⁠STUN-TURN in Docker optimized for Unraid

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.

⁠Env params

NameValueExample
DATA_DIRFolder for configfiles and the application/stun-turn
PORTIf you change this variable you have to create two new port forwardings with the corresponding ports one for TCP and one for UDP.5349
SECRETCreate 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).YOURSECRET
REALMYour hostname (eg: 'example.org' without quotes).yourdomain.org
CERT_FILEName of the certification file (leave empty if the server should create one or replace it with your own).empty
PRIVKEY_FILEName of the private key file (leave empty if the server should create one or replace it with your own).empty
DH_FILEName 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).empty
DISPLAY_SECRETSDisplay your secrets in the log (set to 'true' or leave empty to disable it).true
CA_COUNTRYCountry 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).US
EXTRA_PARAMSHere 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⁠)empty
TOTAL_QUOTATotal allocations quota: global limit on concurrent allocations (only change if you know what you are doing).100
MAX_BPSMax 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).0
CIPHER_LISTAllowed OpenSSL cipher list for TLS/DTLS connections (only change if you know what you are doing).ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384
CERT_LENGTHEnter your preferred key length (the higher the value the longer it takes to generate the certificate).2048
CERT_VALID_DAYSSpecify how long that the certificate should be valid in days.3650
CA_STATE_PROVSpecify your state or province.YOURPROV
CA_LOCALITYSpecify your locality.YOURLOC
CA_ORGANIZATIONSpecify your organiszation.YOURORG
DH_LENGTHUser Identifier2048
CLI_PASSWORDEnter 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).empty
LISTENING_IPSpecify the listening port (only change if you know what you are doing).0.0.0.0
UIDUser Identifier99
GIDGroup Identifier100
UMASKUmask value for new created files0000
DATA_PERMSData permissions for config folder770

⁠Run example

docker run --name Stun-Turn-Server -d \
	-p 5349:5349 -p 5349:5349/udp \
	--env 'PORT=5349' \
	--env 'SECRET=YOURSECRET' \
	--env 'REALM=yourdomain.org' \
	--env 'CERT_FILE=' \
	--env 'PRIVKEY_FILE=' \
	--env 'DH_FILE=' \
	--env 'DISPLAY_SECRETS=true' \
	--env 'CA_COUNTRY=US' \
	--env 'TOTAL_QUOTA=100' \
	--env 'MAX_BPS=0' \
	--env 'CIPHER_LIST=ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384' \
	--env 'CERT_LENGTH=2048' \
	--env 'CERT_VALID_DAYS=3650' \
	--env 'CA_STATE_PROV=YOURPROV' \
	--env 'CA_LOCALITY=YOURLOC' \
	--env 'CA_ORGANIZATION=YOURORG' \
	--env 'DH_LENGTH=2048' \
	--env 'CLI_PASSWORD=' \
	--env 'LISTENING_IP=0.0.0.0' \
	--env 'UID=99' \
	--env 'GID=100' \
	--env 'UMASK=0000' \
	--env 'DATA_PERMS=770' \
	--volume /path/to/stun-turn:/stun-turn \
	ich777/stun-turn-server

This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!

⁠Support Thread: https://forums.unraid.net/topic/83786-support-ich777-application-dockers/⁠

Tag summary

Content type

Image

Digest

sha256:c931e6da4…

Size

41.4 MB

Last updated

10 months ago

docker pull ich777/stun-turn-server