Plex Media Server is a robust media management and streaming platform that allows you to organize and stream your personal media collections—movies, TV shows, music, photos, and more—to devices such as smart TVs, phones, tablets, and gaming consoles. It’s a perfect solution for managing a home media server, offering a user-friendly interface, remote access, and support for multiple formats.

Plex allows you to centralize and organize your personal media library (movies, TV shows, music, photos), and then stream that media to all your devices, including smartphones, smart TVs, tablets, and game consoles.

  • Streaming: Plex streams your media across your network and the internet.
  • Remote Access: Watch your media from anywhere.
  • Sharing: Share your library with family and friends.
  • Support for Multiple Formats: Plex can handle various file types for audio, video, and photos.
  • Plex Pass: With a subscription, you get advanced features like DVR, live TV, and mobile sync.

For those who love having a media server at home, Plex provides a rich and customizable platform for streaming, organizing, and managing media.


Step 1: Create an Instance on Cloud.shape.host

Step 1.1: Access the Dashboard

  • Log in to your Cloud.shape.host account.
  • Navigate to the Dashboard.

Step 1.2: Create a New Instance

  • Click on Create in the top menu.
  • Select Instances from the dropdown options.
Shape.host Resources dashboard with Create > Instance highlighted.

Step 1.3: Choose the Datacenter Location

  • Pick the closest datacenter to your target audience (e.g., New York, London, etc.).
Shape.host instance form with the data center location selector highlighted.

Step 1.4: Select Your Plan

  • Choose the type of plan, such as Standard or CPU-Optimized.

Step 1.5: Configure the Instance

  • Select Debian 12 as the operating system.
  • Configure the network and authentication method (SSH or password).
Shape.host instance form with the operating system image selector highlighted.

Step 1.6: Configure and Launch

Set your network and authentication settings, then click Create Instance.

Shape.host instance form with the Create Instance button highlighted.

Step 1.7: Locate your Instance’s IP

Shape.host Resources dashboard with the server IP address highlighted.

Step 1.8: Access the Instance

  • Once the instance is created, access it via SSH:
   ssh root@<your-instance-ip>

Replace <your-instance-ip> with the public IP of your instance.


Step 2: Update System and Install Dependencies

Update the system packages and install required dependencies:

apt update
apt install curl unzip socat libexpat1 apt-transport-https wget software-properties-common
Terminal showing APT package management commands and output.
Terminal showing APT package management commands and output.

Step 3: Add Plex Repository

Add the Plex Media Server repository:

echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
Terminal showing echo commands or output during Add Plex Repository.

Add the Plex GPG key:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
Terminal showing curl commands or output during Add Plex Repository.

Update the package list:

apt update
Terminal showing APT package management commands and output.

Step 4: Install Plex Media Server

Install Plex:

apt install plexmediaserver
Terminal showing APT package management commands and output.

Start and enable Plex:

systemctl start plexmediaserver
systemctl enable plexmediaserver
Terminal showing systemd service management commands or output.

Verify that Plex is running:

systemctl is-enabled plexmediaserver
systemctl status plexmediaserver
Terminal showing systemd service management commands or output.

Step 5: Configure the Firewall

Install UFW and allow necessary traffic:

apt install ufw -y
ufw allow OpenSSH
ufw allow 32400
Terminal showing APT package management commands and output.
Terminal showing firewall configuration commands and rules.

Enable and check the status:

ufw enable
ufw status
Terminal showing firewall configuration commands and rules.
Terminal showing firewall configuration commands and rules.

Step 6: Install and Configure Nginx as a Reverse Proxy

Install Nginx:

apt install nginx
Terminal showing package installation trigger output.

Check if Nginx is enabled and running:

systemctl is-enabled nginx
systemctl status nginx
Terminal showing systemd service management commands or output.

Allow Nginx Full through the firewall:

ufw allow 'Nginx Full'
ufw reload
Terminal showing firewall configuration commands and rules.

Create a new Nginx server block for Plex:

nano /etc/nginx/sites-available/plex

Add this configuration, replacing the domain name with your own:

upstream plex_backend {
 server 127.0.0.1:32400;
 keepalive 32;
}

server {
 listen 80;
 server_name debian.shape.host;

 send_timeout 100m;
 gzip on;
 gzip_vary on;
 gzip_min_length 1000;
 gzip_proxied any;
 gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
 gzip_disable "MSIE [1-6]\.";

 client_max_body_size 100M;

 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;

 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "Upgrade";

 proxy_redirect off;
 proxy_buffering off;

 location / {
  proxy_pass http://plex_backend;
 }
}
Terminal showing web server configuration text.

Create a symbolic link to enable the site:

ln -s /etc/nginx/sites-available/plex /etc/nginx/sites-enabled/

Test the Nginx configuration:

nginx -t
Terminal showing Nginx configuration test output.

Restart Nginx:

systemctl restart nginx
Terminal showing systemd service management commands or output.

Step 7: Secure Plex with Let’s Encrypt SSL

Install Certbot:

apt install certbot python3-certbot-nginx
Terminal showing APT package management commands and output.

Generate an SSL certificate:

certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email contact@shape.host -d debian.shape.host
Terminal showing Certbot certificate commands and messages.

Step 8: Access Plex Media Server

Open your browser and visit:

https://debian.shape.host

You will be redirected to Plex.tv to register your Plex account.

Plex Web sign-in screen with available account providers.

Once registered, open a new tab and visit your Plex domain name. If your installation is successful, you should get the Plex Media Server dashboard like the following:

Terminal showing go commands or output during Access Plex Media Server.

For reliable performance, consider hosting Plex on Shape.Host’s Linux SSD VPS for high-speed access and maximum uptime.