Integrate Freeswitch with LetsEncrypt on Debian 8
Verto is a sweet webrtc implementation built into FreeSWITCH. Since security was not an after-thought with webrtc, it is impossible to use verto, without encrypting the real-time media. To encrypt the media, I’ll be using Let’s Encrypt.
As I develop project “raydo,” I’ve had to do this several times, and thought to coalesce the howto here.
For now, I’d go with the easiest route I’ve found; unfortunately, it requires installing apache too. Once I have time on my hand, I’ll come up with something cleaner. You can consider this an update and summary of this post by nschoonover on dopensource.com and this digitalocean tutorial.
Install Certbot, the Let’s Encrypt Client
echo ‘deb http://ftp.debian.org/debian jessie-backports main’ | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt-get install python-certbot-apache -t jessie-backports
Create the certificates
certbot certonly –webroot -w /var/www/html/ -d demo.raydo.com
You can choose to setup a cron entry to renew the LE certificate
crontab -e
0 0 * * 7 certbot renew
Use the LE key for freeswitch
cat /etc/letsencrypt/live/demo.raydo.com/fullchain.pem /etc/letsencrypt/live/demo.raydo.com/privkey.pem > /etc/freeswitch/tls/wss.pem
Done!
Done!