Setting up a Headless iTunes Server

In my home office, I have a headless server running Windows

IMG_4650

Server 2008 with iTunes 8 installed.  This machine is where I store all of my music, photos, videos, and other entertainment related files.  The interesting thing is that I also use this server to wirelessly broadcast my iTunes music digitally to my kick-ass home studio setup (a Benchmark DAC1, Coleman Audio M3, Quested Powered F11As, and a REL Subwoofer). The setup that I am about to describe should work equally as well for those of you who have any kind of audio playback equipment that has an optical audio input.

The setup is simple.  I bought a Shuttle XPC SD30G2B and a IMG_4638RocketRaid 1740 card off of NewEgg.com.  Here is the machine stashed away behind some of my other gear.  The server has no monitor attached and I use Remote Desktop to connect to it.  The other key component is the Apple Airport Express which has a digital audio out.

Look ma, no monitor!

Applew Airport Express

When I launch iTunes, it get the following error message, since the onboard audio card is not configured properly (I believe that is because I do not have anything hooked up to the onboard audio card).  This message can be ignored.

itunes-error

After iTunes launches you can choose the Airport Express from the dropdown list on the bottom of iTunes.  You only have to do this once, if your Airport Express is always plugged in.

itunes-select speaker

Here is the Benchmark DAC1 (on the bottom of the rack) set to its optical input with it’s blue status light lit up.  The blue status light will light up on the Benchmark DAC1 as long as something is playing from iTunes.

IMG_4645 2

This area also doubles as my home office, where I work as an independent Software Development Consultant.  I get to listen to music on a kick-ass system while coding!

The setup is also very reliable, Windows Server 2008 is rock solid and so is the Airport Express.  One last note: Originally I had setup Windows Home Server but it has file corruption issues, so I highly recommend staying away from WHS.

EDIT: 7/24/2009 – This does not work when you try to use the physical soundcard connected to the server.

I just tried switching from using AirTunes to a physical sound card on the Server and it does not work when using via RDP (Remote Desktop).  When I RDP into the server and click on Control Panel –> Sound, I see a message: “No audio devices are installed”.  If I log on locally at the physical computer, I can see all of the devices fine.

No-audio-devices-are-installed

It turns out that this is “by design” and choosing “Leave at Remote Computer” in Remote Desktop is ignored by Windows Server 2008 x64″.  Here is a link to the KB article and a thread on the TechNet forums describing this.

So, at least for the time being, I can still play iTunes from the server to AirTunes, even when logged into the server via Remote Desktop.

Cheers,
Jon

9 Responses to “Setting up a Headless iTunes Server”

  1. IRONHEAD

    nice to setup i don’t have airport express card but i could still network them to share my music
    so can you actually start up your server by just using apple remote

  2. jeff przylucki

    fun article. Do you use this library as the iTunes library on your other machines? Or do you simply use the sharing? Or are you really only using this to stream to your audio rack? I’m trying to find the best way to centralize my iTunes music.. the streaming would be simple.. but I really want to simplify the import process…

    Also, the file corruption bug in WHS has been fixed for over a year…

  3. Matt

    Thanks for the article, I am thinking about doing a similar setup using win 2k8 server and itunes 9. I have a question though, do you have to be logged in with iTunes running to get the sharing functionality? I’m trying to find a solution that does not require a user to login and turn on itunes.

    Cheers!

  4. Jon Kragh

    @jeff I’m only using streaming right now, but I point the main iTunes server to a network share. My library has z:\ for all the paths from an old setup where I had multiple machines pointing to the same library file and music on the network. If you hold shift while iTunes launches on a PC you can point it to another library file.

    Cheers,
    Jon

  5. Jon Kragh

    @Matt – iTunes I believe has to be launched in order for the built iTunes sharing feature to work. Another option is to put your library on a network share and use the same library file on every computer (each computer would have to have the same share mapped with the same drive letter). Then when launching iTunes, hold down the shift key and point to the library file on your share to use as your main library file. In the iTunes preferences you would also have to say I want to keep my files on Z: (where z is the drive letter of your mapped drive).

    That is how I used to have my music in one physical location, with one library file, used by many PCs.

    Also, I can see my win2k8 server using iTunes built in sharing from my macbook pro laptop in my current setup.

    Cheers,
    Jon

  6. Brad

    @matt, @Jon… I have a similar setup with airtunes playing from my server downstairs. I did, however, figure out how to get itunes to share while still being able to be logged off. The error message that you get when launching itunes is because there is nothing plugged in to the sound card in the back. In order for this to work you must get that message to go away, so I just found a pair of cheesy earphones, plugged them into the back of the server and it doesn’t show the message anymore. Win server 2008 has some really cool task scheduling features. I went into server manager -> configuration -> task scheduler and made a new task that starts when windows starts and had it launch itunes.exe. There is a checkbox on whether to run the task if the user is logged in or not, check that box, uncheck the box that will shut the task down if it runs too long. Now whenever windows starts, itunes starts in the background whether or not anyone is logged in. And in itunes 9 you can set up home sharing, works nice :)

  7. Jon Kragh

    @Brad Thaks for posting! Your tips really make for a clean setup!

    Cheers,
    Jon

  8. Simon

    Nice article and setup!
    As a tip, you can get sound playing from the server via remote desktop by running mstsc /console from a run command. Works a treat!

Leave a Reply