Icecast 2 is a free, open-source audio streaming server that can be used to create an internet radio station or to set up a personal audio stream. Here's a guide to installing Icecast 2 on the POP! OS Linux distribution.
Before we can begin, there are a few things you'll need:
Open a terminal and update your system package lists:
sudo apt update
Next, install Icecast 2 by running the following command:
sudo apt install icecast2
This will install all the required dependencies and libraries for Icecast 2.
Once Icecast 2 is installed, we need to configure it to work with our audio source. The default configuration file for Icecast 2 is located at /etc/icecast2/icecast.xml
.
Open the file using a text editor:
sudo nano /etc/icecast2/icecast.xml
You'll see a lot of XML code in the file. We're only interested in a few settings to get started.
Find the <hostname>
tag and enter the hostname or IP address of the computer running Icecast 2. For example:
<hostname>192.168.1.100</hostname>
The default port for Icecast 2 is 8000. If you want to use a different port, find the <port>
tag and change the value:
<port>8000</port>
Find the <mount>
tag and enter the file location of the audio source you want to use with Icecast 2:
<mount>/myaudio.mp3</mount>
This should point to the audio file you want to stream.
Find the section that starts with <admin-user>
and enter a username and password for the admin user:
<admin-user>
<username>myadminuser</username>
<password>mypassword</password>
</admin-user>
Once you've made the necessary changes, save and close the file.
Now that we've configured Icecast 2, we can start the service:
sudo systemctl start icecast2
Check the status of the Icecast 2 service to make sure it started properly:
sudo systemctl status icecast2
If everything is working correctly, you should see a message that says Active: active (running)
.
To test the Icecast 2 server, open a web browser and enter the URL http://hostname:port/streamname
where hostname
is the hostname or IP address of the computer running Icecast 2, port
is the port number you configured in the <port>
tag, and streamname
is the name of the stream you specified in the <mount>
tag.
For example, if you entered <mount>/myaudio.mp3</mount>
, you would enter the URL http://hostname:8000/myaudio.mp3
in your web browser.
If everything is working correctly, you should hear the audio stream playing in your browser.
In this tutorial, we've covered how to install and configure Icecast 2 on the POP! OS Latest Linux distribution. With Icecast 2, you can create your internet radio station or broadcast personal audio streams with ease.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!