Jump to content

Plex: Difference between revisions

1,778 bytes added ,  19 June
link to package search for installation as it describes all methods in one place
imported>Sjau
(Created page with "[https://www.plex.tv/ Plex media server] allows you to aggregate all your personal media and access it anywhere you go. Enjoy your own content on all your devices with Plex....")
 
(link to package search for installation as it describes all methods in one place)
 
(8 intermediate revisions by 7 users not shown)
Line 14: Line 14:
After adding this to your <code>configuration.nix</code> just rebuild your system.
After adding this to your <code>configuration.nix</code> just rebuild your system.


Of course there's some more [https://nixos.org/nixos/options.html#plex options] that you can customize.
Of course there's some more [https://search.nixos.org/options?query=plex options] that you can customize.


If your Plex media server is behind a router, you'll need to forward tcp port <code>32400</code> to your Plex media server.
If your Plex media server is behind a router, you'll need to forward tcp port <code>32400</code> to your Plex media server.
Line 20: Line 20:
Access Plex media server by browsing to <code>http://lan_ip:32400/web</code>
Access Plex media server by browsing to <code>http://lan_ip:32400/web</code>


== SSL Access via Nginx Revers Proxy ==
=== Allow Plex to read external drives ===


Because of several redirects within Plex media server it's not easy to make it accessible through SSL. Browser can complain, even if you have configured propler SSL certificates in your plex setup.
You might encounter permission issues when you try to access external drives if you haven't configured anything else with the server yet. If you haven't explicitly set up a mounting configuration for your drives and instead have your desktop environment (e.g. GNOME or KDE) automatically mount it when you try accessing it via their file explorers, Plex won't be able to access the drive. This is because the desktop environment mounts it to your user, while Plex uses by default the "plex" user.
 
The easiest way to allow Plex to see these external drives mounted is to change the Plex service's user . Here is an example:
<syntaxhighlight lang="nix">
services.plex = {
  enable = true;
  openFirewall = true;
  user="yourusername";
};
</syntaxhighlight>
 
If you have changed the user option after you have already installed Plex, you have to change the permissions of the folder /var/lib/plex via chown to the user you set it to by doing this:
<syntaxhighlight lang="nix">
  sudo chown -R /var/lib/plex
</syntaxhighlight>
 
The alternative to this is to explicitly mount the drives via [[Filesystems]], but takes more effort to set up and requires every new drive you want plex to see to be explicitly declared, but allows more control in what Plex is allowed to see.
 
== Plex Media Player (PMP) ==
 
Plex Media Player is the current release of Plex's media client. Plex has made PMP [https://www.plex.tv/blog/plex-media-player-now-ambidextrous-free-kodi-said/ available] to all users and it has also become compatible with Kodi.
 
For installation see [https://search.nixos.org/packages?channel=unstable&show=plex-media-player&from=0&size=50&sort=relevance&type=packages&query=plex-media-player here].
 
== SSL Access via Nginx Reverse Proxy ==
 
Because of several redirects within Plex media server it's not easy to make it accessible through SSL. Browser can complain, even if you have configured proper SSL certificates in your plex setup.


Fortunately [https://www.nginx.com/ Nginx] can be used as a reverse proxy server to access Plex media server. Most of the configuration below comes from [https://forums.plex.tv/t/how-to-setup-nginx-as-a-reverse-proxy-for-plex/212702/2 kopfpilot] on the Plex forum.
Fortunately [https://www.nginx.com/ Nginx] can be used as a reverse proxy server to access Plex media server. Most of the configuration below comes from [https://forums.plex.tv/t/how-to-setup-nginx-as-a-reverse-proxy-for-plex/212702/2 kopfpilot] on the Plex forum.
Line 108: Line 134:


After applying the changes, just browse to <code>https://sub.domain.tld/web</code>. Of course use your actual (sub)domain name.
After applying the changes, just browse to <code>https://sub.domain.tld/web</code>. Of course use your actual (sub)domain name.
[[Category:Applications]]