TURN(1)

πŸ“¦
version 4.18.0 Β· 4 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu stonking

πŸ’– GENERAL INFORMATION πŸ’–

okay so bestie, turnadmin is a TURN administration tool ✨ and she's here to manage all the user accounts β€” adding users, removing users, and generating TURN keys for them, the whole glow-up 🫢

but listen, for security reasons we do NOT recommend storing passwords openly 😭 like please don't do that. the better option is to use pre-processed "keys" which are then used for authentication, and those keys? generated by turnadmin herself πŸ’…

also lowkey important: turnadmin is a link to the turnserver binary, but turnadmin performs different functions. same girl, different era 🌈


πŸŽ€ Options note πŸŽ€

turnadmin has long and short option names, for most options. Some options have only long form, some options have only short form. Their syntax is somewhat different, if an argument is required:

The short form must be used as this (for example):

$ turnadmin -u <username> ...

The long form equivalent must use the = character:

$ turnadmin --user=<username> ...

If this is a flag option (no argument required) then their usage is the same, for example:

$ turnadmin -k ...

is equivalent to:

$ turnadmin --key ...
You have always to use the -r <realm> option with commands for long term credentials β€” because data for multiple realms can be stored in the same database. no skipping the realm bestie, she will know 🫣

✨ NAME ✨

turnadmin β€” a TURN relay administration tool πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

$ turnadmin [command] [options]
$ turnadmin [ -h | --help]

🌸 DESCRIPTION 🌸

Commands:

  • -P, --generate-encrypted-password β€” Generate and print to the standard output an encrypted form of a password (for web admin user or CLI) πŸ” The value then can be used as a safe key for the password storage on disk or in the database. Every invocation for the same password produces a different result (yes, every single time, that's the point πŸ’«). The format of the encrypted password is: $5$<...salt...>$<...sha256(salt+password)...>. Salt is 16 characters, the sha256 output is 64 characters. Character 5 is the algorithm id (sha256). Only sha256 is supported as the hash function.
  • -k, --key β€” Generate key for a long-term credentials mechanism user πŸ”‘
  • -a, --add β€” Add or update a long-term user βž•
  • -A, --add-admin β€” Add or update an admin user πŸ‘‘
  • -d, --delete β€” Delete a long-term user πŸ—‘οΈ
  • -D, --delete-admin β€” Delete an admin user πŸ’€
  • -l, --list β€” List long-term users in the database πŸ“‹
  • -L, --list-admin β€” List admin users in the database πŸ“‹βœ¨
  • -s, --set-secret=<value> β€” Add shared secret for TURN REST API 🀫
  • -S, --show-secret β€” Show stored shared secrets for TURN REST API πŸ‘€
  • -X, --delete-secret=<value> β€” Delete a shared secret.
  • --delete-all_secrets β€” Delete all shared secrets for REST API.
  • -O, --add-origin β€” Add origin-to-realm relation πŸ”—
  • -R, --del-origin β€” Delete origin-to-realm relation βœ‚οΈ
  • -I, --list-origins β€” List origin-to-realm relations πŸ“œ
  • -g, --set-realm-option β€” Set realm params: max-bps, total-quota, user-quota βš™οΈ
  • -G, --list-realm-options β€” List realm params πŸ“Š
  • -E, --generate-encrypted-password-aes β€” Generate and print to the standard output an encrypted form of password with AES-128 πŸ”’

Options with required values:

  • -b, --db, --userdb β€” SQLite user database file name (default - /var/db/turndb or /usr/local/var/db/turndb or /var/lib/turn/turndb). See the same option in the turnserver section. πŸ—„οΈ
  • -e, --psql-userdb β€” PostgreSQL user database connection string. See the --psql-userdb option in the turnserver section. 🐘
  • -M, --mysql-userdb β€” MySQL user database connection string. See the --mysql-userdb option in the turnserver section. 🐬
  • -J, --mongo-userdb β€” MongoDB user database connection string. See the --mysql-mongo option in the turnserver section. πŸƒ
  • -N, --redis-userdb β€” Redis user database connection string. See the --redis-userdb option in the turnserver section. 🧱
  • -u, --user β€” User name. πŸ™‹
  • -r, --realm β€” Realm. 🌐
  • -p, --password β€” Password. 🀐
  • -x, --key-path β€” Generates a 128 bit key into the given path. πŸ—οΈ
  • -f, --file-key-path β€” Contains a 128 bit key in the given path. πŸ“
  • -v, --verify β€” Verify a given base64 encrypted type password. βœ…
  • -o, --origin β€” Origin. 🧭
  • --max-bps β€” Set value of realm's max-bps parameter. πŸš€
  • --total-quota β€” Set value of realm's total-quota parameter. πŸ“ˆ
  • --user-quota β€” Set value of realm's user-quota parameter. πŸ“‰ (ok it's a quota, don't come for me)
  • -h, --help β€” Help. πŸ†˜

🌈 Command examples: 🌈

Generate an encrypted form of a password:

$ turnadmin -P -p <password>

Generate a key:

$ turnadmin -k -u <username> -r <realm> -p <password>

Add/update a user in the in the database:

$ turnadmin -a [-b <userdb-file> | -e <db-connection-string> | -M
<db-connection-string> | -N <db-connection-string> ] -u
<username> -r <realm> -p <password>

Delete a user from the database:

$ turnadmin -d [-b <userdb-file> | -e <db-connection-string> | -M
<db-connection-string> | -N <db-connection-string> ] -u
<username> -r <realm>

List all long-term users in MySQL database:

$ turnadmin -l --mysql-userdb="<db-connection-string>" -r <realm>

List all admin users in Redis database:

$ turnadmin -L --redis-userdb="<db-connection-string>"

Set secret in MySQL database:

$ turnadmin -s <secret> --mysql-userdb="<db-connection-string>"
-r <realm>

Show secret stored in PostgreSQL database:

$ turnadmin -S --psql-userdb="<db-connection-string>" -r <realm>

Set origin-to-realm relation in MySQL database:

$ turnadmin --mysql-userdb="<db-connection-string>" -r <realm> -o
<origin>

Delete origin-to-realm relation from Redis DB:

$ turnadmin --redis-userdb="<db-connection-string>" -o <origin>

List all origin-to-realm relations in Redis DB:

$ turnadmin --redis-userdb="<db-connection-string>" -I

List the origin-to-realm relations in PostgreSQL DB for a single realm:

$ turnadmin --psql-userdb="<db-connection-string>" -I -r <realm>

Create new key file for mysql password encryption:

$ turnadmin -E --key-path <key-file>

Create encrypted mysql password:

$ turnadmin -E --file-key-path <key-file> -p <secret>

Verify/decrypt encrypted password:

$ turnadmin --file-key-path <key-file> -v <encrypted>

Help:

$ turnadmin -h

πŸ’… DOCS πŸ’…

After installation, run the command:

$ man turnadmin

or in the project root directory:

$ man -M man turnadmin

to see the man page πŸ“–βœ¨


πŸŽ€ FILES πŸŽ€

  • /etc/turnserver.conf
  • /var/db/turndb
  • /usr/local/var/db/turndb
  • /var/lib/turn/turndb
  • /usr/local/etc/turnserver.conf

🧚 DIRECTORIES 🧚

  • /usr/local/share/turnserver
  • /usr/local/share/doc/turnserver
  • /usr/local/share/examples/turnserver

πŸ‘€ SEE ALSO πŸ‘€

turnserver, turnutils 🫢


🌐 WEB RESOURCES 🌐

project page:

https://github.com/coturn/coturn/

Wiki page:

https://github.com/coturn/coturn/wiki

forum:

https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/


πŸ’œ AUTHORS πŸ’œ

See the AUTHORS.md file in the coturn source distribution.


and that's the whole vibe bestie 🫢 this was TURN(1), and she's dated 17 May 2026 β€” so if you're reading this, hi from that exact day, ily, go generate some keys πŸ’–βœ¨πŸŽ€