- Create a turnserver.service file
Create a configuration file and copy the following content into the configuration file
[Unit]
Description=turnserver for webrtc
After=network.target
[Service]
Type=forking
User=tester
Group=tester
ExecStart=/home/tester/coturn/coturn/bin/turnserver -o -a -f -user=test:123456 -r Hangzhou
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- Copy the turnserver.service file to the system
cp turnserver.service /lib/systemd/system/
- Reload
Run the following command
systemctl daemon-reload
- To check whether the loading is successful,
run the following command
systemctl list-unit-files --type=service | grep turn
If everything is normal, you can see the turnserver related content
- start operation
systemctl status turnserver.service
- Check running status
systemctl status turnserver.service