<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Step 4: Initializing Plex Media Server Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/step-4-initializing-plex-media-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 01 Apr 2020 14:37:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Install Plex Media Server on Ubuntu 18.04</title>
		<link>https://www.osradar.com/how-to-install-plex-media-server-on-ubuntu-18-04/</link>
					<comments>https://www.osradar.com/how-to-install-plex-media-server-on-ubuntu-18-04/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Wed, 01 Apr 2020 14:37:19 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to install plex media server on ubuntu 18.04]]></category>
		<category><![CDATA[Plex media server installation guide]]></category>
		<category><![CDATA[plex media server installation on linux]]></category>
		<category><![CDATA[Step 4: Initializing Plex Media Server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18970</guid>

					<description><![CDATA[<p>Today we are going to learn that how to install Plex Media Server on Ubuntu 18.04. Before going to installation process let&#8217;s have a short introduction about Plex Media Server. Plex is an Open Source software by which you can easily manage your Videos, TV shows, Music lists, Images and much more with the elegant [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-plex-media-server-on-ubuntu-18-04/">How To Install Plex Media Server on Ubuntu 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today we are going to learn that <a href="https://www.osradar.com/?p=18970">how to install Plex Media Server on Ubuntu 18.04</a>. Before going to installation process let&#8217;s have a short introduction about Plex Media Server.</p>



<p>Plex is an Open Source software by which you can easily manage your Videos, TV shows, Music lists, Images and much more with the elegant interface. It also stream these media files on your Computer, Smartphones, TV and other such devices using the Network. </p>



<p>So, just follow the below steps to easily install the Plex Media Server on your Ubuntu system.</p>



<h3><strong>Step 1: Update Your System</strong></h3>



<p>As usaul we do, update your system by typing</p>



<pre class="wp-block-verse">sudo apt update </pre>



<h3><strong>Step 2: Download Plex Media Server</strong></h3>



<p>Visit the Plex Server <a href="https://www.plex.tv/media-server-downloads/#plex-media-server">official release page</a> to download the latest version of the Plex. You can also get it using the wget command as given below</p>



<pre class="wp-block-verse">wget https://downloads.plex.tv/plex-media-server-new/1.18.8.2527-740d4c206/debian/plexmediaserver_1.18.8.2527-740d4c206_amd64.deb</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="725" height="506" src="https://www.osradar.com/wp-content/uploads/2020/03/1-25.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19315" srcset="https://www.osradar.com/wp-content/uploads/2020/03/1-25.png 725w, https://www.osradar.com/wp-content/uploads/2020/03/1-25-300x209.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/1-25-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2020/03/1-25-696x486.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/1-25-602x420.png 602w" sizes="(max-width: 725px) 100vw, 725px" /></figure></div>



<p>Now, switch to the directory where package is downloaded.</p>



<pre class="wp-block-verse">cd ~/Downloads</pre>



<p>And then run the following command to install deb package.</p>



<pre class="wp-block-verse">sudo dpkg -i plexmediaserver_1.18.8.2527-740d4c206_amd64.deb</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="726" height="570" src="https://www.osradar.com/wp-content/uploads/2020/03/2-24.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19268" srcset="https://www.osradar.com/wp-content/uploads/2020/03/2-24.png 726w, https://www.osradar.com/wp-content/uploads/2020/03/2-24-300x236.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/2-24-696x546.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/2-24-535x420.png 535w" sizes="(max-width: 726px) 100vw, 726px" /></figure>



<p>As the Plex Media Server is installed, verify the stauts of it by typing</p>



<pre class="wp-block-verse">sudo systemctl status plexmediaserver</pre>



<p>Output:</p>



<p>You&#8217;ll see the similar output</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="733" height="444" src="https://www.osradar.com/wp-content/uploads/2020/03/3-23.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19270" srcset="https://www.osradar.com/wp-content/uploads/2020/03/3-23.png 733w, https://www.osradar.com/wp-content/uploads/2020/03/3-23-300x182.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/3-23-696x422.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/3-23-693x420.png 693w" sizes="(max-width: 733px) 100vw, 733px" /></figure></div>



<p>In case it is not started run the given command to start its services</p>



<pre class="wp-block-verse">sudo systemctl start plexmediaserver</pre>



<h3><strong>Step 3: Enabling Plex Repository</strong></h3>



<p>After enabling the Plex repository on Ubuntu system, you can easily update the latest version of it. As the plex media server deb package contains a source list file. Type the command to see a list of files that are being installed from a package.</p>



<pre class="wp-block-verse">dpkg -L plexmediaserver</pre>



<p>Now, open the file by running</p>



<pre class="wp-block-verse">sudo nano /etc/apt/sources.list.d/plexmediaserver.list</pre>



<pre class="wp-block-verse">Then uncomment the last line of the file as seen below</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="740" height="564" src="https://www.osradar.com/wp-content/uploads/2020/03/4-16.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19271" srcset="https://www.osradar.com/wp-content/uploads/2020/03/4-16.png 740w, https://www.osradar.com/wp-content/uploads/2020/03/4-16-300x229.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/4-16-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2020/03/4-16-696x530.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/4-16-551x420.png 551w" sizes="(max-width: 740px) 100vw, 740px" /></figure></div>



<p>After it save and exit the file.</p>



<p>Now, import the Plex Media Server public key to the apt package manager.</p>



<pre class="wp-block-verse">wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="731" height="139" src="https://www.osradar.com/wp-content/uploads/2020/03/5-16.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19272" srcset="https://www.osradar.com/wp-content/uploads/2020/03/5-16.png 731w, https://www.osradar.com/wp-content/uploads/2020/03/5-16-300x57.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/5-16-696x132.png 696w" sizes="(max-width: 731px) 100vw, 731px" /></figure></div>



<p>And update your system</p>



<pre class="wp-block-verse">sudo apt update</pre>



<h3><strong>Step 4: Initializing Plex Media Server</strong></h3>



<p>Run the below command to check the address on which Plex Media Server is listening on.</p>



<pre class="wp-block-verse">sudo netstat -lnpt | grep Plex</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="470" src="https://www.osradar.com/wp-content/uploads/2020/03/7-15-1024x470.png" alt="How To Install Plex Media Server on Ubuntu 18.04" class="wp-image-19320" srcset="https://www.osradar.com/wp-content/uploads/2020/03/7-15-1024x470.png 1024w, https://www.osradar.com/wp-content/uploads/2020/03/7-15-300x138.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/7-15-768x352.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/7-15-696x319.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/7-15-1068x490.png 1068w, https://www.osradar.com/wp-content/uploads/2020/03/7-15-916x420.png 916w, https://www.osradar.com/wp-content/uploads/2020/03/7-15.png 1278w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>Here you can see that Plex is listening to <strong>0.0.0.0:32400</strong> &amp; <strong>127.0.0.1:32401</strong></p>



<p>So, type <strong>127.0.0.1:32400</strong> in your browser and hit enter. You&#8217;ll be directed to the Welcome page of Plex as an initial setup.</p>



<h4><strong>Provide Plex TV Account</strong></h4>



<p>Here you&#8217;ve to provide your Plex TV account to sign in.</p>



<p>For security reason, if the Plex is already installed on the remote system, set up SSH by executing the below command</p>



<pre class="wp-block-verse">ssh 10.20.39.45 -L 8888:localhost:32400</pre>



<p>After it run the below command to access the Plex Web Interface</p>



<pre class="wp-block-verse">http://localhost:8888/web</pre>



<p>It will redirect to the <strong>http://localhost:32400</strong>/web on the remote system by using SSH tunnel. It will only require for first time setup. After it you can access the web interface by <strong>IP:32400</strong>.</p>



<p><strong>Note: Substitue your IP address.</strong></p>



<h4><strong>Configure Plex Wizard</strong></h4>



<p>After doing these changes, you will be directed to do the initial setup.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="739" height="599" src="https://www.osradar.com/wp-content/uploads/2020/03/plex.png" alt="" class="wp-image-19322" srcset="https://www.osradar.com/wp-content/uploads/2020/03/plex.png 739w, https://www.osradar.com/wp-content/uploads/2020/03/plex-300x243.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/plex-696x564.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/plex-518x420.png 518w" sizes="(max-width: 739px) 100vw, 739px" /></figure>



<p>You can also type the below address if the above can not redirect you.</p>



<pre class="wp-block-verse">localhost:32400/web/index.html#!/setup</pre>



<p>Now, provide the name for your Plex and check the Allow me to access box.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="712" height="531" src="https://www.osradar.com/wp-content/uploads/2020/03/9-9.png" alt="" class="wp-image-19324" srcset="https://www.osradar.com/wp-content/uploads/2020/03/9-9.png 712w, https://www.osradar.com/wp-content/uploads/2020/03/9-9-300x224.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/9-9-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2020/03/9-9-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2020/03/9-9-696x519.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/9-9-563x420.png 563w" sizes="(max-width: 712px) 100vw, 712px" /></figure></div>



<p>Then click on the <strong>Next</strong> button.</p>



<p>On, the next screen you can add library by clicking on <strong>Add Library </strong>button.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="659" height="437" src="https://www.osradar.com/wp-content/uploads/2020/03/add-library.png" alt="" class="wp-image-19325" srcset="https://www.osradar.com/wp-content/uploads/2020/03/add-library.png 659w, https://www.osradar.com/wp-content/uploads/2020/03/add-library-300x199.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/add-library-633x420.png 633w" sizes="(max-width: 659px) 100vw, 659px" /></figure></div>



<p>Choose your library type, and navigate to media folder to add media directories.</p>



<p>Make sure you&#8217;ve the read &amp; execute permissions otherwise it will not work. Run the command to give permissions to the Plex.</p>



<pre class="wp-block-verse">sudo setfacl -m u:plex:rx /media/linuxbabe/</pre>



<p>For single directory permission, run the command like this</p>



<pre class="wp-block-verse">sudo setfacl -m u:plex:rx /media/linuxbabe/directory-name</pre>



<p>As it is tempting to add the recursive flag (-R) that will provide read &amp; execute permissions on each file &amp; directories and their sub-directories.</p>



<pre class="wp-block-verse">sudo setfacl -R -m u:plex:rx /media/linuxbabe/</pre>



<p>Do this only if you&#8217;ve the media on your hard-drive I don&#8217;t recommend if you&#8217;ve some sensitive data.</p>



<p>After adding the media directories click on the <strong>Next</strong> button.</p>



<p>Now, click on <strong>Done</strong> to finish up.</p>



<p>If you got any error, don&#8217;t worry just delete the following file &amp; try to do the setup again carefully in order to prevent any error.</p>



<pre class="wp-block-verse">sudo rm /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml<br>sudo systemctl restart plexmediaserver</pre>



<p>And then go to <strong>localhost:32400/web </strong>and claim the unclaimed server.</p>



<p>If you&#8217;ve your own domain name you can also use that one for this purposes.</p>



<h3><strong>Step 5: Creating Nginx Reverse Proxy</strong></h3>



<p>As said earlier if you are going to use your domain name, you&#8217;ll have to create the reverse proxy. To do this install nginx if you don&#8217;t have already installed.</p>



<pre class="wp-block-verse">sudo apt install nginx</pre>



<p>After it make a server block config file.</p>



<pre class="wp-block-verse">sudo nano /etc/nginx/conf.d/plex.conf</pre>



<p>Then paste the following date into the file.</p>



<pre class="wp-block-verse">server {<br>       listen 80;<br>       server_name plex.example.com;<br><br>location / {<br>proxy_pass http://127.0.0.1:32400;<br>proxy_set_header Host $host;<br>proxy_set_header X-Real-IP $remote_addr;<br>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br><br>#upgrade to WebSocket protocol when requested<br>proxy_set_header Upgrade $http_upgrade;<br>proxy_set_header Connection "Upgrade";<br>}<br>}</pre>



<p>Then save and exit the file.</p>



<p><strong>Note:</strong> Replace the <a href="http://osradar.com">plex.example.com</a> with your domain name. And don&#8217;t forget to add the DNS records for sub-domain in DNS manager.</p>



<p>Verify that the nginx is working fine by testing the syntax</p>



<pre class="wp-block-verse">sudo nginx -t</pre>



<p>And restart the nginx services.</p>



<pre class="wp-block-verse">sudo systemctl reload nginx</pre>



<h3><strong>Step 6: Encrypting with HTTPS</strong></h3>



<p>For security reasons, enable the HTTPS in order to stay secure. You can use certbot for this purpose.</p>



<p>So, install certbot &amp; nginx plugin for certbot.</p>



<pre class="wp-block-verse">sudo apt install certbot<br>sudo apt install python3-certbot-nginx</pre>



<p>Now, get the TLS certificate by running</p>



<pre class="wp-block-verse">sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d plex.example.com</pre>



<p>The certificates will be installed easily &amp; automatically then you can access the Plex with https function.</p>



<h3><strong>Step 7: Upgrade Plex on Ubuntu </strong></h3>



<p>As we&#8217;ve added the repository earlier, so you can update &amp; upgrade the Plex by running</p>



<pre class="wp-block-verse">sudo apt update<br> sudo apt upgrade<br> sudo systemctl restart plexmediaserver</pre>



<p>So, this is how you can install Plex Media Server on Ubuntu 18.04.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-plex-media-server-on-ubuntu-18-04/">How To Install Plex Media Server on Ubuntu 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-plex-media-server-on-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
