Piracy is back in a big way
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
- Proxmox VE: A running instance of Proxmox VE.
- Proxmox LXC Container: A Linux container (LXC) running Ubuntu/Debian.
- ProtonVPN Account: Ensure you have login credentials and an OpenVPN configuration file from ProtonVPN.
- 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
-
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.
-
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.
-
-
Access Portainer:
- After installation, access Portainer by navigating to
http://<LXC_IP>:9000
in your browser. - Complete the initial setup, creating an admin user.
- After installation, access Portainer by navigating to
Step 2: Set Up Docker Compose for Sonarr, Radarr, Lidarr, Prowlarr, SABnzbd, and Gluetun
-
Prepare Docker Compose File:
-
In your LXC container, create a directory for your Docker Compose files:
Terminal window mkdir ~/docker/composecd ~/docker/compose -
Create a
docker-compose.yml
file with the following content:version: '3.8'services:gluetun:image: qmcgaw/gluetuncontainer_name: gluetuncap_add:- NET_ADMINports:- 8080:8080/tcp # HTTP Proxy- 8388:8388/tcp # Shadowsocks- 8388:8388/udp # Shadowsocks- 9091:9091 # Transmissionenvironment:- 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.8volumes:- /path/to/your/config:/gluetunrestart: unless-stoppedsonarr:image: linuxserver/sonarrcontainer_name: sonarrenvironment:- PUID=1000- PGID=1000- TZ=Europe/Londonvolumes:- /path/to/your/sonarr/config:/config- /path/to/your/tv/shows:/tv- /path/to/your/downloads:/downloadsnetwork_mode: service:gluetundepends_on:- gluetunrestart: unless-stoppedradarr:image: linuxserver/radarrcontainer_name: radarrenvironment:- PUID=1000- PGID=1000- TZ=Europe/Londonvolumes:- /path/to/your/radarr/config:/config- /path/to/your/movies:/movies- /path/to/your/downloads:/downloadsnetwork_mode: service:gluetundepends_on:- gluetunrestart: unless-stoppedlidarr:image: linuxserver/lidarrcontainer_name: lidarrenvironment:- PUID=1000- PGID=1000- TZ=Europe/Londonvolumes:- /path/to/your/lidarr/config:/config- /path/to/your/music:/music- /path/to/your/downloads:/downloadsnetwork_mode: service:gluetundepends_on:- gluetunrestart: unless-stoppedprowlarr:image: linuxserver/prowlarrcontainer_name: prowlarrenvironment:- PUID=1000- PGID=1000- TZ=Europe/Londonvolumes:- /path/to/your/prowlarr/config:/confignetwork_mode: service:gluetundepends_on:- gluetunrestart: unless-stoppedsabnzbd:image: linuxserver/sabnzbdcontainer_name: sabnzbdenvironment:- PUID=1000- PGID=1000- TZ=Europe/Londonvolumes:- /path/to/your/sabnzbd/config:/config- /path/to/your/downloads:/downloadsnetwork_mode: service:gluetundepends_on:- gluetunrestart: unless-stoppedReplace
<your_protonvpn_username>
,<your_protonvpn_password>
,<your_preferred_country>
, and/path/to/your/...
with your actual data.
-
-
Deploy the Stack via Portainer:
- In Portainer, go to “Stacks” and click “Add Stack.”
- Name your stack (e.g.,
MediaStack
) and paste thedocker-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
-
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.
-
-
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.
- After the LXC is created, navigate to
-
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
-
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.
-
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).
- You can access your media applications via the IP address of your LXC container and the respective ports (e.g.,
-
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).
-
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.