Plex Media Server is a great way to stream content to multiple different devices in your home. I typically use Plex to stream movies directly to my TV via the Plex app for the Roku which has proven to be an easy and reliable method of streaming content. Plex also has clients available for PC, Mac, Android, Amazon Fire TV, Chromecast, and Samsung TVs.
In the past I ran Plex on a dedicated Linux server but now there is a Plex plugin available for FreeNAS which is much more efficient than running Plex on a separate server. By having Plex on the same physical server as FreeNAS it can stream content much faster since it has direct access to the filesystem.
Last summer I built a Mini ITX NAS server which provides more than enough power for running FreeNAS with ZFS and the Plex Media Server all on one tiny machine.
Installing The Plex Plugin
The Plex Media Server plugin can be installed through the plugins interface in the FreeNAS web GUI. After clicking on the plugins button, select the available tab to see the list of all the available plugins for FreeNAS. Click on plexmediaserver to begin the installation process.
FreeNAS will automatically download and install the latest version of Plex. This process should only take a couple minute to complete.
After the Plex plugin has been installed it will be visible in the list of installed plugins.
Adding Storage to the Plugin Jail
Before starting the Plex server storage must be added to the Plex plugin jail. Since FreeNAS plugins run inside of a jail they are only able to access storage that has been specifically assigned to the plugin jail.
To add storage to the Plex jail click on the jails button at the top of the web interface. Click on the plex jail, “plexmediaserver_1”, expand the storage section then click on add storage.
When adding storage to a plugin jail you will need to set the source and destination mount point. Any ZFS dataset can be used as a source for the jail storage. Clicking the browse button will display a list of existing ZFS datasets on the FreeNAS server.
The destination name can be set to anything you choose but I recommend using something like /media/movies. Be sure to select the last two checkboxes to create the directory (in case it doesn’t exist), and to mount the storage so it becomes visible to Plex.
Starting the Plex Media Server Plugin
Once you are done assigning storage to the plugin jail you can go ahead and start the Plex Media Server plugin. If you add additional storage to the jail you may need to stop, then start the Plex plugin before it will see the new storage.
I’ve found that on a new installation the Plex plugin doesn’t always start on the first attempt. If this happens, or if you see a message about the server exiting with code 11 just attempt to start the plugin again and it should start successfully.
Accessing the Plex Server Web Interface
To access the web interface for the Plex server expand the plugins section on the left side of the web interface and click on PlexMediaServer. You should see the dialog box below that contains a link to the web interface of the Plex server.
You can also access Plex directly by visiting http://192.168.1.X:32400/web/index.html (using the IP address of the Plex jail). The IP address of the jail can be found by clicking on the jail tab in the FreeNAS web interface.
Configuring the Plex Server
The first time you access Plex you will be presented with the initial setup wizard. First you’ll need to either create a Plex account, or sign in with an existing one.
On the basic setup page you can enter a friendly name for the server which is the name that will be displayed when devices are browsing for Plex servers on the network.
Next you can start building your media library within Plex. I like to segregate my content by creating separate sections for movies, music, and pictures. I’ve found that organizing the content makes it much easier to find the media you’re looking for when browsing for content on devices like the Roku or Amazon Fire TV.
When adding a folder you will need to browse to the destination location that was created when assigning storage to the Plex plugin jail. If you’re not seeing any of your media content here then the storage may not have been assigned correctly to the jail.
Also, don’t forget to restart the Plex plugin if you made changes to the assigned storage in the jail.
After assigning media sections the wizard presents the option to install channels. Channels provide a way to stream content directly through Plex. This step is optional and can be skipped if you want to install channels later.
If everything is working properly Plex should start analyzing the content on the NAS and matching up the box art automatically.
Configure the Library to Refresh Automatically
I recommend configuring Plex to automatically refresh the library so you won’t have to perform a manual refresh every time new content is added. This can be configured through the Plex settings (wrench icon) in the web interface.
I also like to set a library refresh to occur automatically every 6 hours. I’ve found that this helps keep the library up to date even new content isn’t automatically detected.
Accessing the Plex Server
At this point you can begin connecting remote devices to the Plex server to stream media. Or you can also stream video directly from the Plex web interface. The myPlex service also allows you to stream content over the internet to devices outside your network such as cell phones and iPads.
Updating the Plex Plugin
To take advantage of new features and bug fixes you’ll want to be sure to keep your Plex server up to date. You can automatically upgrade your Plex plugin to the latest version by clicking on ‘Plugins’, then the ‘Installed’ tab.
If a new version of the plugin is available you will see an ‘Update’ button in the actions column next to Plexmediaserver.
If you don’t see the update button you can manually check for updates by clicking on the ‘Available’ plugins tab and clicking refresh. This will force FreeNAS to pull the latest list of plugins from the FreeNAS servers.
In my experiences updating the Plex plugin can sometimes take a very long time. It may seem like the update is stuck but it may just be taking a long time to apply.
I’ve also found that after some updates the Plex server must be manually started.
If you’re curious about what new features have been added or which bugs have been addressed you can find the details in the release notes. The version of Plex contained in the FreeNAS plugin typically lags a few versions behind the latest version but the FreeNAS devs are pretty good about keeping the plugin up to date.