Using Remote File Access to Save Disk Space on Your MacBook Air
From Mac Guides
- This article or section is based on a forum post written by clayj.
Compared to other current notebooks, the early 2008 MacBook Air (MBA) has a relatively small hard drive: Either an 80 GB conventional hard drive, or a 64 GB solid state drive (SSD) with a formatted capacity of 55 GB.
One possible solution to the issue of not having enough hard drive space available to store all of your files is to store them on another machine which has a larger hard drive (or drives), and then to connect to that machine from your MacBook Air. This guide explains how to do this in both local (on the same network) and remote (when your MBA is on a different network, away from home) configurations.
Before You Begin
If you haven't already seen it, you may want to look through Complete Steps to Perform a Clean OS X Reinstall on Your MacBook Air, which contains steps that will allow you to reclaim up to 8 GB of hard drive space by performing a clean installation of Mac OS X.
On Your Home Network
When you're at home, on the same network, this is easy: you simply set up File Sharing on your server and then create a connection to it from your MBA.
Once you've done that, you can do things like change the iTunes Music folder location in iTunes on your MBA so that it points to the music files on the server, and then use Add To Library to add the music files, which reside on the server, into iTunes. What you end up with is the iTunes Music Library.xml and iTunes Library files on your MBA (the combined size of these two files should be no more than 100 MB), but the music files stay on the server. Using this method, you can save yourself many gigabytes of disk space on your MBA.
The same trick can obviously be used for documents, photos, etc. The bigger the files you can keep on the server and off the MBA, the better! You just need to make sure that your MBA and your server can talk to each other, preferably via WiFi, and make sure that your files on the server are easily found (e.g., don't bury them too deep in folder structures).
Away From Your Home Network (Secure)
When you leave your home, though, things get trickier. How can your MBA talk to your server if they're not on the same network?
One option is Back To My Mac (BTMM), one of the features in the current release of .Mac. BTMM claims to be an easy way for your two Macs to talk to each other; however, it cannot always be used. Beyond the fact that you have to pay $100 a year for a .Mac subscription, the biggest issue is that your network routers at both ends (i.e., where your server is and where your MBA is) both have to support UPnP (Universal Plug and Play) or NAT-PMP, and they must be correctly configured to allow you to use one of those two technologies. If you find yourself in a hotel or a public WiFi spot where neither of those protocols is in use or where they're using an unsupported router, your BTMM is suddenly unusable.
There is an alternative to BTMM which (1) is free and (2) only requires changes on your home router. Basically, if you open a specific port on your router and forward that port to your server, you can get to the server from anywhere you can access the Internet with your MBA. Here are the basics:
- On your router, configure port 548 to forward to port 548 of the internal IP address of your Mac server (a Mac Pro, iMac, Mac mini, or some other Mac that's always home and on) for both TCP and UDP. For example, your Mac server might have an IP address like 192.168.1.1. (NOTE: The steps to set up port forwarding vary from router to router. Please consult your router's documentation to see how to set this up.)
- On your Mac server, go into System Preferences > Sharing and make sure that File Sharing is turned ON. Also, click Options under File Sharing, and make sure that "Share files and folders using AFP" is turned ON, and make sure the list of users includes YOUR account with Read & Write access.
IMPORTANT!: You also need to set the access for "Everyone" to "No Access". If you fail to do this, someone might potentially be able to access your server's files simply by directing their Mac to connect to yours. The only account(s) that should be permitted access are "name" accounts (your name and other accounts you specifically created).
- You will need to know your home network's external IP address: This is the IP address that's assigned to your home by your cable company or ISP. You can usually get this IP address from your router's control panel, or by going to http://checkip.dyndns.org. (Before you ask: Your external IP address does NOT start with "192.168". It will be something totally different.)
NOTE: You could also install a Dynamic DNS client on your Mac and use it to associate a domain name like "www.myhomedomain.com" to your external IP address. This costs a little each year, but it eliminates the need for you to have to fiddle with IP addresses, especially if they ever change. You can get a Dynamic DNS client here: http://www.dyndns.com/support/clients/mac.html.
That's all you have to do at home. When you're on the road, you can connect your MBA to your home Mac server using these steps:
- In Finder, choose Go > Connect To Server.
- In the Server Address box, type your home system's external IP address. For example, "18.104.22.168". Or, if you have a domain name that points to your home system, you can type that. For example, "www.myhomedomain.com".
- Click Connect. A password prompt dialog box will appear and ask you for your name and password. Select "Registered User", and then enter your user name and password from your Mac server. If you want, you can check the box for "Remember this password in my keychain".
- Click Connect. You will see a list of all of the shares on your Mac server.
- Select the share(s) you want to connect to, and click OK.
Voilà! You are now connected to your home Mac server from your MBA. You can access files, copy files back and forth between your MBA and your server, delete files, whatever you want, as long as your MBA remains network-connected. The next time you go to connect, it should go even more quickly (especially if you save your password in your keychain, and if you add your home IP address/domain name to your list of Favorite Servers in the Connect dialog box).
Away From Your Home Network (More Secure)
The steps for this method are identical to the steps used by the Secure method, above, with two exceptions:
- On your router, configure a port number that you choose (for example, 5678 -- it is recommended that you use a high port number to prevent conflicts) to forward to port 548 of the internal IP address of your Mac server (a Mac Pro, iMac, Mac mini, or some other Mac that's always home and on) for both TCP and UDP. For example, your Mac server might have an IP address like 192.168.1.1. (NOTE: The steps to set up port forwarding vary from router to router. Please consult your router's documentation to see how to set this up.)
- In the Server Address box, type your home system's external IP address, plus a colon and the port number you specified in step 1. For example, "22.214.171.124:5678". Or, if you have a domain name that points to your home system, you can type that, plus a colon and the port number you specified in step 1. For example, "www.myhomedomain.com:5678".
Setting your router to perform port forwarding in this manner, rather than just relying on the home server's login security, provides an additional layer of security that will prevent unauthorized users from accessing your home server; not only would they have to know your user name and password from your home server and your home server's IP address or domain name, but they would also have to know what port number to use, not just the default 548 port number. If they can't even guess the right port number, they don't even get a chance to try your user name and password.
If You Have a Time Capsule or an AirPort Extreme Base Station with Shared USB Hard Drive
If you have either a Time Capsule (which is basically an AirPort Extreme Base Station with a built-in 500 GB or 1 TB hard drive) or an AirPort Extreme Base Station (AEBS) with an attached USB hard drive, you can share out the Time Capsule/AEBS hard drive and make it accessible via the Internet. To do this:
- Start the Airport Utility.
- Select your Time Capsule or AEBS. Make a note of the IP Address shown on the right -- you will need it later.
- Click Manual Setup.
- Check your "Connection Sharing" setting under the Internet Tab. The following tutorial is valid if your "Connection Sharing" is to "Share a public IP address", the normal setup for a home network. You will need to have a static IP address, or use a free dynamic DNS service. If you have a different type of "Connection Sharing," you probably don't need a tutorial to set up remote access to your disk; adapt this one as needed.
- Click Disks (at the top of the dialog box), and then click File Sharing.
- Select (check) the "Enable file sharing" checkbox and the "Share disks over Ethernet WAN port" checkbox. It is strongly recommended that you also set Secure Shared Disks to "With base station password" and Guest Access to "Not allowed"; not making these changes may allow unauthorized users to access your Time Capsule/AEBS hard drive.
- Click Airport (at the top of the dialog box), and then click Base Station.
- Enter a Base Station Password and verify it in the Verify Password box.
- Click Advanced (at the top of the dialog box), and then click Port Mapping.
- Click the plus sign (+) to add a new port mapping.
- In the Public UDP Port(s) and Public TCP Port(s) boxes, type in a 4-digit port number (e.g., 5678) that you choose. In the Private IP Address box, type the internal IP address of your Time Capsule or AEBS that you wrote down in step 2 (for example, 192.168.0.1). In the Private UDP Port(s) and Private TCP Port(s) boxes, type 548. Click Continue.
- In the Description box, type a descriptive name like "Time Capsule File Sharing" or "AEBS File Sharing". Then, click Done.
- When you have made all changes, click Update.
Your Time Capsule/AEBS will restart. Once it does, you are now ready to connect to the Time Capsule/AEBS hard drive via the Internet. To do this when your MBA is away from home:
- In the Finder, click Go > Connect to Server.
- Type in the correct domain name or external IP address for your network, plus a colon and the port number you specified in step 11. For example, "www.myhomedomain.com:5678" or "126.96.36.199:5678".
- Click Connect.
- You will be prompted for your user name and password. The user name can be anything you like; the password should be the password for the Time Capsule/AEBS which you specified above.
- Click Connect.
Voilà! You are now connected to your Time Capsule/AEBS hard drive from your MBA. You can access files, copy files back and forth between your MBA and the hard drive, delete files, whatever you want, as long as your MBA remains network-connected. The next time you go to connect, it should go even more quickly (especially if you save your password in your keychain, and if you add your home IP address/domain name to your list of Favorite Servers in the Connect dialog box).
Note that the Time Capsule/AEBS will appear in the Shared section of your Finder's sidebar as a server, with the Base Station Name of the Time Capsule/AEBS as the server name.
Once Everything Is Set Up
Once the connection is established, it will also work for programs like iTunes. For example, you can connect your MBA to your Mac Pro server through the Internet and then use iTunes to play a song which is stored on the Mac Pro. You can access an entire music collection in this manner. (The only downside of doing this is that file transfers are limited by network speed, which is usually much slower than accessing a hard drive inside the computer you are using. So when you go to another song, it may take a few seconds to transfer the bytes to iTunes on your MBA before the song actually plays. Network hiccups can also be a bother.)
Some applications will still cache files to your local hard drive. For example, iPhoto will cache all imported photos into the iPhoto Library on your MBA's hard drive. You should be aware of this before doing something major like importing thousands of photos.
Applications such as the Microsoft Office products (Word, Excel, PowerPoint) will allow you to edit files across the network and save them where they are already stored. However, Entourage must store its cache files locally (on your MBA).