Plex Media Server with Docker – Step-by-Step

Plex docker

Running Plex Media Server with Docker is a popular demand for organizing home media with Plex app. If you want to know a bit about the concept, Plex Media Server is a software application that allows users to manage and stream their media from a central location.

This blog entry only outlines the step-by-step procedures for getting the Plex Media Server up and running. So, let’s start.

1. Install docker to your remote Linux server, of course.

sudo apt install -y docker.io

2. Write a docker-compose.yml file to easily start the docker later. The sample file is as follows:

version: '3'

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - VERSION=docker
      - PLEX_CLAIM= #optional
    ports:
      - 32400:32400
    volumes:
      - ./library:/config
      - ./tvseries:/tv
      - ./movies:/movies
    restart: unless-stopped

After that, start the docker-compose.yml file as follows:

docker compose up -d

3. Plex Claim: This is a crucial step to getting the server option displayed in Plex Settings. If you do not do the claim step, your server will not be included in your Plex app, and you cannot manage your media files on that server.

  • First, we can only do the claim process via port tunneling with SSH. Let’s log in to the Plex server with port tunneling enabled:
ssh -p 22 root@YOUR_REMOTE_IP_ADDRESS -L 32400:localhost:32400
  • Then, accessing the Plex Web UI from the local IP address and Plex will continue to the claiming process automatically:
http://127.0.0.1:32400/web/

Done. Now, you can access the newly added server from your Plex app.

Leave a comment

Your email address will not be published. Required fields are marked *