coturn-babysitter

Releases

coturn configuration rewriter and service reloader

Usage

coturn-babysitter
  -n, --domain-name domainName
  [-t, --template templateFile]
  [-c, --coturn-config coturnConfigurationFile]
  [-T, --use-temp-file]
  [-r, --reload]
  [-s, --service coturnSystemdService]
  [-d, --dry-run]
  [-v, --verbose]
coturn-babysitter -h, --help
coturn-babysitter --version

Overview

Makes coturn work with your potato internet connection whose IP addresses change all the time.

To function correctly coturn requires knowledge of the public IP addresses it can be reached at, which can be specified in coturn's configuration file. This is a problem if the internet connection uses dynamic IP addresses that can change whenever.
Coturn-babysitter exists to solve this problem.

Coturn-babysitter resolves a domain name to an IPv4 and an IPv6 address and, in memory, builds a coturn configuration based on the current coturn configuration file, a template file, and these IP addresses.

If the generated coturn configuration differs from the current one, replaces the current coturn configuration file with the generated configuration and, if desired, reloads the coturn systemd service with "systemctl try-reload-or-restart".

Template

To create the template file, you move all text lines that contain a dynamic public IPv4 or IPv6 address from the coturn configuration file to a new, separate file. Then, in this new file, you replace these IP addresses with their respective coturn-babysitter placeholders:

This usually concerns these coturn option keys:

To improve readability you may also move other text lines to the template file, such as comments or other, fixed values of these keys.

The template file's default location is "/etc/coturn-babysitter/turnserver.conf.template" and it might look like this:

# Listener IP address of relay server. Multiple listeners can be specified.
listening-ip=192.168.0.10
listening-ip=_COTURN_BABYSITTER_PUBLIC_IPV6_ADDR_

# IPv4 is behind NAT and needs a mapping to its public address.
external-ip=_COTURN_BABYSITTER_PUBLIC_IPV4_ADDR_/192.168.0.10

Generated coturn configuration

When coturn-babysitter prepares a new coturn configuration it takes the template, replaces its placeholders with the current IP addresses, and appends the result to the existing coturn configuration behind a cutoff marker:

(...The existing coturn configuration file...)


#### COTURN-BABYSITTER CUTOFF MARKER ####

# Everything below this cutoff marker will be replaced by coturn-babysitter

# Listener IP address of relay server. Multiple listeners can be specified.
listening-ip=192.168.0.10
listening-ip=2001:0db8:85a3:0000:0000:8a2e:0370:7334

# IPv4 is behind NAT and needs a mapping to its public address.
external-ip=154.87.6.204/192.168.0.10

License

GNU General Public License version 3

Packages

Browseable sources

These source files of the latest tag can be viewed in the browser:

Releases

coturn-babysitter-0.0.3

13 January 2026 (2026-01-13 20:01:03 UTC)

coturn-babysitter-0.0.3.tar.gz SHA256 checksum SHA384 checksum PGP signature

coturn-babysitter-0.0.2

27 December 2025 (2025-12-27 21:33:38 UTC)

coturn-babysitter-0.0.2.tar.gz SHA256 checksum SHA384 checksum PGP signature

coturn-babysitter-0.0.1

20 December 2025 (2025-12-20 20:19:19 UTC)

coturn-babysitter-0.0.1.tar.gz SHA256 checksum SHA384 checksum PGP signature