Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Share iTunes library with OS X and Windows via a server Apps
After some trial-and-error research, I finally managed to move my iTunes library from my MacBook to a Linux file server, and to also use it from Windows machines. I wanted to be able to manage my library from all the computers on my network, so the iTunes sharing option was not enough. But I am the only user of the library: there will not be more than one instance of iTunes using (modifying) the library at once, otherwise this hint will certainly not work (see note at the bottom).

My file server (running Gentoo Linux) runs Samba for Windows sharing and netatalk for AFP. On each computer, I mount my Linux home directory. In it is a folder named iTunes, with the usual library structure. Now the steps to follow for achieving my setup: On your network share, create a folder called iTunes. To begin moving your library, make sure you have mounted your share on your Mac. Then follow these steps:
  • Open iTunes' preferences
  • Choose Advanced
  • Choose the new location for iTunes Music to be on your share, inside the iTunes folder.
  • Make sure iTunes is allowed to manage your music folder, and to copy newly-added files there (the two checkboxes under the folder chooser).
  • Click OK.
  • In the Advanced menu, select Consolidate Library. iTunes will now copy your music to the network share.
Next, quit iTunes (completely; closing its window is not enough). Open Finder, go to Music » iTunes inside your home directory. Copy iTunes Library to your network share, inside the iTunes directory. Rename that file to iTunes Library.itl -- this is neccessary for Windows iTunes to recognize your library.

Next, still on your Mac, option-click iTunes. It will ask you which library to use. Choose iTunes » iTunes Library.itl on your network share. iTunes then rebuilds the iTunes Library.itl.xml file, and finally starts as normal. To check that it opens the music from your share, get info on a song, and make sure that the location is correct. Now quit iTunes.

On your other Macs, mount the share, option-click iTunes, and choose the correct library.

On your Windows machines, mount the share and shift-click iTunes to get to the library chooser. Then simply choose the library on your share. iTunes will then re-create iTunes Library.xml. It is a bit weird to find an iTunes Library.itl.xml and an iTunes Library.xml on your share, but everything works fine. When you change something on one of your Windows machines, your Mac's iTunes will update the iTunes Library.itl.xml file, and vice versa.

Note: This hint is not for multiple users. While modifying your library, make sure that only one instance of iTunes is running, otherwise changes will be lost if one of the other instances is quit after yours. Probably you can write protect the library on your server for other users to prevent them damaging your library, but I have not tested this.
    •    
  • Currently 3.38 / 5
  You rated: 1 / 5 (8 votes cast)
 
[123,565 views]  

Share iTunes library with OS X and Windows via a server | 13 comments | Create New Account
Click here to return to the 'Share iTunes library with OS X and Windows via a server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Share iTunes library with OS X and Windows via a server
Authored by: vb on Apr 26, '07 11:09:29AM
If your only interested in listening to your music from multiple computers (but not copying music to an ipod or burning CDs or whatever), then the solution that seems to have worked better for me personally is to use a daapd server on a Linux box. I use mt-daapd

<a href="http://wiki.mt-daapd.org/wiki/Main_Page">http://wiki.mt-daapd.org/wiki/Main_Page</a>; for more info

on my linux workstation at work and use iTunes on my personal PowerBook G4 to play shared music from the daapd server. Also, my colleagues are able to listen to my shared music in iTunes or any other daap-compatible client (like VLC, RhythmBox, or Amarok just to name a few).

[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: mkennard20 on Apr 26, '07 02:54:02PM

All I do is use an alias to the itunes folder on my server and locate the alias in my music folder.



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: tc60045 on Apr 26, '07 02:53:50PM

For the love of gawd, please give this frustrated prospective netatalk user (and others like me) the paint-by-numbers on getting it to work. I've had nothing but frustration and want to do exactly what you have done. Much obliged!!



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: tmpatrick on Apr 26, '07 09:11:46PM

I use an NFS share on my music storage server using Ubuntu. It's not necessary to use netatalk (really bad support, pretty much a dead project), but this alternative does require a bit more configuration on your Mac's end to automount the NFS fileshare (using NetInfo Manager), and occasionally enter "sudo kill -1 `cat /var/run/automount.pid`" in Terminal if your connection drops (as mine does via wifi on occasion). Look here on macosxhints.com for "NFS automount" - that's what I did, and I'm golden.



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: g3ski on May 04, '07 12:05:11PM

Your title is a bit misleading. Your article (hint) is about storing your itunes library on a linux box. Unique that it's not a mac or windows box. But, it's not really shared among users.

The sharing feature in itunes is a nice workaround to let other people tap into a user's library of music. It let people listen to that library, but not interact with it.

I am working on setting up an old powerbook as the center of our music world in the house. It will play music on home stereo (controlled with TuneConnect for mac) as well as store music for three different macs. The difficult part is being able to syncronize the music that is added to any of the macs with all of the other playlists.

---
"I want my two dollars!"



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: farleyro on Jul 10, '07 04:45:23AM
I've been trying for a few days to get this to work, but I'm hitting a road block. My problem is that the files "iTunes Library" and "iTunes Library.xml" are greyed out and won't let me select them when I'm Choosing Library from the mac.

If I select the parent folder when Choosing Library, the mac finds the library file just fine even though the actual file names are greyed out.

However, once I've renamed "iTunes Library" to "iTunes Library.itl" then the mac gives an error that it can't find a library file. It's still greyed out so I can't select the file directly, and when I try and just choose its parent folder, it gives me the error that it can't find the file.

Anybody else having this problem and/or find a solution?

[ Reply to This | # ]

Share iTunes library with OS X and Windows via a server
Authored by: farleyro on Oct 03, '07 06:30:27PM
I managed to track down a solution to my problem that has been working for me now for about a month. I'm now sharing my library between my mac and windows machines.

I started by creating the library files from the mac side (iTunes Library and iTunes Library.xml) and saving them on my shared network drive.

Then, on the windows side, I Choose Library and navigate to the network folder that contains the library files created by the mac. The Files of type field is locked as .itl so you won't be able to see the file itunes library. BUT, if you click in the File name field and type in "itunes library" INCLUDING the quotes, it will ignore the file type and choose the library created by the mac.

I've only found two issues. First, I can only open the library once at a time (technically it doesn't stop me from opening it a second time from the other OS, but changes don't get saved). Second, when I open the library on Windows after opening it on Mac (or vice versa), it takes several minutes to rebuild the library.xml file. So I try not to flip back and forth between operating systems very often. But this DOES let me add music and playlists from either operating system and all of my other machines will see the change.

[ Reply to This | # ]

Share iTunes library with OS X and Windows via a server
Authored by: rdkay on Apr 06, '08 11:59:14AM

I had the same problem that after I had renamed the file to .itl my second mac could not open the file (greyed out).
I have solved it by opening itunes, puting the library to the shared folder then I have created an alias named itunes to the network share in the local music folder where normally the mac would expect the local itunes folder. Itunes opened without asking and recreated the xml file. Works fine now, thanks!



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: renderhead on Jul 21, '07 03:15:39PM

I discovered a perfect use for this tip: sharing an iTunes library between the Mac and Windows partitions when using Boot Camp.

Rather than using a server, I use a FAT32 formatted hard drive (internal on my Mac Pro, but you could use an external drive as well) to host my music. I follwed the directions as described, copying the library file to the shared drive, and now I can play my music when I'm booted into OS X or Windows on the same computer. Since you can't log into both systems simultaneously, there is no risk of corruption to the library from two users accessing the same library.



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: _EriK_ on Sep 08, '07 05:15:47PM

Brilliant! Just what I was looking for (managing my iTunes library on both PC and Mac) and it works perfect.

I did try something similar before reading this hint, but iTunes on the Mac doesn't like the .itl created on the PC.

This should work on any shared drive on the network and is not limited to a unix server.



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: Kash on May 26, '08 01:13:24PM

Thanks for this tips, it work correctly for me (database on a NAS) but i have some trouble with covers, I use itunes option to find cover for every song, i do it on my mac, it download every covers. But when i launch itunes on my windows i lost 70% of all covers. So i use itunes to download it again from my windows machine. And when i go back to mac, lot of covers dissapear again. I don't understand why i'm loosing all of my covers again and again. Do you have a soluton for it ? Thanks



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: shdwkeeper on Sep 14, '08 10:10:35AM

I tried everything that the hint was recommending, but the problem with me is that only one of these machines (either MAC or PC) is able to play the files. I can see both library files on both MAC and PC but if I goto the machine that doesn't play the file and I locate it (getting it to actually play), then once I go back to the other machine (either MAC or PC) it updates the library file "takes forever" and then that file cannot be played.

Anyone else have this problem?



[ Reply to This | # ]
Share iTunes library with OS X and Windows via a server
Authored by: Pokesomi on Nov 20, '09 11:23:48PM

I think i finally got it to work but will need to do some testing. I am using a Buffalo Nas. 1TB of itunes goodness



[ Reply to This | # ]