DEV Community

Dimitris Tzemos
Dimitris Tzemos

Posted on • Updated on

How to setup a streaming multimedia server (internet radio station)

This is for slackel linux.
Same settings can be used in any linux distribution. You have to install icecast, mpd and gmpc (optional) in your linux distribution.

what is Icecast

Icecast is free server software for streaming multimedia. Icecast, is a program that streams audio data to listeners.

what is mpd

mpd is a music player daemon - a daemon for playing music

what is gmpc

Gnome Music Player Client (gmpc) is a gui front-end for mpd

Let begin:

  • Obtain a dns domain

"Obtain a DNS domain" and create one with a dynamic dns provider (e.g. )
Port forward tcp, udp port 8000 using your router interface
i hope you know how to do this. e.g. if your laptop has internal ip for example you have to set router port forwarding to 8000 port so users can reach you from outside to internal ip

  • Getting and Installing icecast mpd and its gui front-end gmpc

     sudo slapt-get -u
     sudo slapt-get -i icecast mpd gmpc
  • Setting up icecast config file

Open file /etc/icecast.xml and change some settings:

<source-password>hackme</source-password> to whatever you like
<relay-password>hackme</relay-password> to whatever you like
<admin-user>admin</admin-user> to whatever you like
<admin-password>hackme</admin-password> to whatever you like
<shoutcast-mount>/live</shoutcast-mount> to whatever you like, if it is not set then default /stream will be used e.g. set it to live

<hostname>localhost</hostname> to your dynamic domain name e.g.

 <!-- add this if you want your station listing on icecast directory, so people all over the world can find you -->
Enter fullscreen mode Exit fullscreen mode

Save file /etc/icecast.xml

  • prepare your mp3 files directory

put your mp3 files under a directory e.g. ~/Desktop/mp3

  • create your .mpdconf

a file ~/.mpdconf will be created in your home directory

  • Edit this file and change it as follows

    music_directory     "~/Desktop/mp3"
    playlist_directory      "~/.mpd/playlists"
    log_file            "~/.mpd/log"
    pid_file            "~/.mpd/pid"
    state_file          "~/.mpd/state"
    bind_to_address "localhost"
    port                "6600"
    input {
        plugin "curl"
    audio_output {
    type        "shout"
    encoding    "mp3"           # optional
    name        "Ariadni Greek Radio"
    host        "localhost"
    port        "8000"
    mount       "/live" # same as above in icecast.xml
    password    "hackme" # password_same_as icecast_server_password_above"
    bitrate     "128"
    format      "44100:16:2"
    description "Watever you like e.g Rock" # optional
    url  ""   # optional but same as above in icecast.xml
    genre   "your genre e.g. Greek"     # optional
    public  "yes"     # optional
    mixer_type    "software"  # optional
    # Need this so that mpd still works if icecast is not running
    audio_output {
    type "alsa"
    name "fake out"
    driver "null"
    mixer_type      "software"
    # Character Encoding
    # If file or directory names do not display correctly for your locale then you 
    # may need to modify this setting.
    filesystem_charset "UTF-8"
    # This setting controls the encoding that ID3v1 tags should be converted from.
    id3v1_encoding  "ISO-8859-1"
  • create a playlist

    find ~/Desktop/mp3/*.mp3 > ~/.mpd/playlists/myplaylist.m3u
  • run icecast and mpd

    sudo icecast -c /etc/icecast.xml -b
    mpd ~/.mpdconf
  • run gmpc from menus and stop or play the songs you like.
    check "Repeat mode" and "Random mode" under Control menu

can create a file ~/ including the lines

    sudo icecast -c /etc/icecast.xml -b
    mpd ~/.mpdconf
Enter fullscreen mode Exit fullscreen mode

and run it to not have to type again every time want to run your media server. Just type

    sh ~/
Enter fullscreen mode Exit fullscreen mode

You and your listeners can listen to your internet radio by typing in a browser or vlc or clementine or smplayer the url

In site the ariadni radio has been set up as above and streaming from my laptop.

Top comments (3)

iptvlive profile image
iptv-live • Edited

Thanks, we use Live Streaming in our project for IPTV Playlists

th3n00bc0d3r profile image

Live Streaming Radio... Really Interesting to try and setup with.

greenwoodtheatres profile image
Mr Penny • Edited

@djemos Hi I would love to do this would you be able to help me? I am looking to do this on a windows laptop