-
-
Save stravos97/5c2159d4fb8eb33df75bb4700713e249 to your computer and use it in GitHub Desktop.
Setting up the Arr Stack (Sonarr, Radarr, Overseerr) with Gluetun(Nord VPN config)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base paths | |
BASE_PATH=CHANGE-ME # Base configuration directory (Different from Data_Path lcoation) | |
DATA_PATH=CHANGE-ME # Base data directory (Not /home) | |
MEDIA_PATH=${DATA_PATH}/media # Media storage location | |
DOWNLOADS_PATH=${DATA_PATH}/torrents # Download directory for qBittorrent (Different from Media_path location) | |
# Volume paths for different services | |
GLUETUN_VOLUME=${BASE_PATH}/gluetun | |
QBITTORRENT_CONFIG_VOLUME=${BASE_PATH}/qbittorrent/config | |
QBITTORRENT_DOWNLOADS_VOLUME=${DOWNLOADS_PATH} # Directory where media is downloaded | |
JACKETT_VOLUME=${BASE_PATH}/jackett | |
SONARR_CONFIG_VOLUME=${BASE_PATH}/sonarr | |
SONARR_TV_VOLUME=${DATA_PATH} # Directory for TV series and access to all data | |
RADARR_CONFIG_VOLUME=${BASE_PATH}/radarr | |
RADARR_MOVIES_VOLUME=${DATA_PATH} # Directory for movies and access to all data | |
BAZARR_MEDIA=${MEDIA_PATH} | |
OVERSEERR_VOLUME=${BASE_PATH}/overseerr | |
PLEX_VOLUME=${BASE_PATH}/plex | |
PLEX_TV_VOLUME=${MEDIA_PATH} | |
PLEX_MOVIES_VOLUME=${MEDIA_PATH} | |
PROWLARR_VOLUME=${BASE_PATH}/prowlarr/config | |
BAZARR_VOLUME=${BASE_PATH}/bazarr/config | |
# Gluetun environment variables | |
VPN_SERVICE_PROVIDER=nordvpn | |
VPN_TYPE=wireguard | |
WIREGUARD_PRIVATE_KEY=CHANGE-ME # Replace with your actual private key | |
WIREGUARD_ADDRESSES=CHANGE-ME/32 | |
TZ=CHANGE-ME | |
SERVER_REGIONS=Europe # Used for NordVPN | |
SERVER_CATEGORIES="Standard VPN servers,P2P" | |
UPDATER_PERIOD=24h # Taken from .json that is saved locally | |
UPDATER_VPN_SERVICE_PROVIDERS=nordvpn # Add other providers as needed | |
# qBittorrent environment variables | |
PUID=CHANGE-ME | |
PGID=CHANGE-ME | |
WEBUI_PORT=8080 | |
# Jackett environment variables | |
AUTO_UPDATE=true | |
# Plex environment variables | |
VERSION=docker | |
PLEX_CLAIM=CHANGE-ME # Replace with your actual Plex Claim key | |
# Flaresolverr environment variables | |
LOG_LEVEL=info | |
LOG_HTML=false | |
CAPTCHA_SOLVER=none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following sites were used for reference: | |
Arr Stack Docker Compose: https://github.com/JamesTurland/JimsGarage/blob/main/Torrent-VPN/docker-compose.yml | |
Config Arr Stack: https://gist.github.com/rickklaasboer/b5c159833ff2971fccd32296d8ba2260 | |
Config Arr Stack 2, media management: https://docs.saltbox.dev/saltbox/basics/basics/ | |
I found relevent directories and permissions need to be set before running the stack. I used the .sh script to accomplish that. | |
Use the following repo to get the Wireguard info for Gluten for NordVPN. | |
Use Access token generated from Manual Setup menu on the NordVPN site for the repo | |
https://github.com/mustafachyi/NordVPN-WireGuard-Config-Generator.git | |
This should give you a .conf file that looks like the following: | |
[Interface] | |
PrivateKey = SECRET-KEY | |
Address = IP-ADDRESS/16 | |
DNS = 103.86.96.100 | |
[Peer] | |
PublicKey = PUBLIC-KEY | |
AllowedIPs = 0.0.0.0/0, ::/0 | |
Endpoint = IP-ADDRESS:51820 | |
PersistentKeepalive = 25 | |
Use the SECRET-KEY and IP-ADDRESS for the .env above. | |
Server Region also needs to be changed for the .env above for Gluten. To find yours, generate a servers-list.md file with the command below to find your Server Region and Categories. | |
docker run --rm -v /home/CHANGE-ME/Downloads:/gluetun qmcgaw/gluetun format-servers -nordvpn --output=/gluetun/servers-list.md | |
Get your Plex Claim Code here: | |
https://www.plex.tv/claim/ | |
Get PUID and GID using the id command | |
Put all the files in one directory then run: | |
chmod +x setupScript.sh | |
./setupScript.sh | |
docker-compose up -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
gluetun: | |
image: qmcgaw/gluetun | |
container_name: gluetun | |
cap_add: | |
- NET_ADMIN | |
devices: | |
- /dev/net/tun:/dev/net/tun | |
ports: | |
- 6881:6881 | |
- 6881:6881/udp | |
- 8080:8080 # qbittorrent | |
- 9117:9117 # Jackett | |
- 8989:8989 # Sonarr | |
- 7878:7878 # Radarr | |
- 5055:5055 # Overseerr | |
- 6767:6767 # Bazarr | |
- 8191:8191 # FlareSolvarr | |
- 9696:9696 # Prowlarr | |
- 32400:32400 # Plex | |
volumes: | |
- ${GLUETUN_VOLUME}:/gluetun | |
environment: | |
- VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER} | |
- VPN_TYPE=${VPN_TYPE} | |
- WIREGUARD_PRIVATE_KEY=${WIREGUARD_PRIVATE_KEY} | |
- WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES} | |
- TZ=${TZ} | |
- UPDATER_PERIOD=${UPDATER_PERIOD} | |
- UPDATER_VPN_SERVICE_PROVIDERS=${UPDATER_VPN_SERVICE_PROVIDERS} | |
- SERVER_REGIONS=${SERVER_REGIONS} | |
- SERVER_CATEGORIES=${SERVER_CATEGORIES} | |
qbittorrent: | |
image: lscr.io/linuxserver/qbittorrent | |
container_name: qbittorrent | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
- WEBUI_PORT=${WEBUI_PORT} | |
- UMASK=022 | |
healthcheck: # https://github.com/qdm12/gluetun/issues/641#issuecomment-933856220 | |
test: "curl -sf https://1.1.1.1/ || exit 1" | |
interval: 1m | |
timeout: 10s | |
retries: 1 | |
volumes: | |
- ${QBITTORRENT_CONFIG_VOLUME}:/config | |
- ${QBITTORRENT_DOWNLOADS_VOLUME}:/data/torrents | |
restart: always | |
jackett: | |
image: lscr.io/linuxserver/jackett | |
container_name: jackett | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
- AUTO_UPDATE=${AUTO_UPDATE} | |
volumes: | |
- ${JACKETT_VOLUME}:/config | |
- ${QBITTORRENT_DOWNLOADS_VOLUME}:/downloads | |
restart: unless-stopped | |
sonarr: | |
image: lscr.io/linuxserver/sonarr:4.0.5 | |
container_name: sonarr | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
volumes: | |
- ${SONARR_CONFIG_VOLUME}:/config | |
- ${SONARR_TV_VOLUME}:/data | |
restart: unless-stopped | |
radarr: | |
image: lscr.io/linuxserver/radarr:5.6.0 | |
container_name: radarr | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
volumes: | |
- ${RADARR_CONFIG_VOLUME}:/config | |
- ${RADARR_MOVIES_VOLUME}:/data | |
restart: unless-stopped | |
overseerr: | |
image: lscr.io/linuxserver/overseerr:1.33.2 | |
container_name: overseerr | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
volumes: | |
- ${OVERSEERR_VOLUME}:/config | |
restart: unless-stopped | |
plex: | |
image: lscr.io/linuxserver/plex:1.40.2 | |
container_name: plex | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
- VERSION=${VERSION} | |
- PLEX_CLAIM=${PLEX_CLAIM} | |
volumes: | |
- ${PLEX_VOLUME}:/config | |
- ${PLEX_TV_VOLUME}:/data/media | |
- ${PLEX_MOVIES_VOLUME}:/data/media | |
restart: unless-stopped | |
flaresolverr: | |
image: ghcr.io/flaresolverr/flaresolverr:latest | |
container_name: flaresolverr | |
network_mode: "service:gluetun" | |
environment: | |
- LOG_LEVEL=${LOG_LEVEL} | |
- LOG_HTML=${LOG_HTML} | |
- CAPTCHA_SOLVER=${CAPTCHA_SOLVER} | |
- TZ=${TZ} | |
restart: unless-stopped | |
#Bazarr - for subtitles. Try to use SRT format if you can rather than PGS due to performance issues | |
bazarr: | |
container_name: bazarr | |
network_mode: "service:gluetun" | |
image: lscr.io/linuxserver/bazarr:latest | |
restart: unless-stopped | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
volumes: | |
- ${BAZARR_VOLUME}:/config | |
- ${BAZARR_MEDIA}:/data/media | |
prowlarr: | |
image: lscr.io/linuxserver/prowlarr:1.18.0 | |
container_name: prowlarr | |
network_mode: "service:gluetun" | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- TZ=${TZ} | |
volumes: | |
- ${PROWLARR_VOLUME}:/config | |
restart: unless-stopped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Base paths | |
BASE_PATH=CHANGE-ME # Base configuration directory (Different from Data_Path location) | |
DATA_PATH=CHANGE-ME # Base data directory (Not /home) | |
MEDIA_PATH=${DATA_PATH}/media # Media storage location | |
DOWNLOADS_PATH=${DATA_PATH}/torrents # Download directory for qBittorrent (Different from Media_path location) | |
# Volume paths for different services | |
GLUETUN_VOLUME=${BASE_PATH}/gluetun | |
QBITTORRENT_CONFIG_VOLUME=${BASE_PATH}/qbittorrent/config | |
QBITTORRENT_DOWNLOADS_VOLUME=${DOWNLOADS_PATH} # Directory where media is downloaded | |
JACKETT_VOLUME=${BASE_PATH}/jackett | |
SONARR_CONFIG_VOLUME=${BASE_PATH}/sonarr | |
SONARR_TV_VOLUME=${DATA_PATH} # Directory for TV series and access to all data | |
RADARR_CONFIG_VOLUME=${BASE_PATH}/radarr | |
RADARR_MOVIES_VOLUME=${DATA_PATH} # Directory for movies and access to all data | |
BAZARR_MEDIA=${MEDIA_PATH} | |
OVERSEERR_VOLUME=${BASE_PATH}/overseerr | |
PLEX_VOLUME=${BASE_PATH}/plex | |
PLEX_TV_VOLUME=${MEDIA_PATH} | |
PLEX_MOVIES_VOLUME=${MEDIA_PATH} | |
PROWLARR_VOLUME=${BASE_PATH}/prowlarr/config | |
BAZARR_VOLUME=${BASE_PATH}/bazarr/config | |
# Define directories based on volume paths | |
directories=( | |
"${GLUETUN_VOLUME}" | |
"${QBITTORRENT_CONFIG_VOLUME}" | |
"${QBITTORRENT_DOWNLOADS_VOLUME}" | |
"${JACKETT_VOLUME}" | |
"${SONARR_CONFIG_VOLUME}" | |
"${SONARR_TV_VOLUME}/tvseries" | |
"${RADARR_CONFIG_VOLUME}" | |
"${RADARR_MOVIES_VOLUME}/movies" | |
"${OVERSEERR_VOLUME}" | |
"${PLEX_VOLUME}" | |
"${PLEX_TV_VOLUME}" | |
"${PLEX_MOVIES_VOLUME}" | |
"${PROWLARR_VOLUME}" | |
"${BAZARR_VOLUME}" | |
"${BAZARR_MEDIA}/tvseries" | |
"${BAZARR_MEDIA}/movies" | |
) | |
# Create directories if they do not exist | |
for dir in "${directories[@]}"; do | |
mkdir -p "$dir" | |
done | |
# Change ownership to the current user for all directories | |
for dir in "${directories[@]}"; do | |
sudo chown -R $USER:$USER "$dir" | |
done | |
# Set appropriate permissions for directories and subdirectories | |
for dir in "${directories[@]}"; do | |
sudo chmod -R a=,a+rX,u+w,g+w "$dir" | |
done | |
echo "Directories have been created, ownership changed, and permissions set." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just an idea, but is there a way in which the
setup script.sh
can read the environment file, so for example if I put all 3 files in one location and then run the script it would do it all ?