Configuring Icecast (Windows and Linux)
On Linux you will need a text editor to change the configuration file. You will also need to know where on your operating system the configuration file is stored. On Windows its a bit easier. If you wish to edit the Icecast configuration file in Windows you must first make sure that Icecast is open but not running. Then you just need to click on Configuration on the menu bar and choose 'Edit Configuration' :
You will then see the configuration editor open in notepad:
Icecast2 can be configured on Linux and Windows by editing the config file with a text editor. This document follows a certain syntax which is known as xml, so the Icecast2 configuration file should be named 'icecast.xml'. If you have a file called 'icecast.xml.dist' then this is the example configuration file that is installed with Icecast2. Rename the 'icecast.xml.dist' file to just 'icecast.xml'. Configuration File Format xml is a format that uses tags similar to HTML. The important thing to know is that each 'open tag' must have a 'close tag' otherwise the file will not be accepted by the server. A tag is something that is contained within an open and closed angle bracket like so:
<my-tag>This example is called an 'open' tag, and each of these must have a corresponding closed tag. Closed tags start with a open angle bracket followed by a forward slash, like so:
So a tag that starts with '<' and ends with '>' is an opening tag, and a tag that starts with '</' and ends with '> is a closing tag. Values can also be contained within these tag pairs. These values are the crucial parts of the configuration file that you will change to customise the configuration of Icecast2 to your needs. To change values of the configuration file change the text within the xml tags. For example, if you need to change the source-password, you will change the entry from this:
<source-password>hackme</source-password>To something like this:
Comments are frequently used in the configuration file. Comments are simply remarks put in the file by the Icecast2 programmers to assist you in understanding the different sections of the configuration file. Each comment starts with ''. This is the same syntax that HTML uses for comments. HTML Comments get ignored by the browser (they have no effect on the layout of a web-page), and consequently comments in this configuration file get ignored by the Icecast2 server. The below is an example of a comment you will find in the configuration file:
<!-- Uncomment this if you want directory listings -->
<authentication> <!-- Sources log in with username 'source' --> <source-password>hackme</source-password> <!-- Relays log in username 'relay' --> <relay-password>hackme</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>The fields above control the login processes made by any type of software attempting to make a connection to the Icecast server. The exception is that media players (like Winamp / XMMS etc) do not need to have a login, they just connect without any necessary authentication. You only (for now) need to be concerned with the source-password section of this file. source-password is the password that encoders must use to make a connection to the Icecast server. In order to send a stream the encoder must first identify itself to the Icecast server by sending the correct password. If the password is correct then the server will accept the connection and you can start streaming. If the password is incorrect, or if there isn't a password sent by the encoder, then the Icecast2 server will not accept the connection and you will not be able to stream. There is only one password for encoding software, so if there are, for example, 10 people sending separate streams to the server then each must use the same password which is listed here. The default source-password for all Icecast2 servers is "hackme" so it's a good idea to change this to something else as a lot of people know this default.
<hostname>localhost</hostname> <listen-socket> <port>8000</port> <!-- <bind-address>127.0.0.1</bind-address> --> </listen-socket>Every Linux machine has what is known as a hostname. To find out what this is simply type hostname into the terminal and enter the result into the field in this section. For example if I type hostname in the terminal and I get the result "darkstar.net" then my hostname field in this section would look like this:
<hostname>darkstar.net</hostname>The default port for Icecast2 is "8000", just leave it as it is for now. Note: you will need to remember these two values (hostname and port) as they need to be put into the corresponding fields of your encoder.