Ever wished to stream your favorite movies and TV shows from your Linux machine to devices in your home network? Plex Media Server, a powerhouse in the home media universe, offers a seamless solution - and setting it up via the Linux terminal isn't as daunting as you might think.
Plex Media Server for Linux allows you to centralize and share your entire media collection - movies, music, photos, and more. Even better, it offers a gorgeous interface, powerful features, and the ability to access your content remotely. Let's dive into the world of Plex on Linux, guiding you through installation and basic command-line usage.
Installing Plex Media Server on Linux
The first step in your Plex journey is installation. Plex provides official packages for popular Linux distributions such as Ubuntu, Debian, CentOS, and Arch Linux.
For Ubuntu/Debian users, installation is as simple as running a few commands in the terminal:
sudo apt update sudo apt install plexmediaserver
Autostart Plex on Boot
To ensure Plex starts automatically when your system boots, use the following command:
sudo systemctl enable plexmediaserver
The service will be active and ready to go once your system restarts.
Accessing Plex Web Interface
Plex Media Server runs on port 32400 by default. To access the web interface, open a web browser and navigate to http://localhost:32400.
Configuring and Managing Plex via Command Line
While the Plex web interface is intuitive and feature-filled, sometimes you just want to tweak settings from the terminal. Plex provides the `plex` command-line client to help with this.
First, ensure the `plex-campaign` package is installed:
sudo apt install plex-campaign
Listing Plex Servers
To list available Plex servers (both local and remote), use:
plexserver -l
Managing Plex Users and Libraries
You can create or delete users and manage libraries using the `plex bax` and `plex library` commands. For example:
- Create a new user:
plex bax create username email - Delete a user:
plex bax delete username - List Libraries:
plex library list - Create a new library:
plex library create name type
For more commands, check the official Plex CLI commands documentation.
Troubleshooting Common Issues
From time to time, you might encounter issues with Plex Media Server. Here are two common roadblocks and their solutions:
Video Not Playing
If videos aren't playing on your devices, ensure both your server and client have the latest Plex updates. Outdated software can sometimes cause playback issues.
Remote Access Not Working
For remote access to work, you'll need to enable and configure port forwarding on your router. Consult your router's documentation or visit Plex's port forwarding guide for help.
There you have it - a comprehensive guide to setting up and managing Plex Media Server on Linux via the terminal. Happy streaming!