A fine alternative is Icecast, a GPL-licensed streaming software with an online radio station directory. You can download it here or install it through your Linux distribution’s package manager. It’s not enough to just install Icecast; you also need a source client, which will connect to the Icecast server and manage the details of the radio station. A number of these exist, but the one I found easiest to use for a simple radio station was the command-line client Ezstream. In this tutorial, I’ll walk you through setting up both Icecast and Ezstream.
Configuring Icecast
First open the file “/etc/icecast2/icecast.xml” with root privileges. You can leave most of it alone, but you’ll want to at least change the authentication passwords. In my case, I also changed the port number to 8001 because the default, 8000, was already in use.
Now start the Icecast server: On my system, the program is called “icecast,” but on yours it might be called “icecast2.” The server is now running, but there is no audio stream. You can access your Icecast administration page by opening your browser and visiting 127.0.0.1:8000 (replacing “8000” appropriately if you changed your port number). Enter the username “admin” and the password you set up in icecast.xml. The administration page initially looks like this:
Configuring Ezstream
First you need to make a playlist from some or all of the music you have on your system. If you don’t already have one, here’s a simple command to make a playlist from all of the .mp3 files in your music directory, in alphabetical order:
Icecast also lets you stream in other formats, such as Ogg Vorbis, but I used the mp3 format because that’s what most of my music files are.
If you open the resulting “icecast-playlist.txt” file with a text editor, you’ll see that it’s just a list of tracks with their complete file paths. You can edit this as you please.
Now you’re ready to edit the Ezstream configuration file. Make a directory for it somewhere in your home directory. For example:
The example configuration files are saved in “/usr/share/doc/ezstream” or “/usr/share/doc/ezstream-[version]” in a directory called “examples”. Copy one example file of your choosing into the directory you just made:
Now open up the copy for editing. There are a few things to change here. If you are using a non-standard port, you’ll have to change that in the
You can now listen to your own stream by downloading the .m3u file and opening it in a supported player, such as Audacious, or directly opening the URL in your media player.
If someone on your LAN wants to connect to your stream, they must use the same URL but substituting your LAN IP address for “127.0.0.1,” which is just the local loopback address and is the same on every system. I hope this was as fun for you to set up as it was for me. Do you have an online radio station? How did you set it up? Do you have any tips for beginners?