Accessing your Plex Media Server when not home
At home I have a nice setup with a Mac Mini as “Media/TV” client and a homemade Ubuntu NAS Server hosting media files to the client. A while back I discovered Plex. Plex is a great application for organizing media files and viewing them. For more information about Plex see Plex Homepage
The setup I use at home is:
- Ubuntu NAS server – is running the Plex Media Server for Linux serving media to all my clients
- Mac Mini Media Client – connected to the TV and running Plex Client
- A MacBook Pro – where the Plex Client is installed
- I also have an iPad and an iPhone running the Plex iOS client
Everything works fine when I’m connected on the same network as the Plex Media Server, but sometimes I’m traveling and still wants access to my media. After a bit of searching I found a perfect solution.
I found the solution here on the plex wiki.
By simply issuing two command line commands I’m able to access my home media from wherever I am.
The commands are:
dns-sd -R PMS _plexmediasvr._tcp . 32400 & ssh -N -L 32400:localhost:32400 x.x.x.x -l username -p 22
These two line does the following:
- The dns-sd command adds a dns entry to the local domain on the port which Plex searches
- The ssh line opens a connection to your server, running Plex Media Server, over ssh and tunneling the previously add port to that computer
For a more detailed description of the commands see the Plex Wiki.