Skip to content

Setting up your own Icecast server

Tomasz Lemiech edited this page Oct 18, 2021 · 3 revisions

This chapter briefly describes how to install and configure your own Icecast server on a machine running systemd-based Debian-like distribution of Linux (including Ubuntu or Raspbian).

Installing Icecast

Just run:

sudo apt-get update
sudo apt-get install icecast2

If this is the first time you install Icecast on this machine, you will see a full-screen UI asking whether you want to configure the server and set passwords.

The first question is about the host name which is to be prepended to all stream URLs. You can keep the default.

Next comes the question about Icecast2 source password. This one is important. Set the password and put it into RTLSDR-Airband's configuration file, in each icecast output pointing at this Icecast server.

Then set relay and administrator passwords. RTLSDR-Airband does not need these to work.

Then the installer will complete the installation and the Icecast server should be up and running. Verify this with:

sudo systemctl status icecast2

It should show the state as "active (running)".

Configure

Icecast configuration lives in /etc/icecast2/icecast.xml file. Here are a few knobs you may find necessary to tweak:

  • <limits> section:
    • <sources> - this is the number of stream sources which can connect to the server simultaneously. The default value is 2. If you will be running RTLSDR-Airband with more than 2 icecast outputs streaming to this server, you have to increase this, otherwise only first two streams will work and the server will be rejecting any further connections from RTLSDR-Airband.
    • <burst-on-connect> - enabled by default. Disable it if you want to reduce stream latency.
    • <burst-size> - the default value is 64 kilobytes, which is good for high-bitrate music streams. For low-bitrate voice this is too large and will unnecessarily increase the stream latency. You may want to reduce this to, say, 12 kilobytes.
  • <authentication>:
    • here you can change all the passwords which you were asked for during installation. <source-password> is the password that you put in the output configuration in rtl_airband.conf.
  • <listen-socket>:
    • <port> - the port number which Icecast server will listen on for connections from sources and from clients. The same port number has to be set in the output configuration in rtl_airband.conf.
    • <bind-address> - the IP address which Icecast server will listen on. If this is setting is not present, Icecast will listen on all IP addresses assigned to the machine. Make sure it's is not set to 127.0.0.1, because this will disallow both sources and clients from connecting to the server from any other host.

If you did any modifications to the Icecast configuration, save the file and then do:

sudo systemctl restart icecast2

to make changes take effect. At this point you should be ready to run RTLSDR-Airband and stream audio to your shiny new Icecast server.

Troubleshooting

As usual, log files are your primary source of information. By default, Icecast server puts its log files in /var/log/icecast2 directory. All HTTP requests from sources and listeners are written to access_log. Error messages go to error_log.

Clone this wiki locally