Comment 1 for bug 1666456

Revision history for this message
Danilo Bargen (gwrtheyrn) wrote :

Here is an example file that seems to work fine:

```
[Unit]
Description=coturn
Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1)
After=syslog.target network.target

[Service]
Type=forking
User=turnserver
Group=turnserver
RuntimeDirectory=turnserver
RuntimeDirectoryMode=0750
EnvironmentFile=/etc/default/coturn
PIDFile=/run/turnserver/turnserver.pid
ExecStart=/usr/bin/turnserver --daemon --pidfile /run/turnserver/turnserver.pid --syslog -c /etc/turnserver.conf $EXTRA_OPTIONS
Restart=on-abort
LimitCORE=infinity
LimitNOFILE=1000000
LimitNPROC=60000
LimitRTPRIO=infinity
LimitRTTIME=7000000
CPUSchedulingPolicy=other
UMask=0007

[Install]
WantedBy=multi-user.target
```

To enable verbose logging, /etc/default/coturn should contain `EXTRA_OPTIONS=-v`.

To bind to port 443, the /usr/bin/turnserver binary needs the CAP_NET_BIND_SERVICE capability (`setcap /usr/bin/turnserver cap_net_bind_service=+ep`).