Debian Codegraph @

doc/config_file/index.html

raw
1 <!DOCTYPE html>
2 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
3 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
4 <head>
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
9
10 <link rel="shortcut icon" href="../img/favicon.ico">
11 <title>Configuration File - Icecast Docs</title>
12 <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
13
14 <link rel="stylesheet" href="../css/theme.css" type="text/css" />
15 <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
16 <link rel="stylesheet" href="../css/highlight.css">
17
18 <script>
19 // Current page data
20 var mkdocs_page_name = "Configuration File";
21 var mkdocs_page_input_path = "config_file.md";
22 var mkdocs_page_url = "/config_file/";
23 </script>
24
25 <script src="../js/jquery-2.1.1.min.js"></script>
26 <script src="../js/modernizr-2.8.3.min.js"></script>
27 <script type="text/javascript" src="../js/highlight.pack.js"></script>
28
29 </head>
30
31 <body class="wy-body-for-nav" role="document">
32
33 <div class="wy-grid-for-nav">
34
35
36 <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
37 <div class="wy-side-nav-search">
38 <a href=".." class="icon icon-home"> Icecast Docs</a>
39
40 </div>
41
42 <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
43 <ul class="current">
44
45
46 <li class="toctree-l1">
47
48 <a class="" href="..">Introduction</a>
49 </li>
50
51 <li class="toctree-l1">
52
53 <a class="" href="../basic_setup/">Basic Setup</a>
54 </li>
55
56 <li class="toctree-l1 current">
57
58 <a class="current" href="./">Configuration File</a>
59 <ul class="subnav">
60
61 <li class="toctree-l2"><a href="#general-settings">General Settings</a></li>
62
63
64 <li class="toctree-l2"><a href="#limits">Limits</a></li>
65
66
67 <li class="toctree-l2"><a href="#authentication">Authentication</a></li>
68
69
70 <li class="toctree-l2"><a href="#public-directory-publishing-settings">Public Directory Publishing Settings</a></li>
71
72
73 <li class="toctree-l2"><a href="#tcp-port-settings">TCP Port settings</a></li>
74
75
76 <li class="toctree-l2"><a href="#http-headers">HTTP headers</a></li>
77
78
79 <li class="toctree-l2"><a href="#relaying-streams">Relaying Streams</a></li>
80
81
82 <li class="toctree-l2"><a href="#mount-specific-settings">Mount Specific Settings</a></li>
83
84
85 <li class="toctree-l2"><a href="#path-settings">Path Settings</a></li>
86
87
88 <li class="toctree-l2"><a href="#logging-settings">Logging Settings</a></li>
89
90
91 <li class="toctree-l2"><a href="#security-settings">Security Settings</a></li>
92
93
94 </ul>
95 </li>
96
97 <li class="toctree-l1">
98
99 <a class="" href="../server_stats/">Server Statistics</a>
100 </li>
101
102 <li class="toctree-l1">
103
104 <a class="" href="../auth/">Authentication</a>
105 </li>
106
107 <li class="toctree-l1">
108
109 <a class="" href="../relaying/">Relaying</a>
110 </li>
111
112 <li class="toctree-l1">
113
114 <a class="" href="../yp/">Listing in a YellowPage Directory</a>
115 </li>
116
117 <li class="toctree-l1">
118
119 <a class="" href="../admin_interface/">Admin Interface</a>
120 </li>
121
122 <li class="toctree-l1">
123
124 <a class="" href="../win32/">Windows Specific</a>
125 </li>
126
127 </ul>
128 </div>
129 &nbsp;
130 </nav>
131
132 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
133
134
135 <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
136 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
137 <a href="..">Icecast Docs</a>
138 </nav>
139
140
141 <div class="wy-nav-content">
142 <div class="rst-content">
143 <div role="navigation" aria-label="breadcrumbs navigation">
144 <ul class="wy-breadcrumbs">
145 <li><a href="..">Docs</a> &raquo;</li>
146
147
148
149 <li>Configuration File</li>
150 <li class="wy-breadcrumbs-aside">
151
152 </li>
153 </ul>
154 <hr/>
155 </div>
156 <div role="main">
157 <div class="section">
158
159 <p>This section will describe each section of the configuration file.</p>
160 <div class="admonition note">
161 <p class="admonition-title">Note</p>
162 <p>Especially for new Icecast users, editing the config file can be quite tricky.
163 It is thus recommended to make a <strong>backup of the original config file</strong> and then
164 <strong>start by just changing all passwords</strong>, nothing else.</p>
165 </div>
166 <p>Should you need to customize the configuration, then make a backup of your working config file, before you
167 make any changes. If Icecast refuses to start it is in most cases due to a malformed config file. In such a
168 case running the following command should point out most XML syntax problems:</p>
169 <pre><code>xmllint icecast.xml
170 </code></pre>
171 <p>Also check the Icecast error.log for additional hints in case of problems!</p>
172 <h1 id="general-settings">General Settings</h1>
173 <pre><code class="xml">&lt;hostname&gt;example.org&lt;/hostname&gt;
174 &lt;location&gt;Moon&lt;/location&gt;
175 &lt;admin&gt;[email protected]&lt;/admin&gt;
176 &lt;fileserve&gt;1&lt;/fileserve&gt;
177 &lt;server-id&gt;icecast 2.4.1&lt;/server-id&gt;
178 </code></pre>
179
180 <dl>
181 <dt>hostname</dt>
182 <dd>This is the DNS name (or IP address) that will be used for the stream directory lookups or
183 possibily the playlist generation if a Host header is not provided. This should be something
184 that your listeners can use.<br />
185 <strong>Note</strong>: This should not the the URL of your stream's website or so, but the hostname for this
186 Icecast server!</dd>
187 <dt>location</dt>
188 <dd>This sets the location string for this Icecast instance. It will be shown e.g on the web interface.</dd>
189 <dt>admin</dt>
190 <dd>This should contain contact details for getting in touch with the server administrator.
191 Usually this will be an email address, but as this can be an arbitrary string it could also
192 be a phone number. This will be shown e.g. on the web interface.</dd>
193 <dt>fileserve</dt>
194 <dd>This flag turns on the Icecast fileserver from which static files can be served. All files
195 are served relative to the path specified in the <a href="#path-settings"><code>&lt;webroot&gt;</code></a> configuration setting.<br />
196 By default the setting is enabled so that requests for the static files needed by the status
197 and admin pages, such as images and CSS are retrievable.</dd>
198 <dt>server-id</dt>
199 <dd>This optional setting allows for the administrator of the server to override the default
200 server identification. The default is icecast followed by a version number.<br />
201 It is not recommended to use this setting, unless you have very good reasons and know
202 what you are doing.</dd>
203 </dl>
204 <h1 id="limits">Limits</h1>
205 <pre><code class="xml">&lt;limits&gt;
206 &lt;clients&gt;100&lt;/clients&gt;
207 &lt;sources&gt;2&lt;/sources&gt;
208 &lt;queue-size&gt;102400&lt;/queue-size&gt;
209 &lt;client-timeout&gt;30&lt;/client-timeout&gt;
210 &lt;header-timeout&gt;15&lt;/header-timeout&gt;
211 &lt;source-timeout&gt;10&lt;/source-timeout&gt;
212 &lt;burst-on-connect&gt;1&lt;/burst-on-connect&gt;
213 &lt;burst-size&gt;65536&lt;/burst-size&gt;
214 &lt;/limits&gt;
215 </code></pre>
216
217 <p>This section contains server level settings. Usually only the <code>&lt;clients&gt;</code> and <code>&lt;sources&gt;</code> values
218 need to be adjusted.<br />
219 Only modify this section if you know what you are doing.</p>
220 <dl>
221 <dt>clients</dt>
222 <dd>Total number of concurrent clients supported by the server. Listeners are considered clients,
223 but so are accesses to any static content (i.e. fileserved content) and also any requests to
224 gather stats. These are max concurrent connections for the entire server (not per mountpoint).</dd>
225 <dt>sources</dt>
226 <dd>Maximum number of connected sources supported by the server. This includes active relays and source clients.</dd>
227 <dt>queue-size</dt>
228 <dd>This is the maximum size (in bytes) of the stream queue. A listener may temporarily
229 lag behind due to network congestion and in this case an internal queue is maintained for the
230 listeners. If the queue grows larger than this config value, then it is truncated and any listeners
231 found will be removed from the stream. This will be the default setting for the streams which is
232 512k unless overridden here.<br />
233 You can override this in the individual mount settings as well, which can be
234 useful if you have a mixture of high bandwidth video and low bitrate audio streams.</dd>
235 <dt>client-timeout</dt>
236 <dd>This does not seem to be used.</dd>
237 <dt>header-timeout</dt>
238 <dd>The maximum time (in seconds) to wait for a request to come in once the client has made a connection
239 to the server. In general this value should not need to be tweaked.</dd>
240 <dt>source-timeout</dt>
241 <dd>If a connected source does not send any data within this timeout period (in seconds),
242 then the source connection will be removed from the server.</dd>
243 <dt>burst-on-connect</dt>
244 <dd>This option is deprecated, use <code>burst-size</code> instead.</dd>
245 <dt>burst-size</dt>
246 <dd>The burst size is the amount of data (in bytes) to burst to a client at connection time. This is to quickly fill
247 the pre-buffer used by media players. The default is 64 kbytes which is a typical size used by most clients so changing
248 it is usually not required. This setting applies to all mountpoints unless overridden in the mount settings. Ensure that this value is smaller than queue-size, if necessary increase queue-size to be larger than your desired burst-size. Failure to do so might result in aborted listener client connection attempts, due to initial burst leading to the connection already exceeding the queue-size limit.</dd>
249 </dl>
250 <h1 id="authentication">Authentication</h1>
251 <p>This section contains all the usernames and passwords used for administration purposes or to connect sources and relays.
252 For more information, refer to the <a href="../auth/">Authentication</a> Page.</p>
253 <h1 id="public-directory-publishing-settings">Public Directory Publishing Settings</h1>
254 <pre><code class="xml">&lt;directory&gt;
255 &lt;yp-url-timeout&gt;15&lt;/yp-url-timeout&gt;
256 &lt;yp-url&gt;http://dir.xiph.org/cgi-bin/yp-cgi&lt;/yp-url&gt;
257 &lt;/directory&gt;
258 </code></pre>
259
260 <p>This section contains all the settings for listing a stream on any of the Icecast Directory servers.
261 Multiple occurances of this section can be specified in order to be listed on multiple directory servers.<br />
262 For more Information see the <a href="../yp/">Listing in a Directory</a> Page.</p>
263 <dl>
264 <dt>yp-url-timeout</dt>
265 <dd>This value is the maximum time Icecast will wait for a response from a particular directory server.
266 The recommended value should be sufficient for most directory servers.</dd>
267 <dt>yp-url</dt>
268 <dd>The URL which Icecast uses to communicate with the Directory server.
269 The value for this setting is provided by the owner of the Directory server.</dd>
270 </dl>
271 <h1 id="tcp-port-settings">TCP Port settings</h1>
272 <p>The following shows how you can specify the listening settings for the server.</p>
273 <pre><code class="xml">&lt;listen-socket&gt;
274 &lt;port&gt;8000&lt;/port&gt;
275 &lt;bind-address&gt;127.0.0.1&lt;/bind-address&gt;
276 &lt;/listen-socket&gt;
277
278 &lt;listen-socket&gt;
279 &lt;port&gt;8443&lt;/port&gt;
280 &lt;tls&gt;1&lt;/tls&gt;
281 &lt;/listen-socket&gt;
282
283 &lt;listen-socket&gt;
284 &lt;port&gt;8004&lt;/port&gt;
285 &lt;shoutcast-mount&gt;/live.mp3&lt;/shoutcast-mount&gt;
286 &lt;/listen-socket&gt;
287 </code></pre>
288
289 <p>The first listen-socket block shows how to make Icecast listen on port 8000, and additionally specifies
290 a <code>&lt;bind-address&gt;</code>, which limits this port to only listen for connections from this address.<br />
291 If a bind-address is not specified for a particular listen-socket, then the socket will be bound to all
292 interfaces (including IPv6 if available). For most people, the bind-address option will not
293 be required and often confuses people.</p>
294 <p>Another possibility is to use an <code>&lt;ssl&gt;</code> boolean setting which informs Icecast that a secured
295 connection is to be used. A common use for using a secure connection would be for admin page access.</p>
296 <p>The last listen-socket block in this example shows how to defined a Shoutcast compatible port. This can
297 be done by setting the <code>shoutcast-mount</code> setting. This will implicity define a second listening socket
298 whose port number is always one higher than the port defined (because the Shoutcast protocol requires
299 two ports) and also informs Icecast of which mountpoint the Shoutcast source client on this port will be using.</p>
300 <dl>
301 <dt>port</dt>
302 <dd>The TCP port that will be used to accept client connections.</dd>
303 <dt>bind-address</dt>
304 <dd>An optional IP address that can be used to bind to a specific network
305 card. If not supplied, then it will bind to all interfaces.</dd>
306 <dt>tls</dt>
307 <dd>If set to 1 will enable HTTPS on this listen-socket. Icecast must have been compiled against OpenSSL to be able to do so.</dd>
308 <dt>shoutcast-mount</dt>
309 <dd>An optional mountpoint setting to be used when Shoutcast DSP compatible clients connect.<br />
310 Defining this within a listen-socket group tells Icecast that this port and the subsequent port are to be used for
311 Shoutcast compatible source clients.</dd>
312 </dl>
313 <h1 id="http-headers">HTTP headers</h1>
314 <pre><code class="xml">&lt;http-headers&gt;
315 &lt;header name=&quot;Access-Control-Allow-Origin&quot; value=&quot;*&quot; /&gt;
316 &lt;header name=&quot;X-Robots-Tag&quot; value=&quot;index, noarchive&quot; status=&quot;200&quot; /&gt;
317 &lt;/http-headers&gt;
318 </code></pre>
319
320 <p>Icecast can be configured to send custom HTTP headers. This is available as a global setting and inside mountpoints. This section explains the global settings.</p>
321 <p>This functionality was introduced mainly to enable the use of simplified cross-origin resource sharing. The Icecast default configuration contains the first header, as seen in the above exmple, for this reason.</p>
322 <dl>
323 <dt>http-headers</dt>
324 <dd>This element is placed anywhere inside the main section of the Icecast config.
325 It will contain <code>&lt;header&gt;</code> child elements, that specify the actual headers one by one.</dd>
326
327 <dt>header</dt>
328 <dd>This tag specifies the actual header to be sent to a HTTP client in response to every request.<br />
329 This tag can contain the following attributes:
330 <dl>
331 <dt>name</dt>
332 <dd>Specifies the HTTP header field name. (required)</dd>
333 <dt>value</dt>
334 <dd>Specifies the HTTP header field value. (required)</dd>
335 <dt>status</dt>
336 <dd>Limits sending the header to certain HTTP status codes.<br />
337 If not specified, the default is to return the header for every HTTP status code.
338 This attribute is only available for global headers, at the moment. (optional)
339 </dd>
340 </dl>
341 </dd>
342 </dl>
343
344 <p>At the moment only global headers will be sent in case the HTTP status is not "200". This is subject to change in the future.
345 Avoid placing comments inside <code>&lt;http-headers&gt;</code> as, in this release, it will prevent Icecast from parsing further <code>&lt;header&gt;</code> tags.</p>
346 <h1 id="relaying-streams">Relaying Streams</h1>
347 <p>This section contains the servers relay settings. The relays are implemented using a pull system where the receiving
348 server connects as if it's a listener to the sending server.<br />
349 There are two types of relay setups, a “Master server relay” or a “Specific Mountpoint relay.”</p>
350 <p>For information about the two types and how to configure them, refer to the <a href="../relaying/">Relaying</a> Page.</p>
351 <h1 id="mount-specific-settings">Mount Specific Settings</h1>
352 <!-- FIXME -->
353
354 <pre><code class="xml">&lt;mount type=&quot;normal&quot;&gt;
355 &lt;mount-name&gt;/example-complex.ogg&lt;/mount-name&gt;
356 &lt;username&gt;othersource&lt;/username&gt;
357 &lt;password&gt;hackmemore&lt;/password&gt;
358 &lt;max-listeners&gt;1&lt;/max-listeners&gt;
359 &lt;max-listener-duration&gt;3600&lt;/max-listener-duration&gt;
360 &lt;dump-file&gt;/tmp/dump-example1.ogg&lt;/dump-file&gt;
361 &lt;intro&gt;/intro.ogg&lt;/intro&gt;
362 &lt;fallback-mount&gt;/example2.ogg&lt;/fallback-mount&gt;
363 &lt;fallback-override&gt;1&lt;/fallback-override&gt;
364 &lt;fallback-when-full&gt;1&lt;/fallback-when-full&gt;
365 &lt;charset&gt;ISO-8859-1&lt;/charset&gt;
366 &lt;public&gt;1&lt;/public&gt;
367 &lt;stream-name&gt;My audio stream&lt;/stream-name&gt;
368 &lt;stream-description&gt;My audio description&lt;/stream-description&gt;
369 &lt;stream-url&gt;http://some.place.com&lt;/stream-url&gt;
370 &lt;genre&gt;classical&lt;/genre&gt;
371 &lt;bitrate&gt;64&lt;/bitrate&gt;
372 &lt;type&gt;application/ogg&lt;/type&gt;
373 &lt;subtype&gt;vorbis&lt;/subtype&gt;
374 &lt;hidden&gt;1&lt;/hidden&gt;
375 &lt;burst-size&gt;65536&lt;/burst-size&gt;
376 &lt;icy-metadata-interval&gt;4096&lt;/icy-metadata-interval&gt;
377 &lt;authentication type=&quot;xxxxxx&quot;&gt;
378 &lt;!-- See authentication documentation --&gt;
379 &lt;/authentication&gt;
380 &lt;http-headers&gt;
381 &lt;header name=&quot;Access-Control-Allow-Origin&quot; value=&quot;*&quot; /&gt;
382 &lt;header name=&quot;X-Robots-Tag&quot; value=&quot;index, noarchive&quot; /&gt;
383 &lt;header name=&quot;foo&quot; value=&quot;bar&quot; status=&quot;200&quot; /&gt;
384 &lt;header name=&quot;Nelson&quot; value=&quot;Ha-Ha!&quot; status=&quot;404&quot; /&gt;
385 &lt;/http-headers&gt;
386 &lt;on-connect&gt;/home/icecast/bin/source-start&lt;/on-connect&gt;
387 &lt;on-disconnect&gt;/home/icecast/bin/source-end&lt;/on-disconnect&gt;
388 &lt;/mount&gt;
389 </code></pre>
390
391 <p>This section contains the settings which apply only to a specific mountpoint and applies to an incoming
392 stream whether it is a relay or a source client. The purpose of the mount definition is to state certain
393 information that can override either global/default settings or settings provided from the incoming stream.</p>
394 <p>A mount does not need to be stated for each incoming source although you may want to specific certain settings
395 like the maximum number of listeners or a mountpoint specific username/password. As a general rule, only define
396 what you need to but each mount definition needs at least the mount-name. Changes to most of these will apply
397 across a configuration file re-read even on active streams, however some only apply when the stream starts or
398 ends.</p>
399 <dl>
400 <dt>type</dt>
401 <dd>The type of the mount point (default: "normal"). A mount of type "default"
402 can be used to specify common values for multiple mountpoints.<br />
403 Note that default mountpoints won't merge with other mount blocks.
404 You only get those values if no <code>type="normal"</code> mount block exists
405 corresponding to your mountpoint.</dd>
406 <dt>mount-name</dt>
407 <dd>The name of the mount point for which these settings apply.
408 MUST NOT be used in case of mount type "default".</dd>
409 </dl>
410 <!-- FIXME -->
411
412 <dl>
413 <dt>username</dt>
414 <dd>An optional value which will set the username that a source must use to connect using this mountpoint.
415 Do not set this value unless you are sure that the source clients connecting to the mount point can be
416 configured to send a username other than <code>source</code>.<br />
417 If this value is not present the default username is <code>source</code>.</dd>
418 </dl>
419 <!-- FIXME -->
420
421 <dl>
422 <dt>password</dt>
423 <dd>An optional value which will set the password that a source must use to connect using this mountpoint.
424 There is also a <a href="../auth.html#stream-auth">URL based authentication method</a> for sources that can be used instead.</dd>
425 <dt>max-listeners</dt>
426 <dd>An optional value which will set the maximum number of listeners that can be attached to this mountpoint.</dd>
427 <dt>max-listener-duration</dt>
428 <dd>An optional value which will set the length of time a listener will stay connected to the stream.<br />
429 An auth component may override this.</dd>
430 <dt>dump-file</dt>
431 <dd>An optional value which will set the filename which will be a dump of the stream coming through
432 on this mountpoint. This filename is processed with strftime(3). This allows to use variables like <code>%F</code>.</dd>
433 <dt>intro</dt>
434 <dd>An optional value which will specify the file those contents will be sent to new listeners when they
435 connect but before the normal stream is sent. Make sure the format of the file specified matches the
436 streaming format. The specified file is appended to webroot before being opened.</dd>
437 <dt>fallback-mount</dt>
438 <dd>This optional value specifies a mountpoint that clients are automatically moved
439 to if the source shuts down or is not streaming at the time a listener connects. Only one can be
440 listed in each mount and should refer to another mountpoint on the same server that is streaming in
441 the same streaming format.<br />
442 If clients cannot fallback to another mountpoint, due to a missing
443 fallback-mount or it states a mountpoint that is just not available, then those clients will be
444 disconnected. If clients are falling back to a mountpoint and the fallback-mount is not actively
445 streaming but defines a fallback-mount itself then those clients may be moved there instead. This
446 multi-level fallback allows clients to cascade several mountpoints.<br />
447 A fallback mount can also state a file that is located in webroot. This is useful for playing a
448 pre-recorded file in the case of a stream going down. It will repeat until either the listener
449 disconnects or a stream comes back available and takes the listeners back. As per usual, the file
450 format should match the stream format, failing to do so may cause problems with playback.<br />
451 Note that the fallback file is not timed so be careful if you intend to relay this. They are fine
452 on slave streams but don't use them on master streams, if you do then the relay will consume stream
453 data at a faster rate and the listeners on the relay would eventually get kicked off.</dd>
454 <dt>fallback-override</dt>
455 <dd>When enabled, this allows a connecting source client or relay on this mountpoint to move listening
456 clients back from the fallback mount.</dd>
457 <dt>fallback-when-full</dt>
458 <dd>When set to <code>1</code>, this will cause new listeners, when the max listener count for the mountpoint has
459 been reached, to move to the fallback mount if there is one specified.</dd>
460 <dt>charset</dt>
461 <dd>For legacy, non-Ogg streams like MP3, the metadata that is inserted into the stream often has no defined character set.
462 We have traditionally assumed UTF8 as it allows for multiple language sets on the web pages and stream directory,
463 however many source clients for MP3 type streams have assumed Latin1 (ISO-8859-1) or leave it to whatever character
464 set is in use on the source client system.<br />
465 This character mismatch has been known to cause a problem as the stats engine and stream directory servers want UTF8
466 so now we assume Latin1 for non-Ogg streams (to handle the common case) but you can specify an alternative character
467 set with this option.<br />
468 The source clients can also specify a <code>charset=</code> parameter to the metadata update URL if they so wish.</dd>
469 <dt>public</dt>
470 <dd>The default setting for this is <code>-1</code> indicating that it is up to the source client or relay to determine if this mountpoint
471 should advertise. A setting of <code>0</code> will prevent any advertising and a setting of <code>1</code> will force it to advertise.
472 If you do force advertising you may need to set other settings listed below as the directory server can refuse to advertise
473 if there is not enough information provided.</dd>
474 <dt>stream-name</dt>
475 <dd>Setting this will add the specified name to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.</dd>
476 <dt>stream-description</dt>
477 <dd>Setting this will add the specified description to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.</dd>
478 <dt>stream-url</dt>
479 <dd>Setting this will add the specified URL to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.
480 The URL is generally for directing people to a website.</dd>
481 <dt>genre</dt>
482 <dd>Setting this will add the specified genre to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.
483 This can be anything be using certain key words can help searches in the directories.</dd>
484 <dt>bitrate</dt>
485 <dd>Setting this will add the specified bitrate to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.
486 This is stated in kbps.</dd>
487 <dt>type</dt>
488 <dd>Setting this will add the specified mime type to the stats (and therefore directory listings) for this mountpoint even if the source client/relay provide one.
489 It is very unlikely that this will be needed.</dd>
490 <dt>subtype</dt>
491 <dd>Setting this will add the specified subtype to the stats (and therefore directory listings) for this mountpoint.
492 The subtype is really to help the directory server to identify the components of the type.
493 An example setting is vorbis/theora and indicates the codecs in an Ogg stream</dd>
494 <dt>burst-size</dt>
495 <dd>This optional setting allows for providing a burst size which overrides the default burst size as defined in limits.
496 The value is in bytes.</dd>
497 <dt>icy-metadata-interval</dt>
498 <dd>Previously <code>mp3-metadata-interval</code>.<br />
499 This optional setting specifies what interval, in bytes, between ICY metadata updates for streams using ICY metadata.
500 This only applies to new listeners connecting on this mountpoint, not existing listeners falling back to this mountpoint. The
501 default is either the hardcoded server default or the value passed from a relay.</dd>
502 <dt>hidden</dt>
503 <dd>Enable this to prevent this mount from being shown on the xsl pages. This is mainly for cases where a local relay is configured
504 and you do not want the source of the local relay to be shown.</dd>
505 </dl>
506 <!-- FIXME -->
507
508 <dl>
509 <dt>authentication</dt>
510 <dd>This specifies that the named mount point will require listener (or source) authentication. Currently, we support a file-based
511 authentication scheme (<code>type=htpasswd</code>) and URL based authentication request forwarding. A mountpoint configured with an authenticator
512 will display a red key next to the mount point name on the admin screens.<br />
513 You can read more about authentication and URL based source authentication <a href="../auth.html">here</a>.</dd>
514 <dt>http-headers</dt>
515 <dd>This element is placed anywhere inside the mount section of the icecast config. It will contain <code>&lt;header&gt;</code> child elements, that specify the actual HTTP headers one by one.</dd>
516 <dt>header</dt>
517 <dd>This tag specifies the actual header to be sent to a HTTP client in response to every request for this mount point, but currently only if the HTTP status code is "200".
518 This tag can contain the following attributes:</dd>
519 </dl>
520 <ul>
521 <li><code>name</code> is required and its value specifies the HTTP header field name.</li>
522 <li><code>value</code> is required and its value specifies the HTTP header field value.</li>
523 </ul>
524 <dl>
525 <dt>on-connect</dt>
526 <dd>State a program that is run when the source is started. It is passed a parameter which is the name of the mountpoint that is starting.
527 The processing of the stream does not wait for the script to end.
528 Caution should be exercised as there is a small chance of stream file descriptors being mixed up with script file descriptors, if the FD numbers go above 1024. This will be further addressed in the next Icecast release.
529 <em>This option is not available on Win32</em></dd>
530 <dt>on-disconnect</dt>
531 <dd>State a program that is run when the source ends. It is passed a parameter which is the name of the mountpoint that has ended.
532 The processing of the stream does not wait for the script to end.<br />
533 Caution should be exercised as there is a small chance of stream file descriptors being mixed up with script file descriptors, if the FD numbers go above 1024. This will be further addressed in the next Icecast release.
534 <em>This option is not available on Win32</em></dd>
535 </dl>
536 <h1 id="path-settings">Path Settings</h1>
537 <pre><code class="xml">&lt;paths&gt;
538 &lt;basedir&gt;./&lt;/basedir&gt;
539 &lt;logdir&gt;./logs&lt;/logdir&gt;
540 &lt;pidfile&gt;./icecast.pid&lt;/pidfile&gt;
541 &lt;webroot&gt;./web&lt;/webroot&gt;
542 &lt;adminroot&gt;./admin&lt;/adminroot&gt;
543 &lt;allow-ip&gt;/path/to/ip_allowlist&lt;/allow-ip&gt;
544 &lt;deny-ip&gt;/path_to_ip_denylist&lt;/deny-ip&gt;
545 &lt;tls-certificate&gt;/path/to/certificate.pem&lt;/tls-certificate&gt;
546 &lt;ssl-allowed-ciphers&gt;ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS&lt;/ssl-allowed-ciphers&gt;
547 &lt;alias source=&quot;/foo&quot; dest=&quot;/bar&quot;/&gt;
548 &lt;mime-types&gt;/path/to/mime.types&lt;/mime-types&gt;
549 &lt;/paths&gt;
550 </code></pre>
551
552 <p>This section contains paths which are used for various things within icecast. All paths (other than any aliases) should not end in a <code>/</code>.</p>
553 <dl>
554 <dt>basedir</dt>
555 <dd>This path is used in conjunction with the chroot settings, and specifies the base directory that is chrooted to when the server is started.<br />
556 <em>This feature is not supported on Win32.</em></dd>
557 <dt>logdir</dt>
558 <dd>This path specifies the base directory used for logging. Both the <code>error.log</code> and <code>access.log</code> will be created relative to this directory.</dd>
559 <dt>pidfile</dt>
560 <dd>This pathname specifies the file to write at startup and to remove at normal shutdown. The file contains the process id of the icecast process.<br />
561 This could be read and used for sending signals to Icecast.</dd>
562 <dt>webroot</dt>
563 <dd>This path specifies the base directory used for all static file requests. This directory can contain all standard file types
564 (including mp3s and ogg vorbis files). For example, if webroot is set to <code>/var/share/icecast2</code>, and a request for
565 <code>http://server:port/mp3/stuff.mp3</code> comes in, then the file <code>/var/share/icecast2/mp3/stuff.mp3</code> will be served.</dd>
566 <dt>adminroot</dt>
567 <dd>This path specifies the base directory used for all admin requests. More specifically, this is used to hold the XSLT scripts used
568 for the web-based admin interface. The admin directory contained within the icecast distribution contains these files.</dd>
569 <dt>allow-ip</dt>
570 <dd>If specified, this points to the location of a file that contains a list of IP addresses that will be allowed to connect to Icecast.
571 This could be useful in cases where a master only feeds known slaves.<br />
572 The format of the file is simple, one IP per line.</dd>
573 <dt>deny-ip</dt>
574 <dd>If specified, this points to the location of a file that contains a list of IP addressess that will be dropped immediately.
575 This is mainly for problem clients when you have no access to any firewall configuration.<br />
576 The format of the file is simple, one IP per line.</dd>
577 </dl>
578 <!-- FIXME -->
579
580 <dl>
581 <dt>alias</dt>
582 <dd>Aliases are used to provide a way to create multiple mountpoints that refer to the same mountpoint.<br />
583 For example: <code>&lt;alias source="/foo" dest="/bar"&gt;</code></dd>
584 <dt>tls-certificate</dt>
585 <dd>If specified, this points to the location of a file that contains <em>both</em> the X.509 private and public key.
586 This is required for HTTPS support to be enabled. Please note that the user Icecast is running as must be able to read the file. Failing to ensure this will cause a "Invalid cert file" WARN message, just as if the file wasn't there.</dd>
587 <dt>tls-allowed-ciphers</dt>
588 <dd>This optional tag specifies the list of allowed ciphers passed on to the SSL library.
589 Icecast contains a set of defaults conforming to current best practices and you should <em>only</em> override those, using this tag, if you know exactly what you are doing.</dd>
590 <dt>mime-types</dt>
591 <dd>This optional tag specified a path to a mimetypes file that Icecast will use to map file extensions to mime-types when serving files.</dd>
592 </dl>
593 <h1 id="logging-settings">Logging Settings</h1>
594 <pre><code class="xml">&lt;logging&gt;
595 &lt;accesslog&gt;access.log&lt;/accesslog&gt;
596 &lt;errorlog&gt;error.log&lt;/errorlog&gt;
597 &lt;playlistlog&gt;playlist.log&lt;/playlistlog&gt;
598 &lt;loglevel&gt;4&lt;/loglevel&gt; &lt;!-- 4 Debug, 3 Info, 2 Warn, 1 Error --&gt;
599 &lt;/logging&gt;
600 </code></pre>
601
602 <p>This section contains information relating to logging within Icecast. There are three logfiles currently generated by Icecast,
603 an <code>error.log</code> (where all log messages are placed), an <code>access.log</code> (where all stream/admin/http requests are logged) and an
604 optional <code>playlist.log</code>. </p>
605 <p>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. </p>
606 <p>If you set any of the filenames to a simple dash (e.g. <code>&lt;accesslog&gt;-&lt;/accesslog&gt;</code>) then Icecast will direct the log output to
607 STDERR instead of a file.</p>
608 <dl>
609 <dt>accesslog</dt>
610 <dd>Into this file, all requests made to the icecast2 will be logged. This file is relative to the path specified by the <code>&lt;logdir&gt;</code> config value.</dd>
611 <dt>errorlog</dt>
612 <dd>All Icecast generated log messages will be written to this file. If the loglevel is set too high (Debug for instance) then
613 this file can grow fairly large over time. Currently, there is no log-rotation implemented.</dd>
614 <dt>playlistlog</dt>
615 <dd>Into this file, a log of all metadata for each mountpoint will be written. The format of the logfile will most likely change over time
616 as we narrow in on a standard format for this. Currently, the file is pipe delimited. This is optional and can be removed entirely
617 from the config file.</dd>
618 <dt>logsize</dt>
619 <dd>This value specifies (in Kbytes) the maxmimum size of any of the log files. When the logfile grows beyond this value, icecast will either
620 rename it to <code>logfile.old</code>, or add a timestamp to the archived file (if logarchive is enabled).</dd>
621 <dt>logarchive</dt>
622 <dd>If this value is set, then Icecast will append a timestamp to the end of the logfile name when logsize has been reached. If disabled, then
623 the default behavior is to rename the logfile to <code>logfile.old</code> (overwriting any previously saved logfiles). We disable this by default to
624 prevent the filling up of filesystems for people who don't care (or know) that their logs are growing.</dd>
625 <dt>loglevel</dt>
626 <dd>Indicates what messages are logged by icecast. Log messages are categorized into one of 4 types, Debug, Info, Warn, and Error. </dd>
627 </dl>
628 <p>The following mapping can be used to set the appropriate value:</p>
629 <ul>
630 <li>loglevel = <code>4</code>: Debug, Info, Warn, Error messages are printed</li>
631 <li>loglevel = <code>3</code>: Info, Warn, Error messages are printed</li>
632 <li>loglevel = <code>2</code>: Warn, Error messages are printed</li>
633 <li>loglevel = <code>1</code>: Error messages only are printed</li>
634 </ul>
635 <h1 id="security-settings">Security Settings</h1>
636 <p>This section contains configuration settings that can be used to secure the icecast server by performing a chroot to a secured location or changing user and group on start-up. The latter allows icecast to bind to priviledged ports like 80 and 443, by being started as root and then dropping to the configured user/group after binding listener-sockets.</p>
637 <div class="admonition attention">
638 <p class="admonition-title">Attention</p>
639 <p>This is currently not supported on Win32.</p>
640 </div>
641 <pre><code class="xml">&lt;security&gt;
642 &lt;chroot&gt;0&lt;/chroot&gt;
643 &lt;changeowner&gt;
644 &lt;user&gt;nobody&lt;/user&gt;
645 &lt;group&gt;nogroup&lt;/group&gt;
646 &lt;/changeowner&gt;
647 &lt;/security&gt;
648 </code></pre>
649
650 <dl>
651 <dt>chroot</dt>
652 <dd>An indicator which specifies whether a <code>chroot()</code> will be done when the server is started.
653 The chrooted path is specified by the <code>&lt;basedir&gt;</code> configuration value.
654 Setting up and using a chroot is an advanced concept and not in the scope of this document.</dd>
655 <dt>changeowner</dt>
656 <dd>This section indicates the user and group that will own the icecast process when it is started.<br />
657 These need to be valid users on the system. Icecast must be started as root for this to work.</dd>
658 </dl>
659
660 </div>
661 </div>
662 <footer>
663
664 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
665
666 <a href="../server_stats/" class="btn btn-neutral float-right" title="Server Statistics">Next <span class="icon icon-circle-arrow-right"></span></a>
667
668
669 <a href="../basic_setup/" class="btn btn-neutral" title="Basic Setup"><span class="icon icon-circle-arrow-left"></span> Previous</a>
670
671 </div>
672
673
674 <hr/>
675
676 <div role="contentinfo">
677 <!-- Copyright etc -->
678
679 </div>
680
681 Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
682 </footer>
683
684 </div>
685 </div>
686
687 </section>
688
689 </div>
690
691 <div class="rst-versions" role="note" style="cursor: pointer">
692 <span class="rst-current-version" data-toggle="rst-current-version">
693
694
695 <span><a href="../basic_setup/" style="color: #fcfcfc;">&laquo; Previous</a></span>
696
697
698 <span style="margin-left: 15px"><a href="../server_stats/" style="color: #fcfcfc">Next &raquo;</a></span>
699
700 </span>
701 </div>
702 <script>var base_url = '..';</script>
703 <script src="../js/theme.js"></script>
704
705 </body>
706 </html>