I've installed CoTURN on Ubuntu 16.04 server. I'm starting the TURN server with the below command:
turnserver -a -o -v -n --cert /etc/letsencrypt/live/mydomain.com/fullchain.pem --pkey /etc/letsencrypt/live/mydomain.com/privkey.pem -u username:password -r "mydomain.com"
I check with Trickle ice and it works fine. But after some random time (typically in days) it stops working/shuts down.
Is there any way to run it forever or at least get an email if the service stops? Thanks!
I use the NPM tool called PM2 for that. If the service goes down, you can get notifications. Monit can do that - and also restart if necessary.
Here you can find examples how to enable a specific service. In your case it's the turnserver.
Config