iTunes from anywhere February 5th, 2007

I recently had the opportunity to reinstall OSX on my laptop. After doing this I decided to move more of my files over to my server. This included about 20+ gigabytes of music. Luckily for me there are some nice open source applications that interface well with iTunes. For my particular situation I decided to go with Firefly Media Server. I use Debian at home on my server so it was very easy to install.


apt-get install mt-daapd

Now that mt-daapd is installed we can run through the configuration. There are couple things you might want to change, but for the most part everything should work right away. Make sure to put in a password, this is for the web interface.


admin_pw = yourpassword

mp3_dir = /home/media/music/,/home/greg/music/,/home/ronelle/music/

servername = Music Jukebox

And that’s it for the configuration file. You should now be able to go to the web interface at http://yourserver:3689. From the web interface you can do everything without having to log into the server. If you are on the same local network as the server you should now see your music show up in iTunes. I wanted to also be able to listen to my music from work, so I setup an ssh tunnel from work. To make it easy I just added an alias to my ~/.bash_profile


echo 'alias tunnel="ssh greg@myserver -N -f -L 9999:myserver:3689"' >> ~/.bash_profile

So now you have an alias that can be run by typing tunnel, of course this will only work if you log out and back in again, so to use it right away we should export that line.


export alias tunnel="ssh greg@myserver -N -f -L 9999:myserver:3689" 

So now the tunnel command works, once you run tunnel it will prompt you for a password and then you won’t see anything. You can check to see if it’s running by typing this command


greg@Moniker ~ $ps aux | grep ssh
greg      8731   0.6 -0.1    29808   2160  ??  Ss   11:09AM   0:05.62 ssh greg@myserver -N -f -L 9999:myserver:3689

So now we have a tunnel from the servers 3689 port to our 9999 port. But why port 9999? The reason we forward it to 9999 is because mdns doesn’t tunnel, so we need to forward it to a non-standard port and then use a local proxy to make the finally connection. So I used RendezvousProxy which was quite simple to setup.

Now my iTunes shows a Jukebox share and my music plays just fine.

Sorry, comments are closed for this article.