This section will describe each section of the config file and is grouped into the following sections:
<limits> <clients>100</clients> <sources>2</sources> <threadpool>5</threadpool> <queue-size>102400</queue-size> <client-timeout>30</client-timeout> <header-timeout>15</header-timeout> <source-timeout>10</source-timeout> </limits>
This section contains server level settings that, in general, do not need to be changed. Only modify this section if you know what you are doing.
<authentication> <source-password>hackme</source-password> <relay-password>hackme</relay-password> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>
This section contains all the usernames and passwords used for administration purposes or to connect sources and relays.
<directory> <yp-url-timeout>15</yp-url-timeout> <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url> </directory>
This section contains all the settings for listing a stream on any of the Icecast YP Directory servers. Multiple occurances of this section can be specified in order to be listed on multiple directory servers.
<hostname>localhost<hostname> <!-- You can use these two if you only want a single listening socket --> <!-- <port>8000</port> --> <!-- <bind-address>127.0.0.1</bind-address> --> <!-- You may have multiple <listen-socket> elements --> <listen-socket> <port>8000</port> <bind-address>127.0.0.1</bind-address> </listen-socket> <fileserve>1</fileserve>
This section contains miscellaneous server settings. Note that multiple listen-socket sections may be configured in order to have icecast2 listen on multiple network interfaces. If a bind-address is not specified for a particular listen-socket, then the hostname parameter will be used to specify the address that will be bound.
<hostname>will be used.
<master-server>127.0.0.1</master-server> <master-server-port>8001</master-server-port> <master-update-interval>120</master-update-interval> <master-password>hackme</master-password> <relay> <server>127.0.0.1</server> <port>8001</port> <mount>/example.ogg</mount> <local-mount>/different.ogg</local-mount> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay>
This section contains the server’s relay settings. There are two types of relays: a “Master server relay” or a “Specific Mountpoint relay.” A Master server relay is only supported between icecast2 servers and is used to relays all mountpoints on a remote icecast2 server.
The following diagram shows the basics of doing a Master relay. Note that Server 1 is configured with the
<master-server-port>, etc settings and Server 2 is the server from which Server 1 will pull all attached mountpoints and relay them. Using a Master Server relay, ALL mountpoints on Server 2 will be relayed. If only specific mountpoints need to be relayed, then you must configure Server 1 as a “Specific Mountpoint Relay”. Both Master server relays and Specific Mountpoint relays begin their “relaying” when the Server is started.
|-----| |-----| | | all mountpoints | | /mount1 | | <------------------- | | /mount2.ogg |-----| |-----| /mount3 Icecast 2 Icecast 2 Server 1 Server 2 (RELAY SERVER) (MASTER SERVER) configured with <master-server> settings
A server is configured as a Master Server relay by specifying the
<master-password> values in the config file. The server that is being relayed does not need any special configuration.
The following diagram shows the basics of doing a Specific Mountpoint relay. Note that Server 1 is configured with the
<relay> settings and Server 2 is the server from which Server 1 will pull the specified mountpoint(s) and relay them. Using a Specific Mountpoint Relay, only those mountpoints specified on Server 1 will be relayed from Server 2.
|-----| |-----| | | /mount3 | | /mount1 | | <------------------- | | /mount2.ogg |-----| |-----| /mount3 Icecast 2 Icecast 2/Shoutcast/Icecast Server 1 Server 2 (RELAY SERVER) (REMOTE SERVER) configured with <relay> settings
Specific Mountpoint Relays can be configured to relay from an Icecast 2 server, as well as Icecast 1.x and Shoutcast.
A server is configured as a Specific Mountpoint Server relay by specifying a
<relay> XML chunk in the config file
for each mountpoint to be relayed. The server that is being relayed does not need any special configuration.
<relay> <server>127.0.0.1</server> <port>8001</port> <mount>/example.ogg</mount> <local-mount>/different.ogg</local-mount> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay>
<mount> <mount-name>/example-complex.ogg</mount-name> <username>othersource</username> <password>hackmemore</password> <max-listeners>1</max-listeners> <dump-file>/tmp/dump-example1.ogg</dump-file> <fallback-mount>/example2.ogg</fallback-mount> </mount>
This section contains settings which apply only to a specific mountpoint. Within this section you can reserve a specific mountpoint and set a source username/password for that mountpoint (not yet implemented) as well as specify individual settings which will apply only to the supplied mountpoint.
<mount-name>config value, then if the source is disconnected; all currently connected clients will be moved to the fallback-mount.
<paths> <basedir>./</basedir> <logdir>./logs</logdir> <pidfile>./icecast.pid</pidfile> <webroot>./web</webroot> <adminroot>./admin</adminroot> <alias source="/foo" dest="/bar"/> </paths>
This section contains paths which are used for various things within icecast. All paths (other than any aliases) should not end in a
access.logwill be created relative to this directory.
/var/share/icecast2, and a request for
http://server:port/mp3/stuff.mp3comes in, then the file
/var/share/icecast2/mp3/stuff.mp3will be served.
<alias source="/foo" dest="/bar">
<logging> <accesslog>access.log</accesslog> <errorlog>error.log</errorlog> <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --> </logging>
This section contains information relating to logging within Icecast. There are three logfiles currently generated by Icecast,
error.log (where all log messages are placed), and an
access.log (where all stream/admin/http requests are logged).
Note that on non-win32 platforms, a HUP signal can be sent to Icecast in which the log files are re-opened for appending giving the ability move/remove the log files.
The following mapping can be used to set the appropraite value:
4: Debug, Info, Warn, Error messages are printed
3: Info, Warn, Error messages are printed
2: Warn, Error messages are printed
1: Error messages only are printed
<security> <chroot>0</chroot> <changeowner> <user>nobody</user> <group>nogroup</group> </changeowner> </security>
This section contains configuration settings that can be used to secure the icecast server by performing a chroot to a secured location.
This is currently not supported on Win32.
chroot()will be done when the server is started. The chrooted path is specified by the