This guide will walk you through the process of setting up a home server on your Raspberry Pi (RPI) to stream video and play games over your local network.
- Prerequisites
- Setting Up the Raspberry Pi
- Installing Video Streaming Software
- Setting Up Game Streaming
- Accessing Your Server
- Optional: Remote Access Setup
- Useful Tips
- Troubleshooting
- Raspberry Pi 4 or 3 (4 GB RAM or more recommended)
- MicroSD card (16 GB minimum, 32 GB+ recommended)
- Power supply for Raspberry Pi
- Ethernet cable (optional but recommended for better streaming)
- External storage (USB drive or NAS) for storing videos and games
- Raspbian OS (preferably Raspberry Pi OS Lite for a headless setup)
- Access to a PC/Mac for initial setup
- A stable WiFi or Ethernet connection
- Local network access (port forwarding for remote access)
-
Install Raspberry Pi OS
Download Raspberry Pi OS from here and flash it to your MicroSD card using Raspberry Pi Imager. -
Enable SSH for headless setup
After flashing, create an empty file namedssh
(without extension) in the/boot
directory of the SD card. This will enable SSH on first boot. -
Boot the Pi
Insert the SD card into your Pi, power it on, and connect via SSH using its local IP:ssh pi@<YOUR_RPI_IP>
Update & Upgrade Run the following commands to update the system:
sudo apt update
sudo apt upgrade -y
- Plex Media Server Install Plex Add the Plex repo and install Plex Media Server:
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt update
sudo apt install plexmediaserver -y
Enable and Start Plex
sudo systemctl enable plexmediaserver
sudo systemctl start plexmediaserver
Access Plex
Open your web browser and navigate to http://<YOUR_RPI_IP>:32400/web
to set up your media server.
2. Jellyfin Install Jellyfin Run the following commands to install Jellyfin:
sudo apt install apt-transport-https
wget -O - https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | sudo apt-key add -
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian buster main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
sudo apt update
sudo apt install jellyfin -y
Enable and Start Jellyfin
sudo systemctl enable jellyfin
sudo systemctl start jellyfin
Access Jellyfin
Open your web browser and navigate to http://<YOUR_RPI_IP>:8096
to set up Jellyfin.
- Steam Link Install Steam Link Install Steam Link from the Raspbian package repository:
sudo apt install steamlink
Launch Steam Link Run:
steamlink
This will open the Steam Link interface, where you can pair with your Steam account and begin game streaming.
Install Moonlight Add Moonlight repo and install:
sudo apt-add-repository ppa:moonlight-stream/moonlight
sudo apt update
sudo apt install moonlight -y
Pair with GameStream Use the following command to pair with your gaming PC (make sure you have an NVIDIA GPU):
moonlight pair <Your PC IP>
Start Streaming Once paired, stream your games with:
moonlight stream <Your PC IP>
Once your server is up and running:
- Plex Media Server:
http://<YOUR_RPI_IP>:32400/web
- Jellyfin:
http://<YOUR_RPI_IP>:8096
- Steam Link: Can be accessed via the Pi’s desktop or directly from a TV/monitor connected to the Pi.
- Moonlight: Use Moonlight’s commands to stream from a client device.
To access your media server from outside your home:
-
Set up port forwarding on your router for:
- Plex: Port
32400
- Jellyfin: Port
8096
- Plex: Port
-
Use a dynamic DNS service like No-IP to assign a hostname to your public IP.
- For better performance, always use Ethernet over WiFi, especially for game streaming.
- External storage is highly recommended for storing large video libraries.
- Keep your Raspberry Pi updated:
sudo apt update && sudo apt upgrade -y
- Video lag on Plex/Jellyfin: Ensure you're using a fast connection and try transcoding the video to a lower resolution for smoother playback.
- Steam Link connection issues: Make sure both the Pi and your PC are on the same network and firewall rules allow traffic.
- Moonlight not pairing: Verify that NVIDIA GameStream is enabled on your PC.
With this setup, you'll have a fully functional home server for both media and game streaming on your Raspberry Pi!