Filed under: Software, Productivity, Tips and tricks, iTunes
How To: keep your iTunes library on an external hard drive
For more helpful how-to guides, check out the TUAW Tips, iPhone 101 and Mac 101 topics.
After discussing how my iTunes library is set up with a few readers in the comments on my First Impressions/2G iPod nano post, I figured this might be a handy tip for readers who find themselves running out of room to store an expanding iTunes library. My only machine is a MacBook Pro with a 120GB hard drive, but after installing ~ 40GB of the entire Final Cut Studio suite and other various software and projects, I don't have room for my ~ 35GB iTunes library.
I decided to do some experimenting a couple weeks back with moving and keeping my library on an external hard drive. There are obvious initial disadvantages to this, but after some tinkering and getting comfortable with iTunes' baked-in library management genius, this can be a pretty useful setup for those who, like me, are cramped for space but aren't willing to trash those albums you're too embarrassed use in a Party Shuffle playlist. This setup also has the inherent, and obvious, advantage of keeping your library on an external hard drive, so it's more or less already backed up - though I, with my paranoid data habits, keep a backup of my library on a second hard drive, and I now also use Scott's iTunes 7 backup tip (instead of a previous Smart Playlist system) to burn my library to DVDs (the lesson from someone who knows: your data can never be too backed up - ever).
Getting back on topic: read on for a walkthrough (from a very mobile notebook user) of how to move your iTunes library to an external hard drive. I'll include some tips on how iTunes is already one step ahead of this setup, as well as a few habits you might need to adopt when living la vida external-iTunes-library.
The Setup
This isn't very difficult, but for those who aren't familiar with looking under iTunes' hood, I figured I'd lay this out and start from square one to make sure everyone can play along.

The one initial catch with running your iTunes library from an external drive is that you'll need a FireWire or USB2 drive for best performance; I have no idea how well this setup would perform on older machines with USB1, or if it would even work at all.
Now, if you're like most iTunes users, your library of music and movies (and now games) is stored locally on your Mac in ~/Music/iTunes/ (where ~ is your Home folder). With the latest iTunes 7 update, there are now (typically) two folders and two files in here (pictured above):
- Album Artwork folder (new with iTunes 7; missing from iTunes 6 and previous versions)
- iTunes Library (a database file iTunes needs)
- iTunes Music folder (this is where all your actual media like songs, podcasts, movies, and games live)
- iTunes Music Library (an XML library file iTunes also needs)
- if iTunes is running, quit it
- The only part of your iTunes folder you actually should move to the external hard drive is the iTunes Music folder (the one that holds all your media) itself; leave the Album Arwork folder, as well as the iTunes Library and iTunes Music Library files in place, locally on your Mac. Of course, if you want to back up your iTunes library for safe keeping (which I highly recommend, and again: Scott's iTunes 7 backup walkthrough is a great way to do it), including all your metadata, song ratings, song comments, etc., you should back up these local files in addition to your media
The Configuration
Fortunately, telling iTunes where its library now lives is a one-step process.

Go into iTunes' Preferences > Advanced pane, and click on the General tab. At the top of this tab is a record of where your library - your actual media - resides and, as you might guess, you can click the 'Change...' button to tell iTunes it's hopped the pond to external hard drive pastures. You simply need to browse through the Finder dialog and select your media library, wherever you put it, and click OK. That's it - iTunes writes the necessary changes to those aforementioned local database and XML library files, and you don't have to do any more heavy lifting. As long as your drive is still mounted and running, you can start playing your media just like before.
Unfortunately though, now that you're enjoying external iTunes library bliss, it's time to burst your bubble with a few gotchas to look out for. It's certainly possible to keep on trucking with this kind of setup (otherwise this would be a pretty useless post), but there are definitely some constraints to consider when going down this road.
The Gotchas
The most significant catch is, of course, the fact that if you ever disconnect your drive - perhaps you're a mobile notebook user like myself - you obviously can't play any of your media in iTunes. Unless you own an iPod and enable the setting to manage its music yourself, you're pretty much out of luck here.
As you might expect, this also means that managing an iPod with this setup can get quirky too. If you sync your iPod with iTunes, and you connect it while your library is unplugged, iTunes will freak out and, after a few moments, warn you that it can't update your iPod because none of your media is present. However: this doesn't remove any music from your iPod, and your iTunes media will be playable once you connect your drive again. A lot of those 'file not found' exclamation points will appear next to your songs in the iTunes media list after a scenario like this, but don't panic: once you reconnect your drive (and/or restart iTunes; that one's up to you), all your media will play and sync just fine again. I've tested this with both a 5G iPod and a nano.
If you want to be able to plug in your iPod and exchange files and folders without iTunes automatically starting (and potentially bringing up the aforementioned quirks), uncheck the 'start iTunes automatically when this iPod is connected' option. This way iTunes only starts when you're good and ready to interact with your media and/or your iPod. These might not be easy habits to develop if you're used to iTunes running the show for you, but they're most likely necessary if you've read this far into the post and you're still interested in living the external library lifestyle.
But what happens if I import media, download podcasts or buy something from the iTunes Store?
This is one of the many areas where I must tip my hat to Apple's engineers, for they really knocked one out of the park when it comes to this situation.

Ever wonder what the Advanced > Consolidate Library menu option does? Well, it was made for just such a setup as your new external iTunes library. If your drive isn't connected when you start iTunes and, for example, import a CD or download a subscribed podcast, iTunes needs to put it somewhere, and it defaults to placing that media in your local ~/Music/iTunes/iTunes Music/ folder. "But TUAW, this is going to turn my library into a mess!" you exclaim from atop your desk chair. Fear not, intrepid reader, for the Advanced > Consolidate Library command is to the rescue! This ingenious command tells iTunes to copy any media it's imported to the local default media folder over to your recently customized external folder - once it's reconnected, of course. This is beautiful, because it's a two-click process to move all that new media over with the rest of your library and organize it properly, defusing a potentially complicated library mess.
However, a fortunate perk of iTunes' ability to have a split library personality is its ability to update an iPod with a new podcast or recently imported album while you're out 'n about, sans-external library drive. This has the potential to get confusing though, so for the sake of your organizational sanity, I hope you don't need your new podcast episode fix too often while you're on the go.
Finally, as far as reuniting your libraries is concerned, it seems that iTunes copies your new media files over to the drive when consolidating, instead of moving them. Every so often after you run this option, it might be a good idea to dig into your local iTunes Music folder and trash all those files, as they're just dead weight after a consolidation.
Be one with your external iTunes Library, young Padawan
This should be just about everything you need to cut the chord on your iTunes library if you're looking to save space on your Mac, or if you're simply a nut for using external hard drives. I've been poking around at this setup for about a month now, and I've been pretty happy with it. Aside from the catches I mentioned to watch out for, I was able to save almost 35GB of space on my MacBook Pro and make way for other projects, with room to spare. As always with feature posts like this, I'll try to answer any questions you may have in the comments. Enjoy!

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 4)
Scott said 9:41AM on 9-19-2006
one big Gotcha I run into with this setup (I use an external FW drive) is that iTunes crashes if I try to copy a large amount of data at once to my iPod - I've got 40gig of music on my iPod and drive, had to copy it over about 200 songs at a time to avoid crashing (17" iMac, 60gig video iPod, iTunes 5 and 6 at least, haven't tried 7 with more than 200 songs yet)
Reply
Fred said 9:50AM on 9-19-2006
I still don't understand why movies and TV shows purchased from the iTunes Stores are in the "Music" folder? Why can't Apple have them be automatically placed in the "Movies" folder? where you think they would belong.
Reply
Jordan said 9:53AM on 9-19-2006
I've created a really simple automator script called 'externaltunes' that will pop up a warning asking if your drive is connected before loading up itunes. I find it very handy as I am often forgetting to do it....
Reply
Scott (but a different one) said 10:00AM on 9-19-2006
FYI, this set-up has (a) worked at least since iTunes 6 and (b) Works great with a server volume. In fact, there's a genius hidden feature to it:
I keep all my music on a Mac Mini server that's hooked up to my stereo. I have my PowerBook's iTunes pointed to the iTunes Music folder on the server, just like the way this tip has it on an external volume. I ALSO have a small sub-set of my music on the PowerBook.
When I have the server volume mounted on the PB before I launch iTunes, it can play everything on the server. When the server is missing (this is the genius part) it falls back to my local iTunes Music folder, giving me the exclamation marks for the songs that are missing. As in the hint, syncing iPods on-the-go works fine - items with the exclamation mark in iTunes are NOT deleted from the iPod.
This way, I can have all my music at home, some music when I travel, and can keep updating podcasts on the iPod as I travel without losing the music that isn't on the PB.
I gather iTunes 7 will now allow me to chose which library database I use at start-up by holding down Option, but I haven't tried that one yet.
Reply
BoyJoshua said 10:04AM on 9-19-2006
I have done this for some time and love it for many reasons. I have a Macbook Pro that I travel with and lounge about my house with. In my home office, I have a ppc mac mini with two 250gb external drives. One for backup and one for my iTunes library. With this drive shared, I can use my iTunes from any machine in my house as well as a wireless Roku system plugged into my home stereo(sharing from itumes for this).
When I am at work, as was mentioned in your article, I am without my tunes on my MBP. I have an ipod, but some times forget it(getting old :) ). I setup a old windows machine, installed a program called VibeStream and configured my router and I can now stream my whole itunes library anywhere I can get a internet connection. If you have an old pc laying around, I highly recommended it. Depending on your bandwidth, you can setup accounts for friends as well. I can choose from anything in my library and play it at will. No need to pre-setup playlists.
To help with my music library(190gb), I used multitunes prior to v7 of iTunes. This allowed me to seperate my libraries into Rock, Jazz, Classical, etc. With this now built in along with the cover importing, I am in heaven!
Reply
Fred said 10:07AM on 9-19-2006
Hi Scott but a different one...
Your setup is exactly what I am looking for as I have a MacBook Pro and just bought a Mac mini to act as a server with ALL my Music...just a question: Do you have a setup to automatically mount the mini when your PB joins your home network?
Reply
Stephen Griffith said 10:12AM on 9-19-2006
I bought a LaCie Ethernet Disk mini (250GB) a couple of years ago and connect it directly to my Airport Extreme. This keeps my 30,000 plus song library accessible by wireless. Once a month I attach another hard drive and do a full backup.
Reply
BoyJoshua said 10:15AM on 9-19-2006
Fred - In your account under system settings, you can setup Login Items. I added my shared 250gb drive from the mini. When I logon at home, the drive is mounted automatically for me and I can start up iTunes with all my tunes.
Reply
Mike said 10:21AM on 9-19-2006
I've been running like this since about March, mostly in preparation for switching to a laptop (which still hasn't happened). Initially I had it set up on a LaCie NAS, the entire iTunes folder on there with an alias to it in my Music folder, but I switched to a WD My Book Pro (and that sweet FW800 goodness) two months ago. The advantage to doing it this way is that you can maintain the same library on more than one machine, so any changes made to the library are reflected on both.
Reply
Mr. Grundle said 10:24AM on 9-19-2006
Here's another solution. iTunes looks in ~/Music/iTunes/ for the music folder but it doesn't care if that "iTunes Music" is an alias or not. I've found keeping an alias of the "iTunes Music" folder has several advantages over selecting a new destination in iTunes.
1) All you have to do to move the original is move it. No messing in iTunes.
2) If the original is moved out of your user folder then it is more accessible to other users.
I have both "Music" and "Photos" as aliases in my User folder and I have the originals on an external drive. This means that my wife, or any other user, can open iTunes or iPhoto and see the same songs and photos I do. If my wife imports a CD in her account I see it in my account too. If I import photos she sees them in her iPhoto. This prevents us from having two disparate music and photo libraries, thus saving HD space and allowing us to always have the same music and photos.
Expert's Twist: If you use the alias for "Music" in your home directory then you will share playlists as well as songs. If you use the alias for "iTunes Music" in your own ~/Music/iTunes/ directory then you will share music but retain unique playlists.
Small Gotcha: .Mac backup doesn't recognize your music collection this way, but I believe iTunes 7 does.
Reply
MMP said 10:34AM on 9-19-2006
I've been using this setup for a few months but never knew about the consolidate library option. Great tip. Thanks.
Reply
JCS said 10:39AM on 9-19-2006
Great post...
I have been keeping my 90gig iTunes library on an external drive since early in 2004 and am using it with USB1 and a 3G 40gig iPod... so older models - fret not - this is a great system and works well even with older machines.
Reply
bryan said 10:49AM on 9-19-2006
I wouldnt say it was semi backed up or backed up at all, the mechanics on an external disk or just as likely to fail as a an internal disk. Backing up means you have the data in more than one place, with this solution you still have the data in one area.
still a good tip, defo going to try this as my girlfriend and i have seperate mac accounts but wanna share the same music. can this also be done with iPhoto?
Reply
artist-illustrator said 10:55AM on 9-19-2006
ive been doing this ever since my G4 iMacs 80 Gig HD got a bit full with my 45 Gig music collection. once i did it my Mac felt like it had a huge weight lifted of its back, it moved a lot quicker. BTW. First started with iTunes 5
oh. and thanks for the "Advanced > Consolidate Library menu option" tip. every few months ive been doing it manualy with all the rouge mp3's that end up in the default Music folder
Reply
peter royal said 11:14AM on 9-19-2006
i recently moved my library to an external drive (and using an ipod as my method of portability..) i blogged about the process and some of the details i went through, which kinda compliments your how-to as well.
http://osi.fotap.org/2006/05/07/itunes-lots-of-music-a-big-ipod-and-a-laptop/
Reply
Alex said 11:22AM on 9-19-2006
Does anyone have any advice on how to do this or better yet, how to keep one physical music library while accessing it from two machines (desktop and laptop), with one quirk--the desktop (which houses the music) is Win XP.
It's actually a Win Media Center pc which gives media center/media player access to the same music to be played in media center. I also connect the ipod to that computer. At the same time it gives my MBP access to the music over bonjour while at the house. The biggest problem is editing id3 tags on the MCE machine hooked up to a big tv, something I'd rather somehow do on the MBP.
Any ideas, anyone???
Reply
Mark said 11:33AM on 9-19-2006
I did this a dew days ago and it's working great.
Two questions though, I consolidated two libraries that overlapped. (1) Does anyone know of a fast way to delete duplicate tracks? I ended up searching for '1.m' and that seemed to get most of the duplicated files (the file system ads a #1 to the end of the track and then the '.m' is the begining of either .mp3 or .m4a.
(2) Once I remove the duplicate files, is there any simple (or automated) way of deleting missing tracks from the iTunes library. I found a script on the apple website, but it didn't work.
Thanks
Reply
Ric said 11:34AM on 9-19-2006
I don't know it takes less time setting up iTunes on an external drive than reading this article on how to do it. Plus it's easier to just use Libra (http://homepage.mac.com/sroy/libra/). Setup two libraries one internal, one external. I keep a few lossy files on my MacBook and my lossless files on an external drive. Either can sync based on which is active. If I forget to turn on my external it defaults to the local.
Reply
Ganza said 11:35AM on 9-19-2006
Pleeeeeease get rid of that annoying mosquito ad. It is driving me insane!
Reply
pt Latrine said 11:37AM on 9-19-2006
What about multi user? Can I share this new remote library with other user on other computer... for instance me and my wife we have a macbook each one and we want to share this library..,.
I have tried it on a local machine with two users but itunes stoped working on the second account.
On Iphoto I was able to to this perfectly. and now we both have control over the library, so every time one of us connects the camera to the mac, even in two separate accounts we are updating the others library too.
Reply