blob: 2ef26f6689a6e44cd6232c28e49d783b582b682d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Plex Server Setup
This repository contains scripts and configuration for setting up a Plex Media
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
```sh
scp compose.yaml .env.example setup-docker.sh setup-drive.sh <username>@<server>:/home/<username>/
```
### 2. SSH into Your Server
```sh
ssh <username>@<server>
```
### 3. Configure Your Environment
#### Copy the Example Env File
```sh
cp .env.example .env
```
#### 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
#### Install Docker
```sh
chmod +x setup-docker.sh
sudo ./setup-docker.sh
```
#### Set up External Drive
If you're using an external hard drive for your media, set up the fstab entry
for it:
```sh
chmod +x setup-drive.sh
sudo ./setup-drive.sh
```
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 you've added the fstab entry, mount the drive:
```sh
sudo mount -a
```
### 5. Start Plex
```sh
docker compose up --detach
```
|