Set up Icecast on Debian Wheezy with Liquidsoap as a source and Opus support
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Icecast Server Setup

Author: Daniel "MaTachi" Jonsson
License: MIT License


  • Distribution: Ubuntu 14.04
  • Server: Icecast2.3.3-kh10
  • Source: Liquidsoap
  • Audio codec: It's set up to stream in Opus. However, Vorbis works fine too.


$ sudo docker build -t matachi/icecast .


$ sudo docker run -i -t -p matachi/icecast

Inside the Docker container:

$ sudo -u user icecast -b -c /home/user/icecast.xml # Start Icecast
$ sudo -u user liquidsoap /home/user/liquidsoap.conf & # Start Liquidsoap
$ sudo -u user python3 /home/user/ # Start authentication site

Next, open Firefox, Clementine, VLC, or any other program that is able to play an Ogg Opus audio stream. Then open and enjoy!

About and what it does

The mount point /stream.opus has url authentication turned on. The authentication's listener_add value points to At that port there is a local Python 3 Flask site running, started with python3 /home/ from inside the Docker container. Note that this site won't be reachable from outside the Docker container. The Flask site will always return the HTTP response "200 OK" along with the HTTP header icecast-auth-user = 1. So the listener who connects to the stream will always get authenticated. However, the site could, before returning the response, launch Liquidsoap if it isn't already playing a track (Not implemented yet). This means that if there are no listeners, Liquidsoap could safely be turned off, consuming no CPU cycles required for encoding the music to the stream. In other words, if the Python code is extended further, it could turn off the encoding to the stream if there are no listeners.