Create an Internet Radio Station with Your Raspberry Pi


Audio streaming can be as simple as connecting your smartphone to Wi-Fi, AirPlay or Bluetooth connected speakers in your home. When you feel like dusting off your DJ gear and spinning records at a private event, your Raspberry Pi can help you blast out those epic crossfades and record scratches all over your house.

For loved ones who decline your party RVSP, you can also include them by streaming the audio to the web. All you need is “butt” (streamed using this tool) and Icecast 2 to make this musical dream come true.


The following items are required to get your home (or web) audio streaming up and running:

  • Raspberry Pi 3 or 4
  • microSD card (8 GB or more)
  • An audio device that connects to a USB port (e.g. mixer, USB sound card, DJ controller, Bluetooth dongle)
  • end to end software (streaming tool)
  • Icecast 2 (sends audio from your Raspberry Pi to your local network or public internet)
  • Raspberry Pi operating system (32 or 64 bit)

First you need to install Raspberry Pi OS. To help you with this task, consult our Raspberry Pi Operating System Installation Guide. If you prefer, you can install an alternative Linux operating system; however, this guide is suitable for Linux distributions that include the APT software installer.

When you’ve sorted out your OS, butt (streamed using this tool) can be installed next. Butt is a lightweight app that will stream audio from a Raspberry Pi audio source connected to one of its USB ports. Note that this application is not designed to stream MP3 (or similar) audio files.

Let’s install the dependencies to handle various streaming codecs, using the following command:

sudo apt install -y libfltk1.3-dev portaudio19-dev libopus-dev libmp3lame-dev libvorbis-dev libogg-dev libflac-dev libfdk-aac-dev libdbus-1-dev libsamplerate0-dev libssl-dev libcurl4-openssl-dev

Dependencies include audio file types such as LAME, ORB, OGG, FLAC, AAC, etc. Once these media types are installed, get a copy of the streaming tool from the SourceForge website. Then open a terminal window and use the following tar command to extract from the source:

tar -xzf butt-<version>.tar.gz

Access the extracted files and build the app from the source files with the following:

cd butt-<version>
./configure --with-client
sudo make install

Most of the time, Linux software has a package already assembled. In this case, the above commands allow you to build package from source files.

Set permissions for Butt

Before running the app, you need to grant yourself sufficient permissions. (You can also use elevated permissions with the “sudo” prefix to run it, but that’s not recommended.) Not sure where Butt is? In your terminal, just type:

whereis butt

Move to the directory where the end-to-end application is located:

cd /usr/local/bin

Give yourself the required app permission:

sudo chown [your username] butt

To run the streaming tool, type:


Adjust the settings for the buttocks

At the opening of the application, you will have to modify part of the configuration. Picking out Settings then select TO ADD to fill in the server details that butt can pass to the Icecast app.

Ensuring that all end-to-end server details are completed before installing Icecast will ensure smooth operation. Before pressing TO ADDremember to select the radio button next to Ice as well. You will also find (under the Settings menu) an area to fill in detailed server information.

The URLs can be left blank, or you can add something specific (depending on your needs). Also, it’s up to you whether you want your music listed in the Icecast directory. If yes, tick the box next to it Make the server public. When you are satisfied with the details of your server information, press the TO ADD button.

The end-to-end UI also includes additional settings where you can select the audio source and some optional enhancements when displaying information about the music playing on your stream.

Ice casting facility

This part of the process is quite simple (thanks to a package available using the APT installer). Jump into the terminal and type:

sudo apt install -y icecast2

You will notice that a configuration window appears shortly after the installation is complete.

After choosing Yes To proceed to the first page of Icecast setup, you will be prompted for passwords and administration details. Although the prompts guide you through these intuitive steps, be sure to write down the passwords you’ve selected. As the butt program is still open, press the play button to start sending your audio over the internet.

You can also load a web browser on another computer connected to your local network and type [Raspberry_Pi_IP_address]:8000. This will load the Administration, Statusand Version tabs in the Icecast web controller. To confirm the address of your Raspberry Pi, open a terminal window and type:


If you have configured everything correctly, you will see detailed details related to your streaming server.

To make sure your streaming server works as expected, choose one of the options at the top right of this page: M3U, XSPF or VCLT. You can also point a new browser tab to http://192.168.1.XXX:8000/stream to start listening!

Expanding Stream Capabilities

Once your music stream is up and running, what will you do with your new features? If you want to stream music beyond your local network, consider connect to a free dynamic dns tool. Once you’ve set up a DDNS service, simply change the URL your Icecast stream is referring to in order to broadcast your stream across the world.

If you want to take this stream to the level of an automated internet radio station, check out Open diffuser. This freeware is ideal for enthusiasts, non-profits, or low-budget entities that want to share their thoughts with the world.

Add optional video content

Although the possibilities are limited only by your imagination, many amateurs and professionals have created video content (some as their primary source of income) using YouTube. All you need is a Raspberry Pi 3 or 4, a connected camera, and a basic understanding of the Linux terminal. From there, you can easily find ways to stream video and audio with almost any budget.

Why not try it? With audio streaming, automation software, and video streaming, you’ll have a professional-looking studio broadcast around the world. Pretty cool, right?

Source link


Comments are closed.