Set up a Linux media server
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:
- Open up a terminal (or just log into your servers' console)
- Issue the command sudo apt-get install mt-daap
- Enter your user password
That's it. Now it's time to set it up.
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.
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.Advertisement