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
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
-
Flash the microSD Card with the newest Raspbian, e.g. using Win32DiskImager under windows or any other appropriate tool
-
Configure your RPI with raspi-config to your needs
-
At least you need to activate SSH. Plugin the Ethernet cable and connect the RPI to your LAN, login using SSH
-
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
- Use the following to update your Raspbian installation:
sudo apt-get update
sudo apt-get upgrade
- Install all the required software in one go with this command:
sudo apt-get install dnsmasq hostapd
- 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
- To configure the static IP address, edit the dhcpcd configuration file with:
sudo nano /etc/dhcpcd.conf
- 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
- Now restart the dhcpcd daemon and set up the new
wlan0
configuration:
sudo service dhcpcd restart
Configuring the DHCP server (dnsmasq)
- Rename this configuration file, and edit a new one:
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo nano /etc/dnsmasq.conf
- 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)
- 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
- 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
- We now need to tell the system where to find this configuration file.
sudo nano /etc/default/hostapd
- Find the line with #DAEMON_CONF, and replace it with this:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
Start it up
- Now start up the remaining services:
sudo systemctl start hostapd
sudo systemctl start dnsmasq
- Reboot
You are done setting up network stuff!
- 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
- There are many guides, e.g. READ ME FIRST: About Server ARMv7 and ARMv8 Ubuntu / Debian
Configure Plex-Server
-
Your Plex-Server is now reachable under two networks: Within your LAN (
eth0
) and within the RPI-WiFi (wlan0
) -
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)
-
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
-
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
-
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…
-
Enjoy your media served by an all in one RPI-Plex-AccessPoint
Any suggestions to improve the setup?
Cheers!