diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 86 |
1 files changed, 40 insertions, 46 deletions
@@ -1,85 +1,79 @@ # Plex Server Setup This repository contains scripts and configuration for setting up a Plex Media -Server. I run this on a Raspberry Pi 4B running Ubuntu. - -## Assumptions - -- Server running Ubuntu -- External storage device with UUID `2c882f17-50e7-4099-a305-693f4aa0113b` - - Comment out `ensure_fstab_entry` if you're not using a separate external - hard drive for your media or change the UUID as needed. If you comment it - out, we'll want to adjust the Plex data directory from `/mnt/media/Plex` to - wherever your data will be. -- Plex account and claim token +Server on Ubuntu. I run this on a Raspberry Pi 4B. + +* [Installation](#installation) + * [1. Copy the Files over to Your Server](#1.-copy-the-files-over-to-your-server) + * [2. SSH into Your Server](#2.-ssh-into-your-server) + * [3. Configure Your Environment](#3.-configure-your-environment) + * [Copy the Example Env File](#copy-the-example-env-file) + * [Fill in PLEX_CLAIM with Your Plex Claim Token](#fill-in-plex_claim-with-your-plex-claim-token) + * [4. Run the Installation Scripts](#4.-run-the-installation-scripts) + * [Install Docker](#install-docker) + * [Set up External Drive](#set-up-external-drive) + * [5. Start Plex](#5.-start-plex) ## Installation -### 1. Copy the files over to your server +### 1. Copy the Files over to Your Server ```sh -scp compose.yaml <username>@<server>:/home/<username>/compose.yaml -scp setup-plex.sh <username>@<server>:/home/<username>/setup-plex.sh +scp compose.yaml .env.example setup-docker.sh setup-drive.sh <username>@<server>:/home/<username>/ ``` -### 2. SSH into your server +### 2. SSH into Your Server ```sh ssh <username>@<server> ``` -### 3. Set the plex claim token +### 3. Configure Your Environment -Get a claim token at https://www.plex.tv/claim/ +#### Copy the Example Env File ```sh -sed 's|PLEX_CLAIM=<your-plex-claim-token>|PLEX_CLAIM=your-actual-token-here|' compose.yaml > compose.yaml.tmp \ - && mv compose.yaml.tmp compose.yaml +cp .env.example .env ``` -### 4. Adjust hard-coded timezone if necessary +#### Fill in PLEX_CLAIM with Your Plex Claim Token + +[Get a claim token from Plex](https://www.plex.tv/claim/) + +### 4. Run the Installation Scripts -The timezone is hard-coded to 'America/New_York'. If that's not your timezone, -adjust it in the `compose.yaml` file. +#### Install Docker ```sh -sed 's|TZ=America/New_York|TZ=your-timezone-here|' compose.yaml > compose.yaml.tmp \ - && mv compose.yaml.tmp compose.yaml +chmod +x setup-docker.sh +sudo ./setup-docker.sh ``` -### 5. Run the installation script +#### Set up External Drive -This will set up a fstab entry for a external hard drive and install docker. +If you're using an external hard drive for your media, set up the fstab entry +for it: ```sh -chmod +x setup-plex.sh -sudo ./setup-plex.sh +chmod +x setup-drive.sh +sudo ./setup-drive.sh ``` -### 6. Ensure external drive is mounted +The defaults use my hard drive assumptions. To use different configuration, pass +the overrides before the command: + +```sh +FSTAB_UUID=your-uuid FSTAB_MOUNT_POINT=/mnt/data FSTAB_FS_TYPE=ext4 sudo -E ./setup-drive.sh +``` -After the fstab entry is added, ensure the drive is mounted for the external -hard drive. +After you've added the fstab entry, mount the drive: ```sh sudo mount -a ``` -### 7. Start Plex +### 5. Start Plex -```bash +```sh docker compose up --detach ``` - -## Configuration - -### Volume Mappings - -- `/mnt/media/Plex` - Media files on an external drive -- `/opt/plex-config` - Plex configuration and metadata on the server drive -- `/opt/plex-transcode` - Temporary transcoding files on the server drive - -### Ports - -Plex uses multiple ports for different features. All necessary ports are exposed -in the compose file. |