Prerequisites
- A DNS-resolvable domain name pointing to your server’s public IP address. Let’s Encrypt will not issue a certificate for a raw IP address.
- Port 80 open on your firewall during Let’s Encrypt validation (you can close it again afterward).
- Port 443 open for HTTPS and secure WebSocket traffic.
- OpenSSL and the Java
keytoolutility available on your server. - Red5 Pro installed and stopped before you begin certificate conversion steps.
Step 1: Obtain a certificate
- Let's Encrypt (free)
- DigiCert (paid CA)
- GoDaddy (paid CA)
Let’s Encrypt provides free, automatically renewable certificates trusted by all major browsers. Certificates expire after 90 days and must be renewed.Replace Certbot will pause and ask you to create a Create the
Install certbot
- Ubuntu / Debian
- CentOS
Issue the certificate
Stop Red5 Pro if it is running (certbot needs port 80), then run: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: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.Wildcard certificates
If you need a single certificate to cover multiple subdomains (for example, nodes in an autoscaling cluster), use a DNS-challenge wildcard certificate instead:TXT DNS record: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.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.1
Export to PKCS12
2
Import into a JKS keystore
Step 3: Configure Red5 Pro
Openconf/red5.properties in your Red5 Pro installation directory and update the following properties:
Set the HTTPS port
Point to your keystore and truststore
changeit with the password you used when creating the keystore, and update the file paths to match where you stored your .jks files.
On Windows, use forward slashes in the path, for example:
rtmps.keystorefile=C:/letsencrypt/live/ssl.example.com/keystore.jksEnable SSL (Red5 Pro 14.0.0 and later)
Add or uncomment these two lines inconf/red5.properties:
Using a version earlier than 14.0.0?
Using a version earlier than 14.0.0?
Versions before 14.0.0 require you to modify
conf/jee-container.xml in addition to red5.properties:- Comment out the
<!-- Non-secured transports for HTTP and WS -->section. - Uncomment the
<!-- Secure transports for HTTPS and WSS -->section. - Save the file and restart Red5 Pro.
Step 4: Restart and verify
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.
RTMPS (optional)
RTMPS is not required for WebRTC but is available if you need encrypted RTMP connections. To enable it, openconf/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.