Configure SSL for Red5 Pro: Let's Encrypt and Paid CAs
Secure your Red5 Pro server with SSL using Let’s Encrypt, DigiCert, or GoDaddy. HTTPS is required for WebRTC browser publishing and playback.
SSL is required for WebRTC. Browsers will not grant camera or microphone access to a page served over plain HTTP, and WebSocket connections used by WebRTC must be encrypted. This guide walks you through obtaining a certificate, converting it to a Java keystore, and configuring Red5 Pro to use it.
Let’s Encrypt provides free, automatically renewable certificates trusted by all major browsers. Certificates expire after 90 days and must be renewed.
Replace yourname@example.com with your email address and ssl.example.com with your fully qualified domain name. You can add multiple domains with additional -d flags.If successful, certbot prints the certificate paths:
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/ssl.example.com/fullchain.pem. Your cert will expire on YYYY-MM-DD.
Let’s Encrypt certificates expire after 90 days. To renew, re-run the certbot certonly command above, then re-create the keystore and truststore files and restart Red5 Pro.
If you need a single certificate to cover multiple subdomains (for example, nodes in an autoscaling cluster), use a DNS-challenge wildcard certificate instead:
Certbot will pause and ask you to create a TXT DNS record:
Please deploy a DNS TXT record under the name_acme-challenge.example.com with the following value:qChEJ8PrVvhUEouNd3sypGuDYdMa63Dw8jy2cxJyKCsBefore continuing, verify the record is deployed.
Create the TXT record in your DNS provider’s control panel. Wait for it to propagate (check with a DNS lookup tool), then press Enter to complete verification.
1
Generate a private key and keystore
When prompted for your first and last name, enter your fully qualified domain name (for example, ssl.example.com). For wildcard certificates, prefix with *. (for example, *.example.com).
When prompted for your first and last name, enter your fully qualified domain name (for example, ssl.example.com). For wildcard certificates, use *.example.com.
Step 2: Create the Java keystore (Let’s Encrypt only)
If you used Let’s Encrypt, your certificate is in PEM format. You need to convert it to a Java KeyStore (JKS) before Red5 Pro’s embedded Tomcat can use it.
Then open a browser and navigate to https://your-domain.com. You should see the Red5 Pro landing page served over HTTPS with a valid certificate indicator in the browser address bar.
After confirming SSL works, you can close port 80 on your firewall. Leave port 443 open for all HTTPS and WebSocket traffic.
RTMPS is not required for WebRTC but is available if you need encrypted RTMP connections. To enable it, open conf/red5-core.xml and uncomment the rtmpsMinaIoHandler and rtmpsTransport bean definitions. RTMPS runs on port 8443 by default; the keystore settings in red5.properties under the # RTMPS section apply here as well.