|
| 1 | +<icecast> |
| 2 | + <!-- IMPORTANT! |
| 3 | + Especially for inexperienced users: |
| 4 | + Start out by ONLY changing all passwords and restarting Icecast. |
| 5 | + For detailed setup instructions please refer to the documentation. |
| 6 | + It's also available here: http://icecast.org/docs/ |
| 7 | + --> |
| 8 | + |
| 9 | + <!-- location and admin are two strings that are e.g. visible |
| 10 | + on the server info page of the icecast web interface --> |
| 11 | + <location>Earth</location> |
| 12 | + <!-- If you are listing streams on a YP, this MUST be a working email! --> |
| 13 | + <admin>icemaster@localhost</admin> |
| 14 | + <!-- This is the hostname other people will use to connect to your server. |
| 15 | + It affects mainly the urls generated by Icecast for playlists and YP |
| 16 | + listings. You MUST configure it properly for YP listings to work! |
| 17 | + This is NOT your homepage address, it's the hostname for THIS server. |
| 18 | + --> |
| 19 | + <hostname>localhost</hostname> |
| 20 | + |
| 21 | + <limits> |
| 22 | + <!-- Global maximum number of clients. |
| 23 | + This includes all kinds of clients, not only listeners. |
| 24 | + --> |
| 25 | + <clients>100</clients> |
| 26 | + <sources>2</sources> |
| 27 | + <queue-size>524288</queue-size> |
| 28 | + <client-timeout>30</client-timeout> |
| 29 | + <header-timeout>15</header-timeout> |
| 30 | + <source-timeout>10</source-timeout> |
| 31 | + <!-- This sets the burst size in [bytes]. This is the amount the |
| 32 | + the server sends to a listener that connects to a stream. |
| 33 | + This allows for a significantly reducing in startup time. |
| 34 | + Most people won't need to change from the default 64k. |
| 35 | + Applies to all mountpoints. |
| 36 | + --> |
| 37 | + <burst-size>65535</burst-size> |
| 38 | + </limits> |
| 39 | + |
| 40 | + <authentication> |
| 41 | + <!-- Sources log in with username 'source' --> |
| 42 | + <source-password>hackme</source-password> |
| 43 | + <!-- Relays log in with username 'relay' --> |
| 44 | + <relay-password>hackme</relay-password> |
| 45 | + |
| 46 | + <!-- Admin logs in with the username given below --> |
| 47 | + <admin-user>admin</admin-user> |
| 48 | + <admin-password>hackme</admin-password> |
| 49 | + </authentication> |
| 50 | + |
| 51 | + <!-- set the mountpoint for a shoutcast source to use, the default if not |
| 52 | + specified is to have none. |
| 53 | + <shoutcast-mount>/live.nsv</shoutcast-mount> |
| 54 | + --> |
| 55 | + |
| 56 | + <!-- Uncommenting this enables publishing to the streaming directory at: |
| 57 | + https://dir.xiph.org/ |
| 58 | + Please read the Icecast documentation about publishing to directories |
| 59 | + very carefully, as it is not enough to just uncomment this. |
| 60 | + --> |
| 61 | + <!-- |
| 62 | + <yp-directory url="https://dir.xiph.org/cgi-bin/yp-cgi"> |
| 63 | + <option name="timeout" value="15" /> |
| 64 | + </yp-directory> |
| 65 | + --> |
| 66 | + |
| 67 | + <!-- You may have multiple <listen-socket> elements --> |
| 68 | + <listen-socket> |
| 69 | + <port>8000</port> |
| 70 | + <!-- <bind-address>127.0.0.1</bind-address> --> |
| 71 | + <!-- <shoutcast-mount>/stream</shoutcast-mount> --> |
| 72 | + </listen-socket> |
| 73 | + <!-- |
| 74 | + <listen-socket> |
| 75 | + <port>8080</port> |
| 76 | + </listen-socket> |
| 77 | + --> |
| 78 | + <!-- |
| 79 | + <listen-socket> |
| 80 | + <port>8443</port> |
| 81 | + <tls>auto_no_plain</tls> |
| 82 | + </listen-socket> |
| 83 | + --> |
| 84 | + |
| 85 | + |
| 86 | + <!-- Global header settings |
| 87 | + Headers defined here will be returned for every HTTP request to Icecast. |
| 88 | +
|
| 89 | + The ACAO header makes Icecast public content/API by default |
| 90 | + This will make streams easier embeddable (some HTML5 functionality needs it). |
| 91 | + Also it allows direct access to e.g. /status-json.xsl from other sites. |
| 92 | + If you don't want this, comment out the following line or read up on CORS. |
| 93 | + --> |
| 94 | + <http-headers> |
| 95 | + <header type="cors" name="Access-Control-Allow-Origin" /> |
| 96 | + <header type="cors" name="Access-Control-Allow-Headers" /> |
| 97 | + <header type="cors" name="Access-Control-Expose-Headers" /> |
| 98 | + </http-headers> |
| 99 | + |
| 100 | + |
| 101 | + <!-- Relaying |
| 102 | + You don't need this if you only have one server. |
| 103 | + Please refer to the documentation for a detailed explanation. |
| 104 | + --> |
| 105 | + <!-- |
| 106 | + <master-server>127.0.0.1</master-server> |
| 107 | + <master-server-port>8001</master-server-port> |
| 108 | + <master-update-interval>120</master-update-interval> |
| 109 | + <master-password>hackme</master-password> |
| 110 | + --> |
| 111 | + |
| 112 | + <!-- Setting this makes all relays on-demand unless overridden, this is |
| 113 | + useful for master relays which do not have <relay> definitions here. |
| 114 | + The default is false --> |
| 115 | + <!--<relays-on-demand>true</relays-on-demand>--> |
| 116 | + |
| 117 | + <!-- Basic relay with one upstream server --> |
| 118 | + <!-- |
| 119 | + <relay> |
| 120 | + <local-mount>/different.ogg</local-mount> |
| 121 | + <on-demand>false</on-demand> |
| 122 | +
|
| 123 | + <upstream type="normal"> |
| 124 | + <uri>http://localhost:8080/example.ogg</uri> |
| 125 | + <relay-shoutcast-metadata>false</relay-shoutcast-metadata> |
| 126 | + </upstream> |
| 127 | + </relay> |
| 128 | + --> |
| 129 | + |
| 130 | + <!-- Relay with multiple upstream servers and default settings --> |
| 131 | + <!-- |
| 132 | + <relay> |
| 133 | + <local-mount>/different.ogg</local-mount> |
| 134 | + <on-demand>false</on-demand> |
| 135 | +
|
| 136 | + <upstream type="normal"> |
| 137 | + <server>master0.example.org</server> |
| 138 | + </upstream> |
| 139 | + <upstream type="normal"> |
| 140 | + <server>master1.example.org</server> |
| 141 | + </upstream> |
| 142 | + <upstream type="normal"> |
| 143 | + <server>master2.example.org</server> |
| 144 | + <port>8080</port> |
| 145 | + </upstream> |
| 146 | + <upstream type="default"> |
| 147 | + <port>8000</port> |
| 148 | + <mount>/example.ogg</mount> |
| 149 | + </upstream> |
| 150 | + </relay> |
| 151 | + --> |
| 152 | + |
| 153 | + <!-- Mountpoints |
| 154 | + Only define <mount> sections if you want to use advanced options, |
| 155 | + like alternative usernames or passwords |
| 156 | + All <mount> sections below are disabled by default, |
| 157 | + to activate them remove the comment markers around them and reload. |
| 158 | + --> |
| 159 | + |
| 160 | + <!-- Default settings for all mounts that don't have a specific <mount type="normal">. |
| 161 | + --> |
| 162 | + <!-- |
| 163 | + <mount type="default"> |
| 164 | + <public>false</public> |
| 165 | + <intro>/server-wide-intro.ogg</intro> |
| 166 | + <max-listener-duration>3600</max-listener-duration> |
| 167 | + <authentication> |
| 168 | + <role type="url" match-method="source,put" allow-web="*" allow-admin="*"> |
| 169 | + <option name="client_add" value="http://auth.example.org/stream_start.php"/> |
| 170 | + </role> |
| 171 | + <role type="anonymous" match-method="source,put" deny-all="*" /> |
| 172 | + </authentication> |
| 173 | + <http-headers> |
| 174 | + <header name="foo" value="bar" /> |
| 175 | + </http-headers> |
| 176 | + </mount> |
| 177 | + --> |
| 178 | + |
| 179 | + <!-- Normal mounts --> |
| 180 | + <!-- |
| 181 | + <mount type="normal"> |
| 182 | + <mount-name>/example-complex.ogg</mount-name> |
| 183 | +
|
| 184 | + <max-listeners>1</max-listeners> |
| 185 | + <dump-file>/tmp/dump-example1.ogg</dump-file> |
| 186 | + <burst-size>65536</burst-size> |
| 187 | + <fallback-mount>/example2.ogg</fallback-mount> |
| 188 | + <fallback-override>true</fallback-override> |
| 189 | + <fallback-when-full>true</fallback-when-full> |
| 190 | + <intro>/example_intro.ogg</intro> |
| 191 | + <hidden>true</hidden> |
| 192 | + <public>true</public> |
| 193 | + <authentication> |
| 194 | + <role type="htpasswd" connections-per-user="1"> |
| 195 | + <option name="filename" value="myauth" /> |
| 196 | + </role> |
| 197 | + <role type="static" allow-method="source,put,get,post,options" deny-web="*" allow-admin="*"> |
| 198 | + <option name="username" value="othersource" /> |
| 199 | + <option name="passwod" value="hackmemore" /> |
| 200 | + </role> |
| 201 | + <role type="anonymous" deny-all="*" /> |
| 202 | + </authentication> |
| 203 | + <http-headers> |
| 204 | + <header type="cors" name="Access-Control-Allow-Origin" value="http://webplayer.example.org" /> |
| 205 | + <header name="baz" value="quux" /> |
| 206 | + </http-headers> |
| 207 | +
|
| 208 | + <event-bindings> |
| 209 | + <event type="exec" trigger="source-connect"> |
| 210 | + <option name="executable" value="/home/icecast/bin/stream-start" /> |
| 211 | + </event> |
| 212 | + <event type="exec" trigger="source-disconnect"> |
| 213 | + <option name="executable" value="/home/icecast/bin/stream-stop" /> |
| 214 | + </event> |
| 215 | + </event-bindings> |
| 216 | + </mount> |
| 217 | + --> |
| 218 | + |
| 219 | + <!-- |
| 220 | + <mount type="normal"> |
| 221 | + <mount-name>/auth_example.ogg</mount-name> |
| 222 | + <authentication> |
| 223 | + <role type="url" match-method="get,post,head,options" allow-web="*" deny-admin="*" may-alter="send_error,redirect"> |
| 224 | + <option name="client_add" value="http://myauthserver.net/notify_listener.php"/> |
| 225 | + <option name="client_remove" value="http://myauthserver.net/notify_listener.php"/> |
| 226 | + <option name="action_add" value="listener_add"/> |
| 227 | + <option name="action_remove" value="listener_remove"/> |
| 228 | + <option name="headers" value="app-pragma,cdn-token"/> |
| 229 | + <option name="header_prefix" value="ClientHeader."/> |
| 230 | + </role> |
| 231 | + <role type="anonymous" match-method="get,post,head,options" deny-all="*" /> |
| 232 | + </authentication> |
| 233 | + <event-bindings> |
| 234 | + <event type="url" trigger="source-connect"> |
| 235 | + <option name="url" value="http://myauthserver.net/notify_mount.php" /> |
| 236 | + <option name="action" value="mount_add" /> |
| 237 | + </event> |
| 238 | + <event type="url" trigger="source-disconnect"> |
| 239 | + <option name="url" value="http://myauthserver.net/notify_mount.php" /> |
| 240 | + <option name="action" value="mount_remove" /> |
| 241 | + </event> |
| 242 | + </event-bindings> |
| 243 | + </mount> |
| 244 | + --> |
| 245 | + |
| 246 | + <!-- Relays can also go into a <mount type="normal"> section --> |
| 247 | + <!-- |
| 248 | + <mount type="normal"> |
| 249 | + <mount-name>/relay_example.ogg</mount-name> |
| 250 | + <relay> |
| 251 | + <upstream type="normal"> |
| 252 | + <uri>http://master0.example.org:8000/example.ogg</uri> |
| 253 | + </upstream> |
| 254 | + </relay> |
| 255 | + </mount> |
| 256 | + --> |
| 257 | + |
| 258 | + <paths> |
| 259 | + <logdir>./log</logdir> |
| 260 | + <webroot>./web</webroot> |
| 261 | + <adminroot>./admin</adminroot> |
| 262 | + <reportxmldb>./report-db.xml</reportxmldb> |
| 263 | + |
| 264 | + <!-- Aliases: treat requests for 'source' path as being for 'dest' path |
| 265 | + May be made specific to a port or bound address using the "port" |
| 266 | + and "bind-address" attributes. |
| 267 | + --> |
| 268 | + <!-- |
| 269 | + <alias source="/foo" destination="/bar"/> |
| 270 | + --> |
| 271 | + <!-- Aliases: can also be used for simple redirections as well, |
| 272 | + this example will redirect all requests for http://server:port/ to |
| 273 | + the status page |
| 274 | + --> |
| 275 | + <alias source="/" destination="/status.xsl"/> |
| 276 | + </paths> |
| 277 | + |
| 278 | + <logging> |
| 279 | + <accesslog>access.log</accesslog> |
| 280 | + <errorlog>error.log</errorlog> |
| 281 | + <!-- <playlistlog>playlist.log</playlistlog> --> |
| 282 | + <loglevel>information</loglevel> <!-- "debug", "information", "warning", or "error" --> |
| 283 | + <logsize>10000</logsize> <!-- Max size of a logfile --> |
| 284 | + <!-- If logarchive is enabled (1), then when logsize is reached |
| 285 | + the logfile will be moved to [error|access|playlist].log.DATESTAMP, |
| 286 | + otherwise it will be moved to [error|access|playlist].log.old. |
| 287 | + Default is non-archive mode (i.e. overwrite) |
| 288 | + --> |
| 289 | + <!-- <logarchive>true</logarchive> --> |
| 290 | + </logging> |
| 291 | + |
| 292 | + <security> |
| 293 | + <tls-context> |
| 294 | + <!-- The certificate file containng public and optionally private key. |
| 295 | + Must be PEM encoded. |
| 296 | + <tls-certificate>./icecast.pem</tls-certificate> |
| 297 | + --> |
| 298 | + <!-- The private key if not contained in <tls-certificate>. |
| 299 | + Must be PEM encoded. |
| 300 | + <tls-key>./icecast.key</tls-key> |
| 301 | + --> |
| 302 | + </tls-context> |
| 303 | + |
| 304 | + <!-- It is generally helpful to set a PRNG seed, what seed to set depends on your OS. --> |
| 305 | + <!-- Useful on all operating systems is a seed file for Icecast to update. |
| 306 | + This should be at some location that is (semi-)permanent such as /var/lib or /var/cache |
| 307 | + A size of 1024 [byte] is suggested. |
| 308 | + The file can be shared with trusted applications (other instances of Icecast). |
| 309 | + But should be protected against read and write access by untrusted applications. |
| 310 | + <prng-seed type="read-write" size="1024">/path/to/storage/icecast.prng-seed</prng-seed> |
| 311 | + --> |
| 312 | + <!-- If none of above is available on your OS you can add a static seed. |
| 313 | + This is by far not as secure as the above. |
| 314 | + The value should be at least 64 characters long if from [a-zA-Z0-9]. |
| 315 | + You MUST keep this parameter secret. It MUST NOT be shared with other instances. |
| 316 | + You SHOULD change this parameter often. |
| 317 | + <prng-seed type="static">U4V5etZF...</prng-seed> |
| 318 | + --> |
| 319 | + |
| 320 | + </security> |
| 321 | +</icecast> |
0 commit comments