How to install SHOUTcast Server
How to install SHOUTcast Server
I recently got a client seeking to install shoutcast serverĀ on his VPS server, normally we don’t install services other the default ones preinstalledinstalled/needed for any web server. However the specific client was looking for hosting his own shoutcast server for his little radio station and it seems that he didn’t really had much experience with linux or installing the server. Luckily to install shoutcast server is nice an easy, configuration will take a little more time, but basic examples ready made are provided already and its just a matter of adjusting the limits.
Install guide
I’m going to install shoutcast on Debian linux, but any linux operating system will do. There aren’t any dependencies I’ve know of, but you may want to install screen.
1 |
apt-get install screen |
First you need to create a user, you can do this by running the command:
1 |
adduser shoutcast |
On debian, you are asked to set the password for this, on centos for example, you won’t be asked. With this we proceed to set a password for our username:
1 |
passwd shoutcast |
Next we login to our new user running the command:
1 2 3 |
su - shoutcast ## keep in mind, if you want to run screen, log out from root and log back in as user shoutcast cd /home/shoutcast/ |
Why we need a new user? We need an unprivileged user for running shoutcast, so this is the purpose of the new user.
Create a new directory “shoutcast” and then enter into it:
1 2 |
mkdir shoutcast cd shoutcast |
Next we need to download shoutcast server directly from nullsoft.com, you can access the download page here for the latest version, or you can use the bellow command:
1 2 |
wget http://download.nullsoft.com/shoutcast/tools/sc_trans_linux_10_07_2011.tar.gz wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_07_31_2011.tar.gz |
Then we need to extract the file:
1 2 3 4 |
tar xzf sc_trans_linux* tar xzf sc_serv2_linux* rm -rf sc_trans_linux* rm -rf sc_serv2_linux* |
Well that’s about for installing it, hence why I said there aren’t any dependencies. You will now find in your shoutcast folder a few server configuration examples you can use:
1 2 |
sc_serv_basic.conf sc_trans_basic.conf |
I recommend using the basic configuration file, this contains basic settings that you normally need. So bellow the files you need to check and alter their settings to suit your needs, especially the passwords!
- sc_serv_basic.conf
1 2 3 4 5 6 7 8 |
logfile=logs/sc_serv.log w3clog=logs/sc_w3c.log banfile=control/sc_serv.ban ripfile=control/sc_serv.rip password=testing adminpassword=changeme streamid=1 streampath=/test.aac |
- sc_trans_basic.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
logfile=logs/sc_trans.log calendarrewrite=0 encoder_1=aacp bitrate_1=56000 outprotocol_1=3 serverip_1=127.0.0.1 serverport_1=8000 password_1=testing streamid_1=1 streamtitle=VPS Test Server streamurl=http://www.shoutcast.com genre=Misc playlistfile=playlists/main.lst adminport=7999 adminuser=admin adminpassword=goaway<strong> </strong> |
You should update for both files the following configurations:
- password=testing
- adminpassword=changemeĀ — the user will be “admin”
- portbase — default is 8000
Next you only need to either open two windows, or just use screen to run shoutcast server in background. You will need to run the two servers:
1 2 3 |
screen ./sc_serv sc_serv_basic.conf # hold control key and press A and D to detach the screen |
and
1 2 3 |
screen ./sc_trans sc_trans_basic.conf # hold control key and press A and D to detach the screen |
If you do not wish to view their outputs, you can run them as a daemon in background:
1 |
./sc_serv daemon sc_serv_basic.conf |
and
1 |
./sc_trans daemon sc_trans_basic.conf |
On your shoutcast radio website, http://server-ip:8000, you will find the link to your server listen.pls for people to listen to your station.
That’s all for now, see you again in our next tutorial.