How-To: All-in-one Raspberry + Plex-Server + WiFi-Accespoint

Hi There

My use case: Use a dedicated Plex Server on a Raspberry PI 3 providing our beloved plex services on a dedicated Wlan - in my case I want to use the RPI in my RV/Car or underway in general without worrying about data volume (e.g. roaming!).

Browsing the forum and the web I did not find a how-to that combined all my requirements in one guide. So, here you go :slight_smile:

Some basic know how in setting up and using a RPI is needed and not covered in this how-to.

You need:

  • RPI 3
  • microSD Card
  • Ethernet-Cable (for remote configuration, the guide covers remote configuration. Local configuration will also work)

Before you start

  1. Flash the microSD Card with the newest Raspbian, e.g. using Win32DiskImager under windows or any other appropriate tool

  2. Configure your RPI with raspi-config to your needs

  3. At least you need to activate SSH. Plugin the Ethernet cable and connect the RPI to your LAN, login using SSH

  4. Setup up the RPI as WLan access point (mainly following this guide (thx!, all the credits for the first steps go there!) https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md)

Update and install packages

  1. Use the following to update your Raspbian installation:
sudo apt-get update
sudo apt-get upgrade
  1. Install all the required software in one go with this command:
sudo apt-get install dnsmasq hostapd
  1. Since the configuration files are not ready yet, turn the new software off as follows:
sudo systemctl stop dnsmasq
sudo systemctl stop hostapd

Configuring a static IP for wlan0

  1. To configure the static IP address, edit the dhcpcd configuration file with:
sudo nano /etc/dhcpcd.conf
  1. Go to the end of the file and edit it so that it looks like the following (or any other IP/IP-range you’d like to set up - the IP must be on a different sub-net than your LAN):
interface wlan0
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant
  1. Now restart the dhcpcd daemon and set up the new wlan0 configuration:
sudo service dhcpcd restart

Configuring the DHCP server (dnsmasq)

  1. Rename this configuration file, and edit a new one:
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig  
sudo nano /etc/dnsmasq.conf
  1. Type or copy the following information into the dnsmasq configuration file and save it (or any other IP-range):
interface=wlan0      # Use the require wireless interface - usually wlan0
  dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

Configuring the access point host software (hostapd)

  1. You need to edit the hostapd configuration file, located at /etc/hostapd/hostapd.conf, to add the various parameters for your wireless network. After initial install, this will be a new/empty file.
sudo nano /etc/hostapd/hostapd.conf
  1. Add the information below to the configuration file. This configuration assumes we are using channel 7, with a network name of NameOfNetwork, and a password AardvarkBadgerHedgehog (change both to your needs). Note that the name and password should not have quotes around them. The passphrase should be between 8 and 64 characters in length.
interface=wlan0
driver=nl80211
ssid=NameOfNetwork
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=AardvarkBadgerHedgehog
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
  1. We now need to tell the system where to find this configuration file.
sudo nano /etc/default/hostapd
  1. Find the line with #DAEMON_CONF, and replace it with this:
DAEMON_CONF="/etc/hostapd/hostapd.conf"

Start it up

  1. Now start up the remaining services:
sudo systemctl start hostapd
sudo systemctl start dnsmasq
  1. Reboot

You are done setting up network stuff!

  1. You should now find a new WiFi-Network unter the SSID you defined in step 14. As for now, connecting to that WiFi will result in nothing!

Install the Plex-Server

  1. There are many guides, e.g. READ ME FIRST: About Server ARMv7 and ARMv8 Ubuntu / Debian

Configure Plex-Server

  1. Your Plex-Server is now reachable under two networks: Within your LAN (eth0) and within the RPI-WiFi (wlan0)

  2. Easiest configuration is done using the LAN. So, connect to eth0-IP:32400/web/ - don’t login the server with your Plex credentials (as you want to use the server without internet connection)

  3. Configure the Server to your needs (I disabled all the logging and scheduled jobs, DLNA, …). At least you need to set the option “List of IP addresses and networks that are allowed without auth” (Settings → Server → Network) with the IP-range of your RPI-WiFi or larger, e.g. 192.168.0.0/16

  4. Add media to your RPI and set up new libraries in Plex (I recommend to not use photo libraries - it slowed everything down on my side). Videos need to be encoded in a RPI-nativ format (to avoid transcoding)

Connect to Plex-Server

  1. Connect your phone / pad to the RPI-WiFi and start the plex.app - you should discover yor RPI-Plex-Server and your media should be there! As I did not login the server with my plex pass account, I need to verify my plex.app as the “full version” otherwise playback will stop after 1 min. (or so). If you don’t have, buy the app and support our devs - or maybe it works when the server is logged in…

  2. Enjoy your media served by an all in one RPI-Plex-AccessPoint :slight_smile:

Any suggestions to improve the setup?

Cheers!

Please do not cite the guide from your step 20. Its step 8 is complete wrong. Editing this file does not do anything. Please always prefer to cite the official guide or urge the author to fix his/her instructions.

@drmagoo thx for your hint - I was not going into the details of the previously linked guide - I edited my post above and cited to the guide you mentioned…

cheers

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.