How-To: One iTunes Library With Multiple Computers

95 Comments

I recently set up a Mac mini in my living room to act as a media server. Instead of trying to update separate music libraries every time I added songs to my collection, I was just adding the music to the Mac mini’s iTunes library and streaming it my laptop. That worked fine until I tried to sync my iPhone. For obvious (copyright) reasons you cannot sync an iPhone to a shared library.

I wanted access to my music on both machines, but I did not want to share my Macbook Air’s library because the laptop would have to be on with iTunes running for the Mac mini to have the music. At this point, I had to choose between running separate libraries and updating them independently or figure out a way to run one library that updated whenever I added music from either machine. I chose the latter of the two options.

Some advantages of having one iTunes library:

  • You can sync iPhones to any computer on the network
  • You can add and edit playlists on any computer on the network
  • You can add music on any computer on the network

Some things you should know before you begin:

  • If you are using a laptop and want to take all of your music with you, this is not the method for you. All of the music is stored on a networked drive, so it is only accessible when on the network. (You could set it up so your music can be streamed over the internet, but this article will not go over that).
  • You can only make updates to one music library at a time — you cannot have iTunes open on both computers and make changes. Make changes on one, then open the other one.
  • You need to close iTunes on the computer you made changes on, and reopen it on all other computers to see changes

Those are all of the limitations I have found, so if those do not bother you, read on!

The Setup

The Mac mini runs Plex for watching movies, iTunes for managing my music, and is connected to the internet so we can watch our online video content (HuluSouth Park Studios and Snackfeed being my favorites). All of my movies and music are stored on a NAS that each computer on the network has access to.

A: Mapping iTunes Music Folders

The first thing we need to do is point each computer’s iTunes music folder to the same location. There are two different methods for this. If you have an NAS (Networked storage drive) follow procedure 1, if you are going to use one computer as the host (a server or tower that’s always on) follow procedure 2.

Procedure 1:

  1. iTunes > Preferences
  2. Go to the “Advanced” tab
  3. Click the “General” tab
  4. Under the “iTunes Music Folder Location” click the “Change” button
  5. Navigate to your NAS and create a folder called “Music”
  6. Click “Open”
  7. Click “OK” — you should now be back at a normal iTunes window
  8. Complete this on each computer. So in my case I did this with the Mac mini and the Macbook Air. When you have completed this procedure on each computer, move on to the next step – “B: Universal Library Setup”

Procedure 2:
Go to the computer that’s going to act as the music host (the one that will be sharing your music to all of your other computers). We are going to leave the iTunes music folder in the default location on this computer, but share it on the network so all of the other computers can see it.

  1. Go to Applications > System Preferences
  2. Click “Sharing” under the “Internet & Networking” section
  3. Click the check box next to “File Sharing”
  4. Under the “Shared Folders” section, click the plus arrow
  5. Navigate to your iTunes Music folder: HD > Users > Your Username > Music > iTunes > iTunes Music
  6. Click “Add”
  7. Close System Preferences. You’re done on this computer for now.
  8. Now go to a computer that is going to be streaming music from this one and continue to procedure directly below.

To stream music from the host computer to other computers:

  1. Go to a client machine.
  2. Open iTunes > Preferences
  3. Go to the “Advanced” tab
  4. Click the “General” tab
  5. Under the “iTunes Music Folder Location” click the “Change” button
  6. Navigate to the iTunes music folder we just shared from the host computer
  7. Click “Open”
  8. Click “OK” — you should now be back at a normal iTunes window
  9. Complete this on each computer. So in my case I did this with the Mac mini and the Macbook Air. When you have completed this procedure on each computer, move on to the next step –“Universal Library Setup”

At this point, all of your computers are accessing the same music library. Now all we have to do is make sure all the computers are accessing the same master index. Onward, to the universal library setup!

B: Universal Library Setup

At this point, both computers are accessing music from the same folder. Now we are going to make them access the same index file and album artwork. Once again, there are two different methods for this. If you have an NAS (Networked storage drive) follow procedure 1, if you are going to use one computer as the host (a server or tower that’s always on) follow procedure 2.

Procedure 1:

  1. Now we are ready to point our iTunes index to our LAN. While holding option, double click on your iTunes icon.
  2. A “Choose your library” window will pop up. Select “Create Library.”
  3. A window will pop up. Under “Where” select your a location on your NAS from the pulldown. Save as: “iTunes1”. iTunes will Launch. Close it.
  4. We’re done on this computer.
  5. Now go to a client computer and continue to “The client machine” below

Procedure 2:
Go to the computer that’s going to act as the music host (the one that will be sharing your music to all of your other computers). We are going to leave the iTunes index XML file in the default location on this computer, but share it on the network so all of the other computers can see it.

  1. Go to Applications > System Preferences
  2. Click “Sharing” under the “Internet & Networking” section
  3. Click the check box next to “File Sharing”
  4. Under the “Shared Folders” section, click the plus arrow
  5. Navigate to your iTunes folder where the XML file is stored: HD > Users > Your Username > Music > iTunes
  6. Click “Add”
  7. Close System Preferences. You’re done on this computer for now.
  8. Now go to a computer that is going to be streaming music from this one and continue to the procedure directly below.

The client machine:

  1. We are ready to point our iTunes to the shared index. While holding option, double click on your iTunes icon.
  2. A “Choose your library” window will pop up. Select “Choose Library.”
  3. A window will pop up. Navigate to the iTunes index XML file just set up on the NAS or shared from our host computer. You should see a folder called “iTunes1”. Open it.
  4. iTunes will Launch. Close it. We’re done on this computer. Repeat this procedure on all other client machines.

You’re now ready to roll. Simply add music to any computer you want, making sure iTunes is closed on all other computers, then when you are done adding your tunes, close iTunes and wait for Dropbox to upload your files. Once Dropbox is done uploading your updated library XML files, fire up iTunes on another computer and you will see your freshly added tunes. Enjoy!

NOTE: All the software mentioned is cross platform, so this method will work on your Windows machines as well!

95 Comments

drew

I’m pretty sure the drop box comment came from an earlier revision of the article (comment #7). They probably just forgot to take out the reference to it.

parkersweb

@Shailesh – hold the shift key and double click the iTunes desktop icon

Eric

2009-03-14
Hi, I tried the setup mentionned above but it’s nok working… I think I know why it’s not working but don’t know how to solve this…

On my iMac (the one that holds all my CDs), in the Library XML file, the path of each file looks like this: file://localhost/HD/Music(…). So on my “client machine” (and old G4), I’m able to “see” all the songs but when I want to listen, I can’t. Of course, the XML file tells iTunes to look on localhost for the songs…

Is there a work around to solve this ? Because I want iTunes to work on both Mac’s, iMac and my old G4.

Pete

I am having the same permissions problem as posts #14, #19, and #26. Perhaps it has something to do with this drop box? As someone above said, it comes out of nowhere in this article and I’ve never used it.

Please explain if you can – if this really does work it will be a huge help.

Marshall

I’m getting the same permissions problems as posts #14 and #19. All permissions/sharing settings are open on the host machine. iTunes is closed on it, and I’ve restarted it on the client. I can access all the music but keep getting an iTunes error message on the client that says “The iTunes Library file cannot be saved. You do not have enough access privileges for this operation.”

Has any figured out why this might be the case?

sheila

can i still do this procedure without a mac? I have a dell inspiron 1521

Shailesh

In your steps:

Now we are ready to point our iTunes index to our LAN. While holding option, double click on your iTunes icon.
A “Choose your library” window will pop up. Select “Choose Library.”

If I’m using iTunes for Windows, how do you start iTunes so you get the choose your library prompt? — Since there is no option key to hold while starting iTunes.

Face

you hold down Shift key when double clocking the itunes icon. you may need to try it twice for it to prompt you.

Borat

This has nothing to do with DRM, this is a software problem with iTunes itself, which they nearly solved with their home sharing update…but stuffed it up with the need to keep copies of library files on each machine.

My lib is 160gb + and this is not pheasable….fingers crossed

Craig

Using this setup, can two computers both be using iTunes at the same time?

Scott

This is a great setup if you have multiple machines but one user. My setup has two users, each of whom have different music tastes, so we want different playlists, and we want to keep different music in our libraries. But we also like some of the same songs, and don’t want to keep them twice, and I want to back up the music. So our setup is similar:
– Media files on a media server
– 2 machines, each with their own local libraries, but with the iTunes preference set to use the network server as the library location. This preference is under “Advanced,” at the top (iTunes Music folder location).

Now our music syncs to our iPhones, and we can set up our own playlists without stomping all over each other.

Scott S

Scott (Jan 9th)… I am very interested in your set up… I moved my library to an external drive and would like a second user (my wife) to be able to access the same music library… Any chance you can supply me with a little more specific info re: your set up and the steps took to get there?

SteveK

Wow – this is exactly what I want to do. I have a Windows environment with a AD server. On teh server is a shared folder with ALL the iTunes music. I want to have a shared library as well as 2 or 3 personal libraries. Can you please provide in depth instructions on how to accomplish this.

Thanks so much in advance.

Ugo

Worked for me with the following setup

– iTunes (media, database files, artwork, mobile applications) on ReadyNAS Duo
– Client 1 (PowerMac, Tiger 10.4.11, iTunes 8.0.2)
– Client 2 (MacBook, Leopard 10.5.6, iTunes 8.0.2)

I can see the same library from both clients. I can add songs from both clients.

Didn’t try yet to sync iPhone on client 2 (since I want first understand what will happen with Calendar sync).

Thanks
Ugo

Peter

RE: #14

I am having the same problem as the person in post #14. I have successfully set this up with my MacBook Pro as a Client (old PowerMac G4 is the Server). I am trying to set up my wife’s New MacBook Air and I am getting an error message when I try to choose the iTunes xml library on the Server. It says I do not have permission. I am connected to the server as the Administrator.

Has anyone been able to resolve this issue?

Thank you,

Peter

yaalag

This works really well! I have the same thing set-up in my house and once the library and index is setup on the network drive, you can add any computer very easily.
Installing itunes, then delete the created library and when starting up, after the error message point it to the network drive and chnge the preffs for the index file.
I have added cheapo older windows notebook around the house, connecting to stereo’s in the room and connected to the network wirelessly.
The children, my office, the kitchen anywhere we share our music and play it the same time.
only point is still that only one machine can update it while other itunes apps are closed.

Help!!

Do you guys think it works well or are there to many downsides?
I’m planning on putting my itunes and iphoto library on my time capsule and let time machine backup on the drive connected to time capsule. You guys think it will work?
or do you have some suggestions, always want to learn more…

Dietrich

I have an old iMac connected to an external hard-drive that has my main iTunes library. In addition, I have a MacBookPro with a different iTunes library.

I tried the method described above (Procedure 2 that uses my iMac as the host computer) with the modification that I am pointing to my external hard-drive which is attached to my iMac.

But it’s not working. Is there something that I am missing?

Help is greatly appreciated.

Thanks.

Dietrich

Damon

Ditto the comment #13…please explain more fully how to do this with DropBox. I know how to use Dropbox I just don’t understand what iTunes files would go into it. The music files AND the library files? Or would the music files be on all the computers separately and just sharing the library xml files? If the latter, I do not see where there is an option in iTunes which allows one to independently select the locations of the respective music libraries and index libraries. Or maybe I am missing something.

Thanks.

entica

Whenever I open iTunes on one of the “client” machines, I get “Cannot write to this library” error message (or something to that effect). I’ve set everything as wide-open as possible, guest and registered users have read/write access to the music folder and the itunes library folder. It’s shared properly and I even ran a permissions repair on the disk. Still, no matter what I do, I can’t get any client machines to actually write to the shared library. It doesn’t matter if I’m remotely connected as “Guest” or as the administrator on the server.

Any idea? Thanks.

Dwain Willis

When choosing the library, ensure that you do not have that library already opened on another machine. Quit ALL instances of iTunes on all machines except the one you are trying to map to.

Bob

Doesn’t seem to matter. I even moved my .xml files to the same external drive as the media. Both users are set up on one iMac. If one user has iTunes open, the other can’t even open for read access to the library file. Error message is that file or disk is locked or you don’t have permissions. Don’t know how these others seem to be doing it — either not simultaneously or maybe it’s a Snow Leopard “feature”.

Andy

Whoa – Dropbox just comes out of nowhere in this article. I have it and use it, but can you clear up how exactly you are using it to update the iTunes XML files?

And I’d love to hear how you do iPhone syncing. Since the contacts, calendars, photos are not included in the iTunes Library, how is it possible to sync from any computer on the network as you say?

Jay

I must be doing something wrong cause when I get to the section:
“Navigate to the iTunes music folder we just shared from the host computer” I can’t see it in the list!

Ricki

Beware!

I have been running a setup up where 3 computers and an AppleTv is using the same library situated on a network drive.
My girlfriend, the AppleTv and me accidently tried writing to library at the same time. It messed up the entire disks index file and only disk warrior could save it.

It sucks, sucks, sucks that we can not easily maintain a shared library in the same household without breaking the DRM…..so darling who’s 9 Gig music library is allowed to live on the appleTv this week.

Also each week I have to delete a ****load of XML’s called “previous iTunes Library xx-xx-xx” for each time some comp tried writing a new version of the iTunes library.

An iTunes music collection should not be limited to one person. The same way my girlfriend can use my cd’s on the stereo, she should be able to listen to my mp3’s on our mutal computer/appletv.

Sorry about the rant, just bought noteburner and plan to free our music!

Brian

I’m running Boot Camp on my MacBook Pro with Windows XP- Is there a way that I can access and run iTunes on the XP side with my library from OSX?

Jenny Kortina

Yeah you can store your library XML file on the LAN too. I originally set it up using DropBox b/c I thought it might merge changes, instead of just overwriting with the newest copy. I’ll make some changes to the article though, thanks.

DJFelix

Very interesting!

Could you just as easily use an iDisk or the local network?

I’m actually quite surprised that Apple hasn’t brought out a device that will let you load all of your music into one central location that can feed your iPod, iPhone, Apple TV, Mac, PC …. Sure you can share your library, but you can’t load music onto your iPod from a shared library … at least not without 3rd party software.

Tuomo

I have the all my music on an USB disc attached to a Time Capsule. Every few days I copy the “Itunes”-folder of the main (ripping) Mac to all the “client” Macs. IPods will be synced with the main Mac.

f.

I don’t understand why using Dropbox… I have this setup, with the index on the LAN too.

Jose

Is the index format created by iTunes running on a Mac the same as the index created on a Windows Machine? In other words, Can I use an iTunes index created on a Mac to run the Windows Machine iTunes library?

Thanks

Theo

Great timing, I’m about to do the exact same thing.

Why did you choose to use Dropbox, rather than creating a share on the host machine and point all the client machines to use that?

Adam

So why store the music library on your local network, and your index on Dropbox? Why not store everything on your local network?

Comments are closed.