How to Install Icecast 2 on Ubuntu Server

In this tutorial, we will be installing Icecast 2 server on Ubuntu Server. Icecast is a streaming media server that can be used to stream audio and video content to clients over the internet.

Prerequisites

Before we begin, make sure that you have the following:

Step 1: Update the System

First, update the package list using the following command:

sudo apt update

Next, upgrade the system packages to the latest version:

sudo apt upgrade

Step 2: Install Icecast 2

To install Icecast 2, run the following command:

sudo apt install icecast2

During the installation, you will be asked to configure the Icecast 2 server. The configuration file is located at /etc/icecast2/icecast.xml.

You can modify the configuration file to suit your needs, but for most users, the default settings will suffice.

After you have finished the configuration, restart the Icecast 2 server:

sudo systemctl restart icecast2

To check the status of the Icecast 2 service, run the following command:

sudo systemctl status icecast2

If the service is running, you should see output similar to the following:

● icecast2.service - Icecast2 streaming media server
   Loaded: loaded (/lib/systemd/system/icecast2.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-11-11 14:44:15 UTC; 3s ago
     Docs: man:icecast2
  Process: 3409 ExecStartPre=/usr/share/icecast2/icecast-check-config /etc/icecast2/icecast.xml (code=exited, status=0/SUCCESS)
 Main PID: 3410 (icecast)
    Tasks: 4 (limit: 4915)
   Memory: 4.1M
   CGroup: /system.slice/icecast2.service
           └─3410 /usr/bin/icecast2 -c /etc/icecast2/icecast.xml

Step 3: Configure Icecast 2

By default, Icecast 2 serves content on port 8000. You can access the Icecast 2 server through your browser by navigating to http://localhost:8000.

To stream audio content to the Icecast 2 server, you'll need a source client that can broadcast audio to the Icecast 2 server. Popular source clients include BUTT (Broadcast Using This Tool) and Mixxx.

Conclusion

In this tutorial, we have installed Icecast 2 server on Ubuntu Server and learned how to configure and restart the service. We also learned the default port number and how to stream audio content to the Icecast 2 server. If you have any questions or feedback, please leave a comment below.

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!