How to set up an iTunes library on a network-attached server

Free your iTunes media from the shackles of a hard drive on your Mac.

itunes12 macbook

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

If you have a large iTunes library, you may have reached the point where you need to offload some of your media files to another drive. There are several ways you can do this. You can connect an external hard drive to your Mac, and use that to store your iTunes Media folder. If you use an iMac, this is probably the easiest choice. However, if you use a laptop, you may not want the hassle of connecting and disconnecting an external drive whenever you want to use iTunes.

Another option is to use a network attached storage device, or NAS. This is a storage device that your Mac connects to over your network—usually via Wi-Fi, but you can also use Ethernet—and that can give you vastly more storage, especially if your Mac has an internal SSD.

If you use both iTunes and another network device or app—such as Plex, a hi-fi media streamer, or Sonos’ wireless home audio system—you can use the NAS to store media that other devices can access too. You won’t need to ensure that your Mac is always on.

In this article, I’ll discuss how you can set up iTunes to use a NAS, and I’ll point out some issues you need to be aware of to ensure that iTunes works correctly.

Choosing a NAS

There is a plethora of NAS devices available, from simple, single-drive units to larger, multi-drive RAID-capable storage devices. Depending on your needs, you may spend a couple hundred dollars for a simple NAS without drives (you may have some hard drives you can recycle), or much more for a unit with five drives and RAID capabilities. Remember that if you get a simple NAS with a single drive, you still need to consider adding an additional external hard drive to back up the files on the NAS itself.

I recently bought a WD MyCloud Ex2 NAS. This two-bay device is available without drives, selling for around $159, and it allowed me to use two 2TB hard drives I had in a closet, having upgraded another storage device to 4TB drives. (The MyCloud is also available in versions with drives, with capacities from 4TB to 10TB.)

If you’re going to choose a NAS to store your iTunes library, first consider what other way you can use the device. I use one of the hard drives on my NAS for my MacBook’s iTunes library, and the other for Time Machine backups. Many NAS devices support Time Machine backups, so if you want a device for this purpose, check its specs.

The MyCloud, like some other NAS devices, also has an iTunes server feature, which lets you stream music from the device to a computer running iTunes or to an Apple TV. This means that any computer in your house can stream your media files, without the Mac whose library is stored on the NAS running.

Moving your iTunes library

When you’ve chosen your device and set it up, it’s time to move your iTunes library. There are two ways you can do this, and each option has pros and cons.

  • You can move just your media files to the NAS, and keep your iTunes library files on your Mac.
  • You can move all your iTunes files (media and library files) to the NAS.

Move just your media files

In your home folder is a Music folder, and, in that, an iTunes folder. This contains a number of files, such as your actual iTunes library file, and some support files. There’s also an Album Artwork folder (which caches artwork from your media files), and an iTunes Media folder, which contains sub-folders for different types of media: Music, Movies, TV Shows, etc.

itunes folder contents

These are the files in your iTunes folder.

If you move just your media files, then your Mac retains your iTunes library file, as well as some other files; all those in the screenshot above, other than the iTunes Media folder. The advantage to keeping these files on your Mac is that when iTunes updates its library file—which happens any time you make changes to any files in your iTunes library—this process won’t be slowed down by your network. However, if you have a fast Wi-Fi router, such as a recent AirPort Extreme, you shouldn’t notice any lag.

However, if you move just your media files, you must ensure that your NAS (or any external drive) is mounted when iTunes launches. If iTunes doesn’t see that drive, it will search in your Music folder for your media, and won’t find it. It will then switch the location of the media folder in its preferences to that local folder, and copy any new files there. And this gets messy.

If you want to move just the media files, do the following:

  1. Back up all your files; because accidents happen.
  2. Ensure that the NAS is mounted in the Finder.
  3. Create a new folder on the NAS; call it iTunes, or something similar.
  4. Launch iTunes, choose iTunes > Preferences, and then click Advanced.
  5. In the iTunes Media folder location section, click Change.
  6. Navigate to the folder you created in step 2 and click Open, and then click OK.
    itunes media folder location

    Change the location of your iTunes Media folder in the iTunes preferences.

  7. Choose File > Library > Organize Library, and check Consolidate files. This tells iTunes to copy all the media files currently on your Mac to the new location. This may take a while, depending on how many files you have, and how fast your network is. This may mean allowing the copy to run overnight.
    consolidate files

When the copy is finished, you can play music, watch movies, and listen to podcasts from your copy of iTunes as if the content was on your Mac.

One tip for this scenario: when the NAS is mounted in the Finder, open System Preferences > Users & Groups, and click your account. Click Login Items, and drag the NAS volume to that list. This ensures that your Mac mounts the volume when you start up your Mac and log in.

Move your entire iTunes folder

This is a simpler process. Just copy the iTunes folder in your home folder’s Music folder to the NAS. As above, this may take a long time.

The first time you launch iTunes after the move has completed, press the Option key immediately after clicking the iTunes icon. Click Choose Library, and then navigate to the iTunes folder on the NAS. iTunes will then use this library, and, if it’s not available on the network, will alert you. It won’t revert its settings to your local drive.

However, if you have a slow network, you may have issues with searches and you may see a bit of lag when making changes to files or their tags. Also, you need to ensure that not only your media files but your iTunes Library file gets backed up regularly. Leaving the non-media files on your Mac ensures that Time Machine backs them up; putting all these files on the NAS means that you need to set up another backup routine.

What’s next?

Once your iTunes media files (or all your iTunes files) are on the NAS, you use iTunes exactly as before. As long as the NAS is mounted, iTunes uses that library. The only difference you’ll see is when you copy files to your iTunes libraries. You won’t notice much delay with music files, but you’ll definitely see that movies take a lot longer to copy to the NAS over your network.

Syncing to iOS devices will also be slower. Again, you won’t notice this if you’re only syncing some new music, but if you set up a new iOS device, and sync a lot of content, this will take quite a while.

Using a NAS, you can have a large iTunes library accessible from a laptop with a compact SSD, and, as I pointed out earlier, also access that content easily from other hi-fi streaming devices that can read files from a network volume. Just remember to back up your iTunes library on the NAS, especially if you’ve moved all your files to the device. If not, and you lose files, you may have trouble rebuilding your iTunes library and playlists.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon