summaryrefslogtreecommitdiff
path: root/content/config/plex.md
blob: 1b811c80251718b5fd039d33ee2d6824ada63152 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
title: "Plex"
date: 2023-01-23T13:59:59-03:00
draft: false
weight: 9
---

# What is Plex?

From their [website](https://www.plex.tv/):

> With our free app you can add, access, and share all the entertainment that matters to you, on almost any device—including your own personal media collection. Guess that makes us the hardest working app in show business.

On YAMS, Plex is one of the most important parts: Plex is going to be your "Netflix", "Hulu" or "Amazon Prime". This means you'll be able to stream your TV shows and movies to any device using Plex.

## First steps

To start, you need to allow your IP range to access the Plex setup. In your server, first stop YAMS.

```bash
$ yams stop
```

Now, go to your Plex config in YAMS. For the purposes of this tutorial, I'm asuming your install location is `/opt/yams`.

```bash
$ cd /opt/yams/config/plex/Library/Application\ Support/Plex\ Media\ Server/
```

Inside that folder, open `Preferences.xml`.

```bash
/opt/yams/config/plex/Library/Application Support/Plex Media Server$ vim Preferences.xml
```
(you don't have to use `vim`, you can use `nano` if you want to).

On the `Preferences.xml` file, add the following **after** the `<Preferences ` directive:

```xml
<Preferences allowedNetworks="<your_subnet_IP>/255.255.255.0" ...
```

The `...` is the rest of the XML file, you only have to add the `allowedNetworks` directive.

### How do you find your subnet IP?

This depends on your network configuration, but it _sometimes_ goes with the following rules:
- If your server IP is `192.168.0.100`, your subnet is `192.168.0.0`.
- If your server IP is `10.0.0.25`, your subnet is `10.0.0.0`.

Finally, restart YAMS.

```bash
$ yams restart
```

To check if everything is working, you can try by running:

```bash
$ docker logs plex
```

If you see something like this:

```bash
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
```

It means your `Preferences.xml` is badly formatted. Try to fix it and try again.

Once you finish the Preferences config, you can continue.

**Note:** You can read more about this fix here: https://www.truenas.com/community/threads/plex-not-authorized-you-do-not-have-access-to-this-server.96858/.

## Initial configuration

In your browser, go to [http://{your-ip-address}:32400/web]() and you'll see Plex's setup page. Click on "Got it!" to continue.

[![plex-1](/pics/plex-1.png)](/pics/plex-1.png)

After logging in, you'll see a modal that says "Plex Pass". You can close that.

[![plex-2](/pics/plex-2.png)](/pics/plex-2.png)

On the "Name" screen, select a name for your server and click on continue.

[![plex-3](/pics/plex-3.png)](/pics/plex-3.png)

On the "Sync Your Watch State and Ratings" screen, just click "No".

[![plex-4](/pics/plex-4.png)](/pics/plex-4.png)

Now on "Media Library", click on "Add Library".

[![plex-5](/pics/plex-5.png)](/pics/plex-5.png)

### Adding Movies

On the "Add Library" modal, select "Movies" and click "Next".

[![plex-6](/pics/plex-6.png)](/pics/plex-6.png)

Now, click on "Browse For Media Folder".

[![plex-7](/pics/plex-7.png)](/pics/plex-7.png)

On the "Add Folder" modal, select the movies path (`/data/movies`) and click on "Add".

[![plex-8](/pics/plex-8.png)](/pics/plex-8.png)

Your "Add Library" modal should look like this. Finally, click on "Add Library".

[![plex-9](/pics/plex-9.png)](/pics/plex-9.png)

### Adding TV Shows

On "Media Library", click on "Add Library".

[![plex-10](/pics/plex-10.png)](/pics/plex-10.png)

On the "Add Library" modal, select "TV Shows" and click "Next".

[![plex-11](/pics/plex-11.png)](/pics/plex-11.png)

Now, click on "Browse For Media Folder".

[![plex-7](/pics/plex-7.png)](/pics/plex-7.png)

On the "Add Folder" modal, select the TV Shows path (`/data/tvshows`) and click on "Add".

[![plex-12](/pics/plex-12.png)](/pics/plex-12.png)

Your "Add Library" modal should look like this. Finally, click on "Add Library".

[![plex-13](/pics/plex-13.png)](/pics/plex-13.png)

In the end, your "Media Library" screen should look like this. If it's okay, click on "Next".

[![plex-14](/pics/plex-14.png)](/pics/plex-14.png)

## Finish

On the "Finish screen", click on "Done".

[![plex-15](/pics/plex-15.png)](/pics/plex-15.png)

You should see the Plex dashboard now! On the left side panel, click on "More".

[![plex-16](/pics/plex-16.png)](/pics/plex-16.png)

There, you should find your local "Movies" and "TV Shows".

[![plex-17](/pics/plex-17.png)](/pics/plex-17.png)

## That's all!

YAMS is fully up and running! Now, let's add some content. Move on to [Running everything together](/config/running-everything-together).