Add sabnzbd (#29)
* Added plex permissions and folder structure * corrected typo * Added sabnzbd support * Fix folder creation for usenet * Tweak for sabnzbd config path * Changed download path * Update docker-compose.yml * Update docker-compose.yml * Update README.md
This commit is contained in:
@@ -24,6 +24,8 @@ crash*. It doesn't necessarily mean it will run well on your system ;) It featur
|
|||||||
- [Jackett](https://github.com/Jackett/Jackett) is an alternative to Prowlarr.
|
- [Jackett](https://github.com/Jackett/Jackett) is an alternative to Prowlarr.
|
||||||
- [qBittorrent](https://www.qbittorrent.org/) can download torrents and provides a bunch more
|
- [qBittorrent](https://www.qbittorrent.org/) can download torrents and provides a bunch more
|
||||||
features for management.
|
features for management.
|
||||||
|
- [SABnzbd](https://sabnzbd.org/) can download nzb's
|
||||||
|
features for management.
|
||||||
- [PleX](https://www.plex.tv/) is a mediaserver. Using this, you get access to a Netflix-like
|
- [PleX](https://www.plex.tv/) is a mediaserver. Using this, you get access to a Netflix-like
|
||||||
interface across many devices like your laptop or computer, your phone, your TV and more. For
|
interface across many devices like your laptop or computer, your phone, your TV and more. For
|
||||||
some features, you need a [PleX pass](https://www.plex.tv/nl/plex-pass/).
|
some features, you need a [PleX pass](https://www.plex.tv/nl/plex-pass/).
|
||||||
@@ -72,6 +74,12 @@ take a look at [important notes](#important-notes) before you continue.
|
|||||||
- You'll have to add indexers in Prowlarr by hand. Use Prowlarrs settings to connect it to the
|
- You'll have to add indexers in Prowlarr by hand. Use Prowlarrs settings to connect it to the
|
||||||
other -arr apps.
|
other -arr apps.
|
||||||
|
|
||||||
|
### SABnzbd External internet access denied message
|
||||||
|
When you're trying to access SABnzbd the first time you'll come across the message "External internet access denied".
|
||||||
|
To fix this simple modify the `sabnzbd.ini` and change `inet_exposure` to `4`, restart the docker container for sabnzbd (`docker restart sabnzbd`) and now you can access the UI of SABnzbd. After accessing the UI don't forget to set a username and password (https://sabnzbd.org/wiki/configuration/3.7/general , section Security).
|
||||||
|
|
||||||
|
For more instructions or help see also https://sabnzbd.org/wiki/extra/access-denied.html on the official SABnzbd website.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### Why do I need to set some settings myself, can that be added?
|
### Why do I need to set some settings myself, can that be added?
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ContainerConfig:
|
|||||||
self.book_dir = root_dir + '/media/books'
|
self.book_dir = root_dir + '/media/books'
|
||||||
self.comic_dir = root_dir + '/media/comics'
|
self.comic_dir = root_dir + '/media/comics'
|
||||||
self.torrent_dir = root_dir + '/data/torrents'
|
self.torrent_dir = root_dir + '/data/torrents'
|
||||||
|
self.usenet_dir = root_dir + '/data/usenet'
|
||||||
|
|
||||||
def plex(self):
|
def plex(self):
|
||||||
return (
|
return (
|
||||||
@@ -22,7 +23,7 @@ class ContainerConfig:
|
|||||||
' container_name: plex\n'
|
' container_name: plex\n'
|
||||||
' network_mode: host\n'
|
' network_mode: host\n'
|
||||||
' environment:\n'
|
' environment:\n'
|
||||||
' - PUID=${UID}\n'
|
' - PUID=13010\n'
|
||||||
' - PGID=13000\n'
|
' - PGID=13000\n'
|
||||||
' - VERSION=docker\n'
|
' - VERSION=docker\n'
|
||||||
' - PLEX_CLAIM=' + self.plex_claim + '\n'
|
' - PLEX_CLAIM=' + self.plex_claim + '\n'
|
||||||
@@ -229,3 +230,21 @@ class ContainerConfig:
|
|||||||
' - "5055:5055"\n'
|
' - "5055:5055"\n'
|
||||||
' restart: unless-stopped\n\n'
|
' restart: unless-stopped\n\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def sabnzbd(self):
|
||||||
|
return (
|
||||||
|
' sabnzbd:\n'
|
||||||
|
' image: lscr.io/linuxserver/sabnzbd:latest\n'
|
||||||
|
' container_name: sabnzbd\n'
|
||||||
|
' environment:\n'
|
||||||
|
' - PUID=13011\n'
|
||||||
|
' - PGID=13000\n'
|
||||||
|
' - UMASK=002\n'
|
||||||
|
' - TZ=' + self.timezone + '\n'
|
||||||
|
' volumes:\n'
|
||||||
|
' - ' + self.config_dir + '/sabnzbd-config:/config\n'
|
||||||
|
' - ' + self.usenet_dir + ':/downloads\n'
|
||||||
|
' ports:\n'
|
||||||
|
' - "8081:8080"\n'
|
||||||
|
' restart: unless-stopped\n\n'
|
||||||
|
)
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ services:
|
|||||||
container_name: plex
|
container_name: plex
|
||||||
network_mode: host
|
network_mode: host
|
||||||
environment:
|
environment:
|
||||||
- PUID=${UID}
|
- PUID=13010
|
||||||
- PGID=13000
|
- PGID=13000
|
||||||
- VERSION=docker
|
- VERSION=docker
|
||||||
- PLEX_CLAIM=
|
- PLEX_CLAIM=
|
||||||
@@ -166,3 +166,17 @@ services:
|
|||||||
- "6881:6881/udp"
|
- "6881:6881/udp"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
sabnzbd:
|
||||||
|
image: lscr.io/linuxserver/sabnzbd:latest
|
||||||
|
container_name: sabnzbd
|
||||||
|
environment:
|
||||||
|
- PUID=13011
|
||||||
|
- PGID=13000
|
||||||
|
- UMASK=002
|
||||||
|
- TZ=Europe/Amsterdam
|
||||||
|
volumes:
|
||||||
|
- /home/user/ezarr/config/sabnzbd-config:/config
|
||||||
|
- /home/user/ezarr/data/usenet:/data/usenet
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
|
restart: unless-stopped
|
||||||
|
|||||||
10
main.py
10
main.py
@@ -81,8 +81,14 @@ print('\n===BITTORRENT===')
|
|||||||
services_classed['torrent'] = []
|
services_classed['torrent'] = []
|
||||||
print('Use qBittorrent? [Y/n]', end=" ")
|
print('Use qBittorrent? [Y/n]', end=" ")
|
||||||
take_input('qbittorrent', 'torrent')
|
take_input('qbittorrent', 'torrent')
|
||||||
if len(services_classed['torrent']) == 0:
|
|
||||||
print('Warning: no BitTorrent clients selected.')
|
print('\n===USENET===')
|
||||||
|
services_classed['usenet'] = []
|
||||||
|
print('Use SABnzbd? [Y/n]', end=" ")
|
||||||
|
take_input('sabnzbd', 'usenet')
|
||||||
|
|
||||||
|
if len(services_classed['torrent']) == 0 and len(services_classed['usenet']) == 0:
|
||||||
|
print('Warning: no usenet or BitTorrent clients selected.')
|
||||||
|
|
||||||
services = []
|
services = []
|
||||||
for service_class in services_classed.keys():
|
for service_class in services_classed.keys():
|
||||||
|
|||||||
10
setup.sh
10
setup.sh
@@ -10,6 +10,8 @@ sudo useradd prowlarr -u 13006
|
|||||||
sudo useradd qbittorrent -u 13007
|
sudo useradd qbittorrent -u 13007
|
||||||
sudo useradd jackett -u 13008
|
sudo useradd jackett -u 13008
|
||||||
sudo useradd overseerr -u 13009
|
sudo useradd overseerr -u 13009
|
||||||
|
sudo useradd plex -u 13010
|
||||||
|
sudo useradd sabnzbd -u 13011
|
||||||
sudo groupadd mediacenter -g 13000
|
sudo groupadd mediacenter -g 13000
|
||||||
sudo usermod -a -G mediacenter sonarr
|
sudo usermod -a -G mediacenter sonarr
|
||||||
sudo usermod -a -G mediacenter radarr
|
sudo usermod -a -G mediacenter radarr
|
||||||
@@ -20,10 +22,12 @@ sudo usermod -a -G mediacenter prowlarr
|
|||||||
sudo usermod -a -G mediacenter qbittorrent
|
sudo usermod -a -G mediacenter qbittorrent
|
||||||
sudo usermod -a -G mediacenter jackett
|
sudo usermod -a -G mediacenter jackett
|
||||||
sudo usermod -a -G mediacenter overseerr
|
sudo usermod -a -G mediacenter overseerr
|
||||||
|
sudo usermod -a -G mediacenter plex
|
||||||
|
sudo usermod -a -G mediacenter sabnzbd
|
||||||
|
|
||||||
# Make directories
|
# Make directories
|
||||||
sudo mkdir -pv docker/{sonarr,radarr,lidarr,readarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,overseerr}-config
|
sudo mkdir -pv docker/{sonarr,radarr,lidarr,readarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,overseerr,plex,tautulli,sabnzbd}-config
|
||||||
sudo mkdir -pv data/{torrents,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata}
|
sudo mkdir -pv data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata}
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
sudo chmod -R 775 data/
|
sudo chmod -R 775 data/
|
||||||
@@ -37,5 +41,7 @@ sudo chown -R prowlarr:mediacenter docker/prowlarr-config
|
|||||||
sudo chown -R qbittorrent:mediacenter docker/qbittorrent-config
|
sudo chown -R qbittorrent:mediacenter docker/qbittorrent-config
|
||||||
sudo chown -R jackett:mediacenter docker/jackett-config
|
sudo chown -R jackett:mediacenter docker/jackett-config
|
||||||
sudo chown -R overseerr:mediacenter docker/overseerr-config
|
sudo chown -R overseerr:mediacenter docker/overseerr-config
|
||||||
|
sudo chown -R plex:mediacenter docker/plex-config
|
||||||
|
sudo chown -R sabnzbd:mediacenter docker/sabnzbd-config
|
||||||
|
|
||||||
echo "UID=$(id -u)" >> .env
|
echo "UID=$(id -u)" >> .env
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ class UserGroupSetup:
|
|||||||
def sonarr(self):
|
def sonarr(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd sonarr -u 13001'
|
'/bin/bash -c "sudo useradd sonarr -u 13001'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/tv -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/tv -m 775'
|
||||||
' ; sudo chown -R sonarr:mediacenter ' + self.root_dir + '/data/{media,torrents}/tv'
|
' ; sudo chown -R sonarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/tv'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('sonarr')
|
self.create_config_dir('sonarr')
|
||||||
os.system('sudo usermod -a -G mediacenter sonarr')
|
os.system('sudo usermod -a -G mediacenter sonarr')
|
||||||
@@ -27,10 +27,10 @@ class UserGroupSetup:
|
|||||||
def radarr(self):
|
def radarr(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd radarr -u 13002'
|
'/bin/bash -c "sudo useradd radarr -u 13002'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/movies -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/movies -m 775'
|
||||||
' ; sudo chown -R radarr:mediacenter ' + self.root_dir + '/data/{media,torrents}/movies'
|
' ; sudo chown -R radarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/movies'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('radarr')
|
self.create_config_dir('radarr')
|
||||||
os.system('sudo usermod -a -G mediacenter radarr')
|
os.system('sudo usermod -a -G mediacenter radarr')
|
||||||
@@ -38,10 +38,10 @@ class UserGroupSetup:
|
|||||||
def lidarr(self):
|
def lidarr(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd lidarr -u 13003'
|
'/bin/bash -c "sudo useradd lidarr -u 13003'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/music -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/music -m 775'
|
||||||
' ; sudo chown -R lidarr:mediacenter ' + self.root_dir + '/data/{media,torrents}/music'
|
' ; sudo chown -R lidarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/music'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('lidarr')
|
self.create_config_dir('lidarr')
|
||||||
os.system('sudo usermod -a -G mediacenter lidarr')
|
os.system('sudo usermod -a -G mediacenter lidarr')
|
||||||
@@ -49,10 +49,10 @@ class UserGroupSetup:
|
|||||||
def readarr(self):
|
def readarr(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd readarr -u 13004'
|
'/bin/bash -c "sudo useradd readarr -u 13004'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/books -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/books -m 775'
|
||||||
' ; sudo chown -R readarr:mediacenter ' + self.root_dir + '/data/{media,torrents}/books'
|
' ; sudo chown -R readarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/books'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('readarr')
|
self.create_config_dir('readarr')
|
||||||
os.system('sudo usermod -a -G mediacenter readarr')
|
os.system('sudo usermod -a -G mediacenter readarr')
|
||||||
@@ -60,10 +60,10 @@ class UserGroupSetup:
|
|||||||
def mylar3(self):
|
def mylar3(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd mylar -u 13005'
|
'/bin/bash -c "sudo useradd mylar -u 13005'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/comics -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/comics -m 775'
|
||||||
' ; sudo chown -R mylar:mediacenter ' + self.root_dir + '/data/{media,torrents}/comics'
|
' ; sudo chown -R mylar:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/comics'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('mylar')
|
self.create_config_dir('mylar')
|
||||||
os.system('sudo usermod -a -G mediacenter mylar')
|
os.system('sudo usermod -a -G mediacenter mylar')
|
||||||
@@ -71,10 +71,10 @@ class UserGroupSetup:
|
|||||||
def audiobookshelf(self):
|
def audiobookshelf(self):
|
||||||
os.system(
|
os.system(
|
||||||
'/bin/bash -c "sudo useradd audiobookshelf -u 13009'
|
'/bin/bash -c "sudo useradd audiobookshelf -u 13009'
|
||||||
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,torrents}/audiobooks -m 775'
|
' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/audiobooks -m 775'
|
||||||
' ; sudo chown -R audiobookshelf:mediacenter ' + self.root_dir + '/data/{media,torrents}/audiobooks'
|
' ; sudo chown -R audiobookshelf:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/audiobooks'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data'
|
||||||
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,torrents}"'
|
' ; sudo chown $(id -u):mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}"'
|
||||||
)
|
)
|
||||||
self.create_config_dir('audiobookshelf')
|
self.create_config_dir('audiobookshelf')
|
||||||
os.system('sudo usermod -a -G mediacenter audiobookshelf')
|
os.system('sudo usermod -a -G mediacenter audiobookshelf')
|
||||||
@@ -93,3 +93,12 @@ class UserGroupSetup:
|
|||||||
self.create_config_dir('overseerr')
|
self.create_config_dir('overseerr')
|
||||||
os.system('sudo usermod -a -G mediacenter overseerr')
|
os.system('sudo usermod -a -G mediacenter overseerr')
|
||||||
|
|
||||||
|
def plex(self):
|
||||||
|
os.system('sudo useradd plex -u 13010')
|
||||||
|
self.create_config_dir('plex')
|
||||||
|
os.system('sudo usermod -a -G mediacenter plex')
|
||||||
|
|
||||||
|
def sabnzbd(self):
|
||||||
|
os.system('sudo useradd sabnzbd -u 13011')
|
||||||
|
self.create_config_dir('sabnzbd')
|
||||||
|
os.system('sudo usermod -a -G mediacenter sabnzbd')
|
||||||
|
|||||||
Reference in New Issue
Block a user