Guide to Installing Firefly (svn1696)

Installing Firefly on a Western Digital MyBook World Edition NAS

Portions on this howto were extracted from the Firefly Wiki here:
=> []

The main difference between the two is the method of installation. I use optware, where the FF wiki compiles from source. Lastly, and importantly, these instructions are a summary, written after the event, of what I did to get Firefly running on my 500GB MyBook World Edition and serving iTunes. I have not tested them on a clean system and you proceed at your own risk.

What to do first:
- Enable SSH on your My Book => []
- Install Optware => []
- Install Nano => []

Now, assuming you have already accomplished the above, to installing the required libs and executables:

1) Login via SSH (where user is account name and your server address) the mbwe:

ssh user@

and become root by typing:


2) Install libs and firefly with the following commands:

ipkg update
ipkg install sqlite libid3tag zlib libiconv mt-daapd-svn

3) Make links to libraries:

If you followed the directions to installing optware, you would have done this:

echo "/opt/lib" >>/etc/

This should refer all libs installed in /opt/lib for programs that would access them normally from /lib. However if as in my case when loading the program for the first time you get library missing errors, make links:

ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/
ln -s /opt/lib/ /lib/

If you don't make links, the program looks for them in /lib and fails to initialize without them. Additionally these libraries should have automatically been downloaded with the svn package. If not install them with:

ipkg install ffmpeg flac libogg libvorbis

4) Edit the relevant lines of the configuration file:

nano /opt/etc/mt-daapd/mt-daapd.conf

Then find, verify, and or replace the following values with your own:

db_type = sqlite3
mp3_dir = /path_to_mp3s
runas = user

*NOTE* You might have to change the "runas" part of the .conf file from nobody to root or any other user which have rights to run the application. The mp3_dir is the location of the music files on your drive. If stored on a share, it should be something like "/shares/internal/PUBLIC/music"

5) Change permissions (depending on your setup):

chown -R user:user /opt/var/cache
chown -R user:user /opt/var/mt-daapd
chown -R user:user /opt/share/mt-daapd/web-admin

Since my shares require a password, I needed to give the program the access by means of running it as myself. If your share is public, you may leave the ownerships intact as they are owned by the group "nobody." If you do however keep the default setup, you will need to follow Step 6.

*NOTE* The previous wiki on this recommended the below method, but I did not start with iTunes and my share is password protected with no guest access, so I just used my direct path to the files on my share as indicated in the previous step. Should that not work, proceed to Step 6. Otherwise verfiy permissions to enable the program to operate smoothly.

6) Now, using web interface, create a MUSIC folder. This is where the iTunes directory will sit. Copy the iTunes directory from your computer over to the MUSIC directory on the MyBookWorld using drag and drop. The iTunes directory now needs to be soft-linked to where Firefly can find it (it apparently needs to be in the same filesystem).

Back on the command line, again as root:

mkdir /music
ln -s /shares/internal/MUSIC/iTunes /music/iTunes
chmod ugo+rwx /music/iTunes

Note that I changed the directory permissions purely to prevent possible problems so the chmod above may not be necessary.

7) Start Firefly:

/opt/etc/init.d/S60mt-daapd start

Alternatively you can configure Firefly to start on system boot:

A launch script to start Firefly on system boot can be easily generated by copying and modifying one of the existing scripts. I chose to use the samba launch script.

cd /etc/init.d
cp S99firefly

Edit the S99firefly script to match the following:

# Start Firefly 

start() {
        echo "Starting Firefly"
        /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf &

stop() {
        echo "Stopping Firefly"
        killall mt-daapd > /dev/null 2>&1
restart() {

case "$1" in
                echo $"Usage: $0 {start|stop|restart}"
                exit 1

exit $?

Restart and check to see if Firefly is running.

After reboot, login again using ssh and check to see if you have mt-daapd processes running:

ps -ef | grep mt-daapd

You should see something similar to:
nobody 4441 1 0 16:00 ? 00:00:00 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
nobody 4442 1 9 16:00 ? 00:06:43 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
nobody 4443 4442 0 16:00 ? 00:00:00 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
nobody 4446 4443 0 16:00 ? 00:00:00 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
nobody 4448 4443 0 16:01 ? 00:00:13 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
nobody 5250 4443 0 17:07 ? 00:00:00 /opt/sbin/mt-daapd -y -c /opt/etc/mt-daapd/mt-daapd.conf
root 5286 4717 0 17:10 pts/0 00:00:00 grep mt-daapd

Lastly, connect to the Firefly web interface at <mybookworld_ip_address>:3689 using the web-admin username and password in the configuration file. Now, run a first scan manually to ensure that Firefly finds the files you have copied over.
If all the above has worked, when you launch iTunes on your computer you should see the Firefly server appear on the left-hand side menu. Hope this helps anyone as it was a challenge for me.

TIP: For any problems, enable the log in the conf file:

nano opt/etc/mt-daapd/mt-daapd.conf


logfile = /var/log/mt-daapd.log

Then be sure to enable level 9 debug:

debuglevel = 2

Visit the log file:

nano /var/log/mt-daapd.log
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License