3
1
Fork
You've already forked coturn-chart
0
Coturn Helm Chart to provide a STUN/TURN Server on Kubernetes.
  • Go Template 100%
2026年06月24日 10:43:50 +00:00
.forgejo fix helm lint chart name 2026年06月16日 19:24:59 +02:00
charts/coturn Update to version 9.8.0 and regenerate docs. 2026年06月24日 10:43:50 +00:00
.gitignore Adds ability to run as daemonset or deployment with hostNetwork set ( #197 ) 2026年05月14日 16:00:43 +02:00
.pre-commit-config.yaml switch to official docker image; update github actions to latest version; add some docs and comments 2023年07月24日 13:59:35 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md - add helm-docs as a requirement 2023年07月29日 19:11:25 +02:00
coturn_icon.png update docs and add pvc that I forgot; also add icon for chart 2023年07月27日 11:14:20 +02:00
LICENSE Add deprecated 2023年07月26日 09:52:01 +02:00
README.md update installation instructions 2026年06月16日 09:40:56 +00:00
renovate.json clean up docs and release process 2026年06月16日 19:23:12 +02:00

Coturn Helm Chart

An unofficial coturn helm chart using the official coturn docker image.

Note

This repo is mirrored to codeberg, where you can submit Issues and Pull Requests.

Usage

TLDR

Note that you still need to fill out the charts/coturn/values.yaml (Autogenerated Docs can be found in charts/coturn/README.md).

# add the helm repo locally using the forgejo release (untested)
helm repo add codeberg.org https://codeberg.org/api/packages/open-engineering/helm
helm repo update
helm install coturn codeberg.org/coturn-chart

Basics

Coturn Realm

At very least, you'll need to configure a coturn realm which is like your hostname, and is used for authentication as well.

# most coturn config parameters that you really needcoturn:# -- hostname for the coturn server realmrealm:"turn.example.com"

Adding a user declaratively

Pass in one set of credentials (username/password) directly either plaintext, or via an existing k8s secret, like this:

# most coturn config parameters that you really needcoturn:# -- hostname for the coturn server realmrealm:"turn.example.com"auth:# -- username for the main user of the turn server; ignored if you existingSecret is not ""username:"coturn"# -- password for the main user of the turn server; ignored if you existingSecret is not ""password:"myverysecretpasswordthatimobviouslygoingtochangeright"# -- existing secret with keys username/password for coturn; if this is not "" then we will ignore coturn.auth.username/passwordexistingSecret:""secretKeys:# -- key in existing secret for turn server userusername:username# -- key in existing secret for turn server user's passwordpassword:password

Currently only one user is supported, but we'd like to support adding more than that to match what is possible in the coturn/coturn:examples/etc/turnserver.conf

Databases

Internal SQLite database

If you would like to use the built-in sqlite database, set externalDatabse.enabled and postgresql.enabled to false in your values.yaml like this:

externalDatabse:enabled:falsepostgresql:enabled:false

Bundled PostgreSQL subchart

We provide optional Bitnami Postgresql subchart to deploy an external database. You can use it like this:

externalDatabse:enabled:truepostgresql:enabled:falseglobal:postgresql:# -- global.postgresql.auth overrides postgresql.authauth:# -- username for database, ignored if existingSecret is passed inusername:"coturn"# -- password for db, autogenerated if empty & existingSecret emptypassword:"mycoolpasswordthatisplaintextforsomereason"# -- database to create, ignored if existingSecret is passed indatabase:"coturn"# -- name of existing Secret to use for postgresql credentialsexistingSecret:""# Names of the keys in existing secret to use for PostgreSQL credentials# all of these are ignored if existingSecret is emptysecretKeys:# -- key in existingSecret for database to createhostname:"hostname"# -- key in existingSecret for database to createdatabase:"database"# -- key in exsiting Secret to use for the coturn userusername:"username"# -- key in existing Secret to use for postgres admin user's passwordadminPasswordKey:"postgresPassword"# -- key in existing Secret to use for coturn user's passworduserPasswordKey:"password"

You're free to use any other values you find in the Bitnami postgresql helm values under the postgresql parameter in your values.yaml for coturn.

External PostgreSQL database

If externalDatabase.enabled is set to true, and postgresql.enabled is set to false, you can pass in credentials from an existing postgresql database, like this:

externalDatabse:enabled:true# -- Currently only postgresql is supported. mariadb/mysql coming soontype:"postgresql"# -- required if externalDatabase.enabled: true and postgresql.enabled: falsehostname:"mypostgresserver"# -- username for database, ignored if existingSecret is passed inusername:"coturn"# -- password for database, ignored if existingSecret is passed inpassword:"coolpasswordfordogs"# -- database to create, ignored if existingSecret is passed indatabase:"coturn"# -- name of existing Secret to use for postgresql credentialsexistingSecret:""# Names of the keys in existing secret to use for PostgreSQL credentialssecretKeys:# -- key in existing Secret to use for the db userusername:""# -- key in existing Secret to use for db user's passwordpassword:""# -- key in existing Secret to use for the database namedatabase:""# -- key in existing Secret to use for the db's hostnamehostname:""postgresql:enabled:false

Bundled MySQL subchart

We provide optional Bitnami MySQL subchart to deploy an external database. You can use it like this:

mysql:enabled:trueauth:# -- username for database, ignored if existingSecret is passed inusername:"coturn"# -- password for db, autogenerated if empty & existingSecret emptypassword:"mycoolpasswordthatisplaintextforsomereason"# -- database to create, ignored if existingSecret is passed indatabase:"coturn"# -- Use existing secret for password details.# The secret has to contain the keys mysql-root-password, mysql-replication-password and mysql-passwordexistingSecret:""# Names of the keys in existing secret to use for MySQL credentialssecretKeys:# -- key in exsiting Secret to use for the coturn userusername:"username"# -- key in existing Secret to use for coturn user's passwordpassword:"password"

You're free to use any other values you find in the Bitnami mysql helm values under the mysql parameter in your values.yaml for coturn.

External MySQL database

If externalDatabase.enabled is set to true, and mysql.enabled is set to false, you can pass in credentials from an existing mysql database, like this:

externalDatabse:enabled:true# -- Currently postgresql and mysql are supported.type:"mysql"# -- required if externalDatabase.enabled: true and mysql.enabled: falsehostname:"mysqlserver"# -- username for database, ignored if existingSecret is passed inusername:"coturn"# -- password for database, ignored if existingSecret is passed inpassword:"coolpasswordfordogs"# -- database to create, ignored if existingSecret is passed indatabase:"coturn"# -- name of existing Secret to use for mysql credentialsexistingSecret:""# Names of the keys in existing secret to use for MySQL credentialssecretKeys:# -- key in existing Secret to use for the db userusername:""# -- key in existing Secret to use for db user's passwordpassword:""# -- key in existing Secret to use for the database namedatabase:""# -- key in existing Secret to use for the db's hostnamehostname:""mysql:enabled:false

Testing

Source: Tutorial for turnutils_uclient and Coturn server

  1. Install coturn:

    brew install coturn
    
  2. Test the connection to the server. This is an example for LoadBalancer type services:

    turnutils_uclient -u $COTURN_USER \
     -w $COTURN_PASSWORD \
     -L $CLIENT_IP \
     -y $SERVER_UDP_IP
    

    A Successful test looks like this:

    0: (18446744073709551615): INFO: Total connect time is 0
    1: (18446744073709551615): INFO: start_mclient: msz=4, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
    2: (18446744073709551615): INFO: start_mclient: msz=4, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
    3: (18446744073709551615): INFO: start_mclient: msz=4, tot_send_msgs=10, tot_recv_msgs=10, tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000
    4: (18446744073709551615): INFO: start_mclient: msz=1, tot_send_msgs=20, tot_recv_msgs=20, tot_send_bytes ~ 2000, tot_recv_bytes ~ 2000
    4: (18446744073709551615): INFO: start_mclient: tot_send_msgs=20, tot_recv_msgs=20
    4: (18446744073709551615): INFO: start_mclient: tot_send_bytes ~ 2000, tot_recv_bytes ~ 2000
    4: (18446744073709551615): INFO: Total transmit time is 4
    4: (18446744073709551615): INFO: Total lost packets 0 (0.000000%), total send dropped 0 (0.000000%)
    4: (18446744073709551615): INFO: Average round trip delay 5.500000 ms; min = 4 ms, max = 13 ms
    4: (18446744073709551615): INFO: Average jitter 1.700000 ms; min = 0 ms, max = 9 ms
    

Status and Contributing

This is actively maintained by both live developers and [renovateBot] via a scheduled Forgejo Action. If you'd like to contribute, please read the CONTRIBUTING.md feel free to open a PR :) If you'd like a feature or want to report a bug, please do that in the Codeberg Issues. If you know coturn and k8s well enough, please also feel free to scan the issues and help others <3 We recently moved the repo from jessebot's account to the small-hack org where we maintain all our helm charts.

Thanks

This is a fork of the, now deprecated, iits-consulting/coturn chart. Thanks to them for getting this started.