Piracy is back in a big way

Piracy is back in a big way

Feb 15 ·
4 Min Read

Guide to Self-Host Sonarr, Radarr, Lidarr, Prowlarr, SABnzbd with Traffic Routed through Gluetun (ProtonVPN) in Proxmox LXC

This guide will walk you through setting up a media server with Sonarr, Radarr, Lidarr, Prowlarr, and SABnzbd, ensuring all traffic is routed securely through a Gluetun container configured for ProtonVPN. We’ll use Docker and Portainer on a Proxmox LXC container. Additionally, we’ll set up a separate LXC container for Plex to play the downloaded media.

Prerequisites

  1. Proxmox VE: A running instance of Proxmox VE.
  2. Proxmox LXC Container: A Linux container (LXC) running Ubuntu/Debian.
  3. ProtonVPN Account: Ensure you have login credentials and an OpenVPN configuration file from ProtonVPN.
  4. Access to Proxmox and the LXC Container: You’ll need SSH or console access.

Step 1: Set Up the Proxmox LXC Container with Docker and Portainer

  1. Create the LXC Container:

    • Access your Proxmox web interface.
    • Create a new LXC container using Ubuntu/Debian as the template.
    • Allocate resources based on your needs (e.g., 2 CPU cores, 2GB RAM).
    • Ensure the container has network access.
  2. Install Docker and Portainer:

    • SSH into the LXC container.

    • Run the following commands to install Docker and Portainer using the script from Tteck’s GitHub:

      Terminal window
      bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-proxmox.sh)"
    • This script will install Docker, Docker Compose, and Portainer automatically.

  3. Access Portainer:

    • After installation, access Portainer by navigating to http://<LXC_IP>:9000 in your browser.
    • Complete the initial setup, creating an admin user.

Step 2: Set Up Docker Compose for Sonarr, Radarr, Lidarr, Prowlarr, SABnzbd, and Gluetun

  1. Prepare Docker Compose File:

    • In your LXC container, create a directory for your Docker Compose files:

      Terminal window
      mkdir ~/docker/compose
      cd ~/docker/compose
    • Create a docker-compose.yml file with the following content:

      version: '3.8'
      services:
      gluetun:
      image: qmcgaw/gluetun
      container_name: gluetun
      cap_add:
      - NET_ADMIN
      ports:
      - 8080:8080/tcp # HTTP Proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 9091:9091 # Transmission
      environment:
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=openvpn
      - OPENVPN_USER=<your_protonvpn_username>
      - OPENVPN_PASSWORD=<your_protonvpn_password>
      - SERVER_COUNTRIES=<your_preferred_country>
      - HEALTHY_PING_TARGET=8.8.8.8
      volumes:
      - /path/to/your/config:/gluetun
      restart: unless-stopped
      sonarr:
      image: linuxserver/sonarr
      container_name: sonarr
      environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      volumes:
      - /path/to/your/sonarr/config:/config
      - /path/to/your/tv/shows:/tv
      - /path/to/your/downloads:/downloads
      network_mode: service:gluetun
      depends_on:
      - gluetun
      restart: unless-stopped
      radarr:
      image: linuxserver/radarr
      container_name: radarr
      environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      volumes:
      - /path/to/your/radarr/config:/config
      - /path/to/your/movies:/movies
      - /path/to/your/downloads:/downloads
      network_mode: service:gluetun
      depends_on:
      - gluetun
      restart: unless-stopped
      lidarr:
      image: linuxserver/lidarr
      container_name: lidarr
      environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      volumes:
      - /path/to/your/lidarr/config:/config
      - /path/to/your/music:/music
      - /path/to/your/downloads:/downloads
      network_mode: service:gluetun
      depends_on:
      - gluetun
      restart: unless-stopped
      prowlarr:
      image: linuxserver/prowlarr
      container_name: prowlarr
      environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      volumes:
      - /path/to/your/prowlarr/config:/config
      network_mode: service:gluetun
      depends_on:
      - gluetun
      restart: unless-stopped
      sabnzbd:
      image: linuxserver/sabnzbd
      container_name: sabnzbd
      environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      volumes:
      - /path/to/your/sabnzbd/config:/config
      - /path/to/your/downloads:/downloads
      network_mode: service:gluetun
      depends_on:
      - gluetun
      restart: unless-stopped

      Replace <your_protonvpn_username>, <your_protonvpn_password>, <your_preferred_country>, and /path/to/your/... with your actual data.

  2. Deploy the Stack via Portainer:

    • In Portainer, go to “Stacks” and click “Add Stack.”
    • Name your stack (e.g., MediaStack) and paste the docker-compose.yml content.
    • Click “Deploy the Stack.” Portainer will pull the necessary images and start the containers.

Step 3: Install Plex LXC to Play Downloaded Media

  1. Create the Plex LXC:

    • Return to the Proxmox web interface.

    • Use Tteck’s Proxmox scripts to install Plex. SSH into Proxmox and run:

      Terminal window
      bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex.sh)"
    • This script will create an LXC container specifically for Plex, with all necessary configurations.

  2. Configure Plex:

    • After the LXC is created, navigate to http://<Plex_LXC_IP>:32400/web to access the Plex web interface.
    • Follow the setup wizard to configure Plex.
    • Add your media libraries by pointing Plex to the directories where SABnzbd downloads the media. These directories should be shared between your media LXC and the Plex LXC via a network share or a mounted storage location.
  3. Start Streaming:

    • Once your libraries are set up, Plex will scan and organize your media, making it available for streaming on any device.

Step 4: Verifying the Setup

  1. Check Container Status:

    • Go to the “Containers” section in Portainer to verify that all containers are running.
    • Ensure the Gluetun container is marked as healthy.
  2. Access Your Applications:

    • You can access your media applications via the IP address of your LXC container and the respective ports (e.g., http://<LXC_IP>:8989 for Sonarr).
  3. Test VPN Routing:

    • Confirm that your media applications’ traffic is routed through the VPN by checking the external IP within the container or using an online service (e.g., checkip.dyndns.org).
  4. Stream Media via Plex:

    • Test Plex by streaming media from your newly downloaded content.

Conclusion

You’ve successfully set up a comprehensive media server with Sonarr, Radarr, Lidarr, Prowlarr, SABnzbd, and Plex, all routed securely through ProtonVPN using Gluetun. By using Docker Compose and Portainer, you’ve streamlined the management and deployment of these services within a Proxmox LXC container. Plex adds the final touch by allowing you to enjoy your media across all your devices.

Last edited Feb 15