Set up a Linux media server

Jack Wallen
Oct 29, 2009
Updated • Nov 30, 2012

Do you have multiple machines around your house that would like to share a centralized server for multi-media? Having such a server for music allows for consolidation, ease of use, and space saving on client PCs. Of course to many users, the idea of setting up a multi-media server sounds like it would be a nightmare...especially on the Linux platform. That couldn't be further from the truth.

The Firefly Media Server (formerly mt-daap) is a fast DAAP server that is simple to install and even easier to configure. Firefly resides on a single Linux machine that doesn't have to be a powerhouse. In fact, you can install this lightweight server on Ubuntu Server and you're almost ready to go. In this article you will see how to do just that - install and configure Firefly Media Server on Ubuntu Server.


The Firefly server has all of the features you will want in a DAAP server:

  • Supports Unix/POSIX
  • Beta for Windows in the works
  • On the fly transcoding of OGG, FLAC, Apple Lossless, and WM
  • User-created smart playlist support
  • Integrates with iTunes and many other DAAP-supporting media players
  • Serve streaming radio stations


Since we are installing on a Ubuntu Server, the installation is simple:

  1. Open up a terminal (or just log into your servers' console)
  2. Issue the command sudo apt-get install mt-daap
  3. Enter your user password

That's it. Now it's time to set it up.

Configuration file

There is only one configuration file for Firefly: /etc/mt-daapd.conf. This file is quite easy to set up. For a basic DAAP server, out of the box, there is really only one option you must configure. If you open up the configuration file look for the line:

mp3_dir = /home/media/music

This is the line you will need to change to reflect the directory you will serve your media from. For my setup I created a new sub-directory in /opt called music. Do this with the command:

sudo mkdir /opt/media

Now you have to make that directory readable by the DAAP server with the command:

sudo chmod ug+r -R /opt/media

Now all files and sub-directories created with the /opt/media directory will have the proper permissions such that the DAAP server can serve up the files.

Of course what you have just set up is a very basic DAAP server. There are a lot of other options within the configuration file you can set up, such as:

  • servername: This is the name your DAAP server will broadcast. By default the server will be listed as Firefly RELEASE_NUMBER HOSTNAME (Where RELEASE_NUMBER is the release number of the Firefly installation and HOSTNAME is the hostname of the server.)
  • password protection: This will cause any user attempting to access the DAAP server to have to enter a password in order to see the files.
  • port: If you need to use a port other than the default (3689), configure it here.
  • extensions: The file types you want to allow to be served by your DAAP server.
  • Valid codectypes: These are the configurations for the format conversion. There are already lines for this in the configuration file - you just have to uncomment the ones you want to add for internal conversion.
  • rescan_interval: If you want to enable background scanning you need to uncomment this entry and set an interval. This will enable you to add new files without having to restart the DAAP server to pick up the new files. Very handy if you frequently add new files.

There are other configuration options, but those are the ones you will want to focus on first.

Start the daemon

After your configuration file is complete, go ahead and move your media files into the directory and then start the server with the command:

sudo /etc/init.d/mt-daap start

With the server up and running you can fire up a DAAP enabled client, like iTunes or Songbird (Note: Songbird requires the addition of a DAAP add on), and you should automatically see the files on the DAAP server.

Final thoughts

Setting up a DAAP server is a great idea for a small internal network where you want to be able to share out a multi-media library. Anyone looking to set this up, and has a Linux server up and running, would do well to give Firefly a try. The simplicity, size, and speed of this server makes it the perfect candidate.


Previous Post: «
Next Post: «


  1. Maurice said on September 14, 2012 at 5:27 pm

    A bit disappointed:
    1) It is an audio server for ROKU and iTunes
    NOT a “media server”
    No video, pictures, etc.

    2) It is a DEAD project. the website does not respond.
    There was an attempt to kindle a V2:

    But that did not take off..

    THIS article is a bit more useful:

  2. John Hallquist said on September 6, 2012 at 1:14 am

    Go nerd rage!! HowardG, you probably spent HOURS writing that! LOL

  3. John said on January 30, 2012 at 9:33 pm


    I haven’t laughed enough at this so please nerd-rage some more.



  4. Irfan Shakeel said on May 15, 2011 at 9:24 am

    Wonderful article i was looking for it,,,,, Thanks for sharing….

  5. Yawn said on May 15, 2010 at 1:06 am

    Yawn. I came here looking for info and found mudslinging. What a disappointment.

  6. Rupert said on November 27, 2009 at 4:38 pm

    Wow, I think this is the first Flamewar on gHacks – way to go!!
    Linux suffers from a credibility gap with the public? Err, tell that to the countless users of all the various Linux-based distros out there, or to all the websites that are run on Linux-based servers, or all the routers that run a basic Linux kernel..and if you are referring to your average Joe who still browses the web using IE6 – then, I don’t think anyone really cares about them, it’s not really the market that Linux is aimed at.

    Your anger at the bastardisation of the English language is honourable, but sadly it has already happened, and it has to be accepted. Look at how various words from other religions are now used wholly out of context (Christ, Lord, Jihad etc etc).

  7. HowardG said on November 2, 2009 at 3:33 pm

    What a STUPID name for a Linux distro!

    Just pisses off 21 million of us Aussies, defines gross igorance to us Buddhists and show the author is an ignorant opportunist – doesn’t have a clue!

    GOTTA be AMRRRRRRCAN… probably thinks they are bears.

    Ho hum…

    1. Theo said on November 25, 2009 at 2:07 pm

      Hey HowardG, perhaps you should practice some meditation in order to purge your angry thoughts. You seem to have a reflexive “Blame the Americans!” mind set, while ignorant of the fact that the distro who’s name you are trashing is from South Africa. I guess that makes YOU the ignorant opportunist, as you are taking the opportunity to blame a silly name on Americans. Your cheap shot at Americans has brought about bad karma to yourself. ;-)

      1. HowardG said on November 27, 2009 at 4:00 pm

        Hi Theo –
        I hope your knee didn’t harm you too badly. Jerking like that can cause serious damage. You assume I have anger. Not. The word I used is :
        adjective, -er, -est, noun –adjective
        1. lacking ordinary quickness and keenness of mind; dull.
        2. characterized by or proceeding from mental dullness; foolish; senseless: a stupid question.
        3. tediously dull, esp. due to lack of meaning or sense; inane; pointless: a stupid party.
        4. annoying or irritating; troublesome: Turn off that stupid radio.
        5. in a state of stupor; stupefied: stupid from fatigue.

        To associate, even assume the naming rights of a unique iconic creature with an essential formative tenet of Buddhism by simplistic, geeky, infantile alliteration is lame, in the worst possible way. If you know or researched anything of the inherent Buddhist aspects you could see the relationship of or to animals and kharma are antithetical to the geeko-trendy cuteness to which it alludes. Ubuntu is a bunch of switches, and instruction sets, albeit a great (versioned) OS. No relationship there. To sound ‘cute’ is, well, I have a Beagle already so no more thanks – certainly not in a Linux distro.

        Linux unfortunately suffers from a credibility gap with the public at large. It would be wonderful to see it gain traction and penetration on the desktop. Calling a distro Karmic Koala turns it into a comic, farcical in-joke, despite that people supposedly prefer names over numerical versioning. It’s easier? In actual fact they don’t care. I worked in advertising and film for over 40 years and have seen truck loads of user research cycle around… always to the same conclusions. They just want the facts (ie version numbers). But that is not my problem.

        Reflexive is incorrect. As is a set mind. My comments are well considered. And the distro is not from Sth Africa – it is global by implication. You miss the point – I refer to THIS release version NAME.

        Ubuntu is wholly ‘sponsored’ by Canonical Ltd., HQ’d in Europe, with 200+ employees contributing in 23 countries. The early naming convention came about from a conversation between Robert Collins 2nd staffer of Canonical and sabdfl – the man himself – on a ferry somewhere between Circular Quay and elsewhere in Sydney – my home city. So I know from whence the story came.

        If you mean patron Mark Shuttleworth being of Sth African descent/birth then understand he lives in London and holds both citizenships. Linux is of Finnish origin. Your fragile non sequitur is laughable.

        That is not a cheap shot the price is much higher that you realise. It’s really denigration of a language through laziness, ignorance and pop culture. Karmic Koala is really facile alliteration. A great pity as Ubuntu as a concept and OS has profound valuable meaning.

        Ignorant? Wha… see above. Attributable as one of the largest influential groups of Internet users and influencers for the overwhelmingly puerile geek speak the pervasive American ethos, cultural paucity and global penetration is largely responsible for recent bastardisation of the English language. Is Microsoft Word spell check familiar? The pervasive global Americanisation and effect on world cultures is hugely worrisome.

        Opportunist? Again… Not. Your ‘guess’ing is so inconclusive; as is ‘perhaps’, nearly as nebulous or amorphous as ‘seem’.

        So consider letting go of your Theocratic posture. You waxed on effusively, now wax off. An important Buddhist saying, “Do not speak unless it improves on silence”. Kind regards…

  8. Taco said on October 30, 2009 at 4:33 am

    pssst….. Karmic Koala was released today.

  9. Rupert said on October 29, 2009 at 11:55 pm

    I was gonna mention amahi as well, but I haven’t yet installed it, so dunno how great it is – it’s looks cool though.

  10. Rupert said on October 29, 2009 at 9:56 pm

    If you want to share photos, videos AND MP3 files, and your device supports UPnP (like the PS3, Xbox360 plus others) you can use mediatomb: It’s a great little app, I wrote up about it here: although it can transcode video on the fly, I had mixed results, so I would recommend ensuring your videos will work on the device you are streaming to natively first.

  11. cpg said on October 29, 2009 at 9:39 pm

    Sorry for the plug, byt you can do this with Amahi ( If what you really want is a home server, to do that and more, Amahi may be the perfect solution, and much MUCH simpler to manage.

    Now i totally understand if you roll your own because you want total control …

  12. Jack Wallen said on October 29, 2009 at 8:45 pm

    @Mike: This just allows much more flexibility. Plus I think you will find this type of server is much more cross-platform ready and faster. Your method is great (and simple) if you are working on a windows-only network.

  13. Mike said on October 29, 2009 at 8:19 pm

    What’s the point? Just share a folder on another PC using XP (or whatever) or am I really a dork?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.