LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

How to Setup a Shoutcast Radio VPS on Ubuntu

lowendtutorial

Have you ever wanted to use your VPS to host a Shoutcast Radio stream? In this article we will talk about how to install SHOUTcast Distributed Network Audio Server (DNAS 2.0) on your Ubuntu 16.04 VPS.

Once you have SHOUTcast installed, you will be able to use media players like Winamp or Mixxx to broadcast audio playlists onto the Internet.

Read more to learn how!

First, we will create local user in VPS to run DNAS server since it is not recommended to run DNAS server from a root account. Login to your VPS through SSH or Putty and create new user with your desired name using the following commands.

> su -

> adduser radio-user

The command will ask you for a password for the new user created. Choose one and type it in. You will need this password later so be sure to store it in a safe location.

We will now need to logout from the current root user and login with newly created user. Execute the following commands:

> exit

> su - radio-user

$ pwd

It’s now time to create two different directories. One will be used for downloading the software and the second will be use to install it. Type the following commands:

> mkdir ShoutCastDowload

> mkdir myShoutCastServer

Now let’s enter into the download directory:

> cd ShoutCastDowload

We will now need to download and extract the latest version of SHOUTcast server archive from the website. In order to select that we will have use our browser and connect to the following webaddress:

http://download.nullsoft.com/shoutcast/tools/

Use one of the following commands depending on which architecture your VPS has:

— For 32-bit OS —

> wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux-latest.tar.gz

> tar xfz sc_serv2_linux-latest.tar.gz

— For 64-bit OS —

> wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_x64-latest.tar.gz

> tar xfz sc_serv2_linux_x64-latest.tar.gz

Once the download of SHOUTcast server archive completes, we will need to locate sc_serv executable binary file and copy it to the installation directory and finally switch to the that directory. Use the following commands to do that:

> ls

> cp  sc_serv  ../myShoutCastServer/

> cd  ../myShoutCastServer/

> ls

We will now need to create two directories named control and logs.

> mkdir control

> mkdir logs

> ls

In the next step we will create a configuration file for the SHOUTcast server. We will need to create a new file named “sc_serv.conf” and edit it with a text editor of your choice. Before adding the following statements to this file, you will need to change all the password with some you choose. Make sure to use different password for the lines “adminpassword” and “password” or the server will not start.

— This is sample configuration file —

adminpassword=YYYYYY

password=XXXXXX

requirestreamconfigs=1

streamadminpassword_1=XXXXXX

streamid_1=1

streampassword_1=XXXXXX

streampath_1=http://radio-server.lan:8000

logfile=logs/sc_serv.log

w3clog=logs/sc_w3c.log

banfile=control/sc_serv.ban

ripfile=control/sc_serv.rip

As an alternative, you can also configure the server through web interface by creating a configuration file. Just go to your ShoutCastDowload directory and run the following command:

> ./setup.sh

Then you will have to type the following link into your web browser and follow the instructions:

http://your-IP-address:8000

Once you are done with the guided installation you will need to copy the configuration file to your home directory using the following command:

> cp sc_serv.conf ../myShoutCastServer

> cd ../myShoutCastServer

> ls

In order to start the server execute SHOUTcast server as a daemon use the following command:

> ./sc_serv daemon

Once SHOUTcast server is started, you can access its web interface in browser. Type your server IP Address on port 8000 and SHOUTcast server web interface should appear with no live streams available.

In order to make it easier to start and stop our new server, we need to create an executable script using the root user in /usr/local/bin/ as shown below and make it executable. Use the following commands to do that:

> su -

> vim /usr/local/bin/scradio

— Add following code and save it —

#!/bin/bash

case $1 in

start)

cd /home/radio-user/myShoutCastServer/

./sc_serv deamon

;;

stop)

killall sc_serv

;;

*)

echo "Usage radio start|stop"

;;

esac

 

> chmod +x /usr/local/bin/scradio

> exit

Now, you can use following commands to manage your SHOUTcast server.

> scradio start

> scradio stop

Congratulations! Our SHOUTcast server is now ready to receive playlists through remote media players and broadcast the audio content over the Internet.

Jon Biloh

10 Comments

  1. Is it possible to set up IPv6 & ssl on shoutcast server?

    December 20, 2016 @ 6:52 am | Reply
  2. Mustang:

    Your mkdir ShoutCastDownload is misspelled, it says ShoutCastDowload

    December 20, 2016 @ 3:31 pm | Reply
  3. It’s worth mentioning Icecast2, an open source internet radio server. A setup guide for that can be found here: http://askubuntu.com/a/28498

    December 21, 2016 @ 4:46 pm | Reply
  4. Leona:

    I like the option icecast gives when no input from an external source like a sound card using butt or sams or mixxx that a local pc inputs to a server using icecast where the input signal has a fallback to when the source stops and icecast fallsback on a mount point audio file from the server itself.

    Anyone use a free media server control panel called mscplite. I installed it rather simply over icecast but it appears to go full retard on an openvz centos vps.

    I installed icecast, ices2 and icegenerator on a openvz but have trouble working out the fallbacks. I’ll try shoutcast from this plan and see how it goes.

    I did not get that free mscplite media server control panel to function as advertised.

    December 22, 2016 @ 5:06 pm | Reply
  5. Balazs:

    Using this tutorial I installed and started up a shoutcast server on Ubuntu. Now I’d like to use it to relay another stream, but I’m running into difficulties. Specifically I installed VLC and trying to make it work, but it doesn’t seem to be able to connect to the shoutcast server.

    Here is the command I’m using to start up VLC:

    cvlc -vvv http://source-streaming-IP-address --no-sout-video --sout '#standard{mux=raw,dst=source:STREAMPASSWORD@my-server-IP-address:8000//,access=shout}'

    However I keep getting the following error message (no matter how I play around with the username and password fields):

    access_output_shout access out warning: failed to connect using 'icy' (shoutcast) protocol
    access_output_shout access out warning: failed to connect using 'http' (icecast 2.x) protocol 
    access_output_shout access out warning: unable to establish connection, retrying...
    

    Your help in resolving this issue would be much appreciated! Many thanks in advance!

    February 25, 2017 @ 11:19 am | Reply
    • Michael:

      Use ffmpeg instead of vlc

      September 19, 2018 @ 7:18 am | Reply
  6. Antonio:

    hi how can i conecct to streamings at the same time. With diferent port?

    June 24, 2017 @ 6:02 pm | Reply
  7. Hi,
    Nice article,
    Thank for sharing very useful informtion with us.

    December 5, 2017 @ 5:28 am | Reply
  8. Hi there.
    Why don’t you install this little beauty as it has everything you need and really easy to install and the best thing it is a free control panel with full Auto DJ.
    The good thing about it is it installs everything for you and you can even pick if you want Icecast or Shoutcast installed.
    It works well on a basic VPS. I have mine running on a 2 gb VPS with 2 cores and works well.
    Check it out for yourself and any others on here that want a free Shoutcast control panel.

    https://github.com/AzuraCast/AzuraCast
    Hope this helps you all.

    April 17, 2018 @ 3:09 pm | Reply
  9. Robert Winkelmann:

    Icecast is the way to go now. Shoutcast has mostly turned into a paid service unless you want to limit your bandwidth quality and my guess is eventually they shove everyone to a paid plan. Icecast is still free and there are still updates being pushed out. Open source which means no money.

    December 21, 2018 @ 11:52 pm | Reply

Leave a Reply to add_it Cancel reply

Some notes on commenting on LowEndBox:

  • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
  • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
  • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

Your email address will not be published. Required fields are marked *