Install Icecast on Ubuntu 20.04
Icecast is a popular and flexible solution for streaming audio used primarily for Internet radio stations. It supports Ogg, MP3, Opus and WebM streaming formats over HTTP, SHOUTcast, AAC and NSV. It has been in active development for 20 years and it is popular for its reliability, simplicity and adherence to open standards. It is released as free software under the GNU GPLv2 license.
Update the APT package list:
sudo apt-get update
sudo apt-get install icecast2
Right after installing the package an automated configuration window will open. Select
Yes to configure Icecast, and follow the prompts
Icecast can be further configured editing the XML configuration file
/etc/icecast2/icecast.xml. The following is an example of how to change the port.
The port can be modified by editing the
<port> tag. It is set to
8000 by default:
Save and exit the file.
Note: To apply the configuration changes you need to restart Icecast.
Binding privileged ports
If you want to run Icecast Server over privileged ports like
443) you need to do some extra configuration.
Open the config file:
sudo vi /etc/icecast2/icecast.xml
<security> section. Uncomment the
<changeowner> section inside and make the following changes:
<security> <chroot>0</chroot> <changeowner> <user>icecast2</user> <group>icecast</group> </changeowner> </security>
Open the service file:
sudo vi /etc/default/icecast2
GROUPID options so they match the following:
Start, restart and stop Icecast
To start the Icecast Server:
sudo systemctl start icecast2
To restart and reload configuration changes:
sudo systemctl restart icecast2
To stop Icecast:
sudo systemctl stop icecast2
Icecast comes with a web interface that serves the audio streams as files. It includes an admin section which lets you see basic information and statistics. You can access it by navigating your web browser to your server address or domain and the port,