Tag Archives: *nix

How To Stream Music & Video With Plex on FreeBSD

Introduction

Plex is a great piece of software, if you’ve never heard it before think of it as an easy to use service that runs on a computer that streams just about any format of audio/video to a Smart TV, Apple TV, Roku, or modern console. You can even easily configure it so that your iOS device can stream content from your media server across the Internet. Perfect!

If you are running a small blog on a VPS instance, chances are you have way more bandwidth, disk space, RAM, and CPU than you need for the blog. I’ve put together this short tutorial on how to install & configure Plex on your VPS to stream your music/video collection from that instead of your home computer (for example, if you want to stream your music library without hitting your residential data cap at home!).

Prerequisites

Before you begin this guide you’ll need the following:

Freebsd 10.x Droplet

A non-root user with sudo privileges (https://www.digitalocean.com/community/tutorial_series/getting-started-with-freebsd) explains how to set this up.)

Up To Date Ports Tree

Step 1 — Updating Ports Tree

The Ports Tree is updated constantly, you should update your system’s local copy on a regular basis. To do this manually, execute the following command:

sudo portsnap fetch update

Step 2 – Install Plex

Plex doesn’t have a lot of prerequisites, the easiest way to install is to run:

sudo pkg install plexmediaserver

After the package has been installed, the installation process tells you how to set the plexmediaserver service to start automatically at boot as well as how to manually start it. We’ll perform both commands now:

sudo sysrc plexmediaserver_enable=YES

and

sudo service plexmediaserver start

Step 3 – Configure Plex

root@freebsd:~ # pkg install plexmediaserver
Updating FreeBSD repository catalogue…
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
plexmediaserver: 1.0.0.2261
compat9x-amd64: 9.3.903000.20160608

Number of packages to be installed: 2

The process will require 170 MiB more space.
65 MiB to be downloaded.

Proceed with this action? [y/N]: y

After downloading and installing, it will prompt you with the following information:

Message from plexmediaserver-1.0.0.2261:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

multimedia/plexmediaserver includes an RC script:
/usr/local/etc/rc.d/plexmediaserver

TO START PLEXMEDIASERVER ON BOOT:
sysrc plexmediaserver_enable=YES

START MANUALLY:
service plexmediaserver start

Once started, visit the following to configure:
http://localhost:32400/web

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

NOTES: If there is an issue getting to the initial setup screen of the server after adding your IP to the allowed network setting, try a different browser or close all tabs and windows and empty cookies.

If there is a problem “Claiming” the new server, log out of plex and back in again.

If there is a problem with the new server showing up on iOS, sign out of your account in the plex app and force kill it. Re-launch and log back in.