Skip to content

Docker compose with Icecast2 and SSL with certbot

License

Notifications You must be signed in to change notification settings

madalozzo/docker-icecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icecast with SSL

GitHub Workflow Status (branch) DockerHub Docker Pulls Docker Image Size

This repository contains scripts and configurations for managing SSL/TLS certificates and deploying an Icecast server using Docker.

Usage

Prerequisites:

  • A domain name pointing to your server.
  • Docker and Docker Compose installed on your server.
  • Port 80 open, for Let's Encrypt certificate generation.
  • Ports 8000 (HTTP) and 8443 (HTTPS) open on your server (or the ports you choose to use).
#Create a directory for the Icecast server:
mkdir icecast
cd icecast

#Download the files to your server:
wget https://raw.githubusercontent.com/madalozzo/docker-icecast/refs/heads/main/create-certs.sh
wget https://raw.githubusercontent.com/madalozzo/docker-icecast/refs/heads/main/docker-compose.yml
wget https://raw.githubusercontent.com/madalozzo/docker-icecast/refs/heads/main/icecast.xml
chmod +x create-certs.sh

Generate SSL/TLS certificates:

Edit the create-certs.sh script and set the DOMAIN variable to your domain name and adjust paths if necessary.

./create-certs.sh

Add the following line to your crontab to renew the certificates automatically:

45 4 * * 2 /home/ubuntu/icecast/create-certs.sh > /home/ubuntu/icecast/create-certs.log 2>&1

Edit the Icecast configuration:

  • Edit passwords
  • Edit the icecast.xml file and set the hostname attribute in the <hostname> element to your domain name.
  • Edit ports if necessary.

Start the Icecast server:

docker compose up -d

Access the Icecast server:

  • Open your browser and go to https://your-domain.com:8443 to access the Icecast server.
  • Use the source password to connect your streaming software to the Icecast server.

License

This project is licensed under the MIT License - see the LICENSE file for details.