Post

Plex Want To Sell My Personal Data Now

Welcome to this comprehensive guide on securing your self-hosted Plex server, ensuring that your personal data remains private and protected. With the increasing concern about data privacy, it's essential to.

# Plex Want To Sell My Personal Data Now? Secure Your Self-Hosted Plex Server!

Welcome to this comprehensive guide on securing your self-hosted Plex server, ensuring that your personal data remains private and protected. With the increasing concern about data privacy, it’s essential to take proactive measures to secure your infrastructure. This article focuses on setting up a secure, automatable Plex server using open-source tools and best DevOps practices.

Prerequisites

  • Ubuntu 20.04 LTS or later (system requirements may vary for other distributions)
  • Docker CE version 5.0.8 or higher (apt install docker-ce=5.0.8)
  • Docker Compose version 1.27.4 or higher (apt install docker-compose-plugin)
  • A text editor of your choice (e.g., VS Code, Nano)

Setup

1. Install Plex’s official Docker container

Pull the latest Plex Docker image:

1
docker pull plexinc/pms-docker:latest

2. Create a docker-compose.yml configuration file

Create and edit the following docker-compose.yml file, using your text editor of choice:

1
nano docker-compose.yml

Include the following content in your file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: '3'
services:
  plex:
    image: plexinc/pms-docker:latest
    container_name: plex
    environment:
      TZ: America/Los_Angeles # Set timezone here
      PLEX_CLAIM: ${PLEX_CLAIM} # Replace with your Plex Claim Code
      UID: 1000 # Set a custom UID for the container user (optional)
    volumes:
      - ./media:/data/PlexMediaServer # Mount your media directory
      - ./config:/config # Mount your configuration directory
    ports:
      - "32400:32400/udp" # Expose Plex's UDP Transcode port
      - "32469:32469/tcp" # Expose Plex's Web interface
      - "32470:32470/tcp" # Expose Plex's Signalling port
    restart: always

Note: Update the TZ, UID, media, and configuration directories according to your setup. The PLEX_CLAIM environment variable should be replaced with your actual Plex claim code.

3. Set up environment variables (optional)

To automate the process further and avoid hardcoding sensitive information in your docker-compose.yml, you can create a .env file containing your environment variables:

1
touch .env

Edit the .env file to include:

1
2
PLEX_CLAIM=your_plex_claim_code
TZ=America/Los_Angeles # Set timezone here

Tip: You can use tools like direnv to manage environment variables across your projects without the need for separate .env files.

4. Run your Plex server

Start and deploy your Plex container:

1
docker-compose up -d

Troubleshooting

If you encounter issues, verify that the container is running with:

1
docker ps

Check the logs for more detailed information:

1
docker-compose logs -f plex

Conclusion

By following this guide, you’ve set up a self-hosted, secure, and automatable Plex server. Keep in mind that this is only the beginning of your journey towards maintaining a robust infrastructure. Be aware of potential security concerns, such as unpatched software or insufficient access controls, and continuously monitor your system for vulnerabilities.

Remember to always prioritize data privacy and use open-source tools whenever possible to maintain control over your digital assets. Happy streaming! 📺⚙️

This post is licensed under CC BY 4.0 by the author.