If you’re out of the house a lot but still want access to files on your home computer, one of the best ways to solve that problem involves setting up your computer as a remotely accessible home media server. Here’s a look at how to not only access your files (and control your computer) remotely, but also share files with others, stream music and video, access your photo library, and a whole lot more.
Below we’ll walk through how to turn your home computer into a remote-access media server on Windows, Mac and Linux. When you’re done, you’ll be able to remote control your computer from anywhere (as though you’re sitting in front of it), access any of your files, and stream video, music, and photos to any other computer or nearly any mobile device.
Before we get started, let’s take a look at what you’ll need:
- A computer that’s at least as fast as a netbook or nettop, but faster is better. If you’re simply serving up files, you can even use a Pogoplug.
- A reasonably fast upstream internet connection
- A router with port forwarding capabilities (which is basically any router)
- Some software, which will vary by platform and we’ll discuss in each section
Once you’ve got all of those things together you’re ready to get started. First, we’re going to take a look at the basic features you’ll want on your media server. After that we’ll take a look at the fancier stuff, like streaming your video and music, hosting your photos, and a few more handy things that’ll make your server really great.
Screen Sharing and Basic File Access
While a lot of the fancier stuff we’re going to look at it is what you’ll probably use more often, you want to make sure you have complete and total access to your server from afar. Setting up remote control, or screen sharing, means you can control your home computer remotely from nearly any device — like you’re sitting in front of your computer. This will allow you to tweak your system, start a download, or do whatever you need. Often times services won’t work perfectly or you’ll have various problems you’ll need to solve, and most of those issues can be solved via SSH or through screen sharing (VNC). You’ll also want to have basic access to your files, so we’ll look at setting up FTP (and other protocols) as well as setting up your router so remote access is easy.
Some sharing services are available in Windows by default and all you really have to do is turn them on. Others will require a few downloads. Either way, setting up basic file access and screen sharing is pretty easy to do in most cases. Here’s how:
VNC (Screen Sharing)
While Windows automatically has RDP (Remote Desktop Protocol) ready to go, we like VNC because it’s a platform-independent protocol, meaning it’s more compatible with other operating systems. While there are plenty of VNC servers for Windows that you can choose from, we like TightVNC because it’s pretty straightforward and completely free to use. If you understand the basics of VNC servers and clients, then you can skip that read and just get started. Here are the steps to get VNC set up:
- Download TightVNC, install it, and launch it. (Note: If you want to install it as a service so you can run it even when no user is logged in, choose Start Menu —> Programs —> TightVNC —> Administration —> Install VNC Service.)
- Once TightVNC is open, it will allow you to connect over VNC and log in as any user already set up in Windows. If you’d like a global password, however, you can enable that by choosing Start —> Programs —> TightVNC —> Administration —> Show Default Settings and entering a default password of your choice.
- When you want to connect to your VNC server from another machine, you can do so by installing TightVNC, opening the TightVNC Viewer application, and entering the IP address of the machine to which you want to connect. (For information on other TightVNC features and how to use them, check out the TightVNC user guide).
Note: You can secure your VNC connection with Hamachi to encrypt your remote screen sharing session so prying eyes can’t see what you’re doing.
File Access with FTP, SFTP and SSH
Next we need to add file sharing. First let’s start with FTP. While you can enable FTP as a service in Windows, this has become increasingly more complex in Windows 7 and Vista so we’re going to use a free tool called freeFTPd. Also, if you want to set up SSH to connect to your computer remotely over SSH and use SFTP (Secure FTP) for added security, the same site has a free SSH server called freeSSHd that you can download as well.
- Download and install the server software you want, and choose to run freeSSHd/freeFTPd as a system service so you don’t need to be logged in to access them.
- Once these tools are installed, launch them and you’ll be able to access them from your system tray. Right click the system tray icon and choose Settings.
- In the Settings panel, you’ll be presented with a lot of tabs but the one you want first is Users. Click it, and then click Add to add a user.
- Enter a username and password for the user you want to add and tick the box next to Shell. If you’re setting up freeSSHd and want to be able to use SFTP, be sure to tick the box beside SFTP. When you’re done, click OK.
- If you want to access your files over FTP or SFTP remotely, you’ll need an application that supports those protocols. Our current favourite is Cyberduck. To connect to your server remotely via SSH, you’ll need an SSH client. For Windows, we like PuTTY.
File Access with Windows File Sharing (SMB)
Of all the ways to remotely access your files, SMB is the easiest to set up. Chances are you actually enabled file sharing when you installed Windows. If not, here’s how to do it (on Windows 7/Vista):
- Locate the folder you want to share and right click on it. Choose Share With: Specific People
- Choose Everyone from the drop-down menu and then click the Add button.
- Unless you want read-only access, click Read and change it to Read/Write.
- Click the Share button to enable sharing for that folder.
That’s all you have to do to enable these basic sharing services on your Windows PC, but doing so will only allow you to access them from other computers on your local home network. If you want to be able to access your machines remotely when you’re away from home, you’ll need to forward ports on your router or set up a VPN (Virtual Private Network). We’ll discuss this later in the Configuring Your Router section towards the end, but first we’re going to look at the more exciting options you have for streaming and sharing your media files.
Setting up any sort of remote access on Mac OS X is very easy and doesn’t involve much more than ticking boxes. Here’s what you need to do:
- Open System Preferences (you’ll find it in the Applications folder on your hard drive).
- Under Internet & Wireless, choose Sharing.
- On the left side you should see a list of services. First things first, tick the box next to Screen Sharing, then click Computer Settings and tick the box labelled VNC viewers may control screen with password and enter a password of your choice. When you’re done, click OK and you’ll be all set.
- Next we need to enable file sharing of some kind. Regardless of how you’d like to share your files, you need to tick the File Sharing checkbox and click the Options button. This will bring up a panel that will let you choose different ways to share your files. By default, AFP (Apple Filing Protocol) will be enabled. You can also enable FTP, which is the most compatible way to access your files from practically any computer (but not necessarily the most secure) and SMB (Server Message Block, which is more compatible with Windows and Linux than AFP). SMB needs to be enabled on a per-user basis, so make sure you tick the box beside your username — and any other users you want to have access — before clicking the Done button to save your preferences.
- If you’d like a more secure way to access your computer and files than FTP provides, you can tick the box beside Remote Login to enable SSH. This will let you access your computer through the command line using SSH, which will provide you with remote control over just about everything, and also let you access your files using SFTP (Secure FTP).
- Lastly, if you’d like to enable any additional sharing services you should do so now. Be sure to note what they are as you’ll need to forward the ports on your router for those services later.
The instructions above apply to Mac OS X 10.6 and may differ between major versions of the operating system. For example, Screen Sharing is only available in 10.5 and above. In the past, enabling VNC was handled under the Apple Remote Desktop section. In addition to checking the Apple Remote Desktop checkbox, you also needed to click the Access Privileges button, check the “VNC viewers may control screen with password”, and enter your VNC password. If you’re using an older version of Mac OS X (such as 10.4), please use these instructions to enable VNC instead.
That’s all you have to do to enable these basic sharing services on your Mac, but doing so will only allow you to access them from other computers on your local home network. If you want to be able to access your machines remotely when you’re away from home, you’ll need to forward ports on your router or set up a VPN (Virtual Private Network). We’ll discuss this later in the Configuring Your Router section towards the end, but first we’re going to look at the more exciting options you have for streaming and sharing your media files.
If you’re running Linux, chances are you already know how to set up all these basic file-sharing services. Setup also differs between the different flavours of Linux. For these reasons, we’re not going to provide detailed steps for Linux in this post. If you’re new to Linux and do need some help, however, be sure to check out our night school lessons on getting started with Linux (in particular, the installing apps lesson).
BONUS! You can disable sleep on your media server if you’d like, but if you want to conserve some power and let it turn off once in a while you can set it up to wake on LAN. How do you do this? Check out our Wake on LAN How-to.
Streaming and Sharing Media
There are many, many ways to access your media remotely, but Libox is a free tool that’s compatible with just about everything from desktop computers to iDevices to just about anything with a web browser. Also, to repeat, it’s free. Installing it will not only let you stream your videos, music, and photos to your devices, but you can use Libox to remotely share media with your friends as well. Here’s how to set it up:
- Visit Libox.com to sign up for an account and download the Libox server software.
- Install Libox on your home media server.
- Launch Libox and click the Add Media button in the app to start adding your music, photos, and videos. Give Libox some time to do its thing and soon you’ll start to see your media popping up in the Libox application.
- If you want to access your media from other machines, you can do so easily by installing the Libox desktop application and running it on your local machine. When you sign in, all of your media will be available. Alternatively, you can just visit Libox.com on your computer or mobile device. If you have an iDevice, you can pick up Libox for iOS. It’s a universal app and will run on your iPhone, iPad, and iPod touch.
Libox isn’t the only way to remotely view and share your media. While it’s pretty great — especially for a free app — there are some alternatives you may want to explore. For example, Opera Unite is a feature of the Opera web browser and an easy way to share your media. It handles your photos, music, and video. You can even share your webcam and host a web server. While Libox is great, a lot of people prefer Opera Unite for its additional features and an extension of the browser they already love. Both are worth checking out.
For some additional options for all platforms, be sure to check out our guide to the best tools for streaming media to your gadgets and the AirPlay-alternative guide to streaming your media.
While AirVideo has long been our favourite desktop-to-iOS video streaming option, StreamToMe has become my top choice for a couple of reasons. First, it allows you to stream your media to Macs as well as iOS devices (and Mac to Mac streaming costs you nothing). Second, you’re able to stream audio as well as video. While it has the occasional hiccup you’ll find with just about any media streaming application, it works phenomenally well regardless of your connection speed. If you’re Apple-centric, you’ll want to consider using StreamToMe instead of Libox.
Configuring Your Router
If you’ve made it this far, you’ve managed to set up your home media server for local access. If you want to access it remotely, however, you’re going to need to either set up a virtual private network (VPN) or set up port forwarding on your router. Setting up a VPN is more secure but also a much more in-depth process. It’s also a bit slower so you’re at a disadvantage when serving up large amounts of data, so you may want to set it up but also forward some ports for certain things. If you do want to set up VPN, check out this guide for help with the entire process. If you (also) want to forward ports on your router, here’s what you need to do:
- First things first, you need to visit your router’s admin page. The address of this page will depend on your router. For example, Linksys routers house their admin page at 192.168.1.1, whereas D-Link routers use 192.168.0.1. Apple AirPort routers have no web interface and need to be configured from the AirPort Utility application. Consult your router’s manual if you don’t know its IP address. There are plenty of other ways to locate this information, such as checking your network information in your OS’ relevant control panel or running
ifconfig(Mac/Linux), so feel free to locate your router’s local IP address however you’d like.
- Once you’ve found the IP address, enter it into your web browser (e.g. http://192.168.1.1). This will load the admin page. Your router may have a default username and/or password set (often it’s admin) so enter that if needed (and check your manual if you don’t know it).
- Now that you have access to your router’s admin page, you need to locate the port forwarding section. Router manufacturers like to hide these settings in varying places and sometimes those places are kind of strange. Linksys, for example, often places it in Applications and Gaming (and lists it as Port Range Forward). In custom firmware DD-WRT, it’s under NAT/QoS. You can often find out where these settings live by searching for the name of your router and port forwarding if you don’t want to dig through the user manual for the information. Once you know where your router’s port forwarding section is, click it.
- If you’ve made it this far, you’re in luck. The next steps are easier to explain as setting up port forwarding is pretty much the same on most routers. Usually you’ll see an Application field where you can type a name of the service you’re configuring. For example, if you’re setting up FTP you’ll type in FTP (and perhaps the name of the server, if you want to be sure you remember which server it is).
- Next, enter the port you want to forward. In the case of FTP it’s 21. In the case of SFTP/SSH, it’s 22. (We’ll go over all the ports later.) Some routers will ask for the starting and ending ports. If you’re forwarding both 21 and 22 your starting port can be 21 and your ending port 22. If you’re only forwarding one port, these numbers should be the same.
- Next you need to set the protocol. By default Both will be selected (meaning both TCP and UDP), but you generally do not need to open the port over UDP in most cases. Unless you’re explicitly running FTP over UDP, you can set the protocol to TCP. With SSH, you may want to open it on both as there are some cases where SSH will use UDP. If you always want to cover your bases, Both is a good choice. It just means you may be opening ports unnecessarily.
- In the IP Address field, enter the IP address of your home media server. You can find this by running
ifconfig(Mac/Linux) or in your network settings. Whatever it is, it’ll almost always have the first three numbers as your router’s IP (e.g. 192.168.1.x). This is the IP address you want to use because it belongs to the computer to which you want these ports to forward.
- Some routers won’t just ask for a port range or single port to forward, but rather a Port from and a Port to. When this is the case, the Port from means the the port you’ll use when connecting to your home server remotely. In other words, it’s the port that’s open to the world on your router. Port to, on the other hand, refers to the port on your server. Why is there this distinction? Let’s say you have to computers and you want to be able to remotely connect to them via VNC. VNC, by default, uses port 5900. If you open port 5900 and forward it to one computer, the other computer can’t also use that port. What you do in this case is use port 5900 for the first computer (which means the Port from is 5900 and the Port to is 5900 as well) and some other unused port, like 5901, for the second computer (which means that the Port from is 5901 and Port from is still 5900).
- Lastly, tick the box next to Enable to, of course, enable the port forwarding rule you’ve just created. This seems like an obvious step, but it’s a very easy step to miss.
That’s the process for enabling port forwarding, and you’ll need to add new port forwarding rules for each port you want to forward. Of course, you need to actually know the ports you want to forward in order to forward them. To save you some time, here are the ports for the services we discussed (and a few extras you might need):
- FTP: 21 (TCP)
- SSH/SFTP: 22 (TCP, but UDP on rare occasions), and sometimes 115 for SFTP (TCP)
- HTTP (for hosting a web server): 80 (TCP)
- SMB: 139
- Printer Sharing (LPR and LPD): 515 (TCP)
- AFP: 548 (TCP)
- RTSP (Streaming Servers): 554 (TCP and UDP)
- NFS: 2049 (TCP and UDP)
- VNC: 5900 (TCP)
Once you’ve got your port forwarding rules defined for all the ports you want to use, save everything. Depending on your router it may need to reboot, but once it’s done you should be good to go.
There are tons of awesome things to add to a media server and there’s no way to cover them all in this post. If you’ve got some suggestions for other things you think belong in an ultimate remote access server, share ’em in the comments.
Republished from Lifehacker