Stunnel SSL to SHOUTcast

SHOUTcast won’t support SSL so use Stunnel with free certificate from Let’s Encrypt certbot. https://certbot.eff.org/

# apt install stunnel certbot

# certbot certonly --standalone

Configure stunnel

# nano /etc/stunnel/stunnel.conf

8000 is SHOUTcast HTTP port

[shoutcast]
accept=443
connect=8000
cert = /etc/letsencrypt/live/radio.domain.com/fullchain.pem
key = /etc/letsencrypt/live/radio.domain.com/privkey.pem

Run stunnel

# stunnel

Set Auto-Renew certbot SSL

# crontab -e

15 3 * * * certbot renew --pre-hook "killall stunnel" --post-hook "stunnel" -q

Posted in: Shoutcast, SSL, Stunnel