├── .gitignore ├── LICENSE ├── README.md ├── build.sh └── include ├── docker-compose.yml.tmpl ├── fail2ban ├── docker-action.conf ├── jail.txt ├── nginx-badbots.conf └── nginx-http-auth.conf ├── functions.sh ├── glances.conf ├── headphones.ini ├── https.sh ├── install.sh ├── letsencrypt.sh ├── main.sh ├── nginx.conf.tmpl ├── services.conf.tmpl ├── update.sh └── updateContainers.sh /.gitignore: -------------------------------------------------------------------------------- 1 | docker-compose.yml 2 | /nginx.conf 3 | /services.conf 4 | Dockerfiles/explorer 5 | Dockerfiles/filemanager/Filemanager-master.zip 6 | htpasswd.txt 7 | local.sh 8 | /ssl 9 | tmp 10 | createVpnFor.sh 11 | *.ovpn 12 | help 13 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 cloneMe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # turbo-seedbox 2 | 3 | This project deploys a **multi-users** seedbox, using Docker. It will install docker automatically, if needed, and deploy following servers: 4 | - rtorrent: to download torrent. 5 | - sickrage: Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic. 6 | - couchpotato: same thing but for films. 7 | - headphones: same thing but for music. 8 | - plex, emby and limboserver: to stream videos from your server to your TV or laptop. 9 | - some monitoring tools: glances, plexPy 10 | - muximux: Lightweight portal to your webapps https://github.com/mescon/Muximux 11 | - a VPN server: openVPN. 12 | - a teamspeak server. 13 | - a FTP server, some file managers (https://github.com/Studio-42/elFinder), cloud, syncthing, ... 14 | - portainer, butterfly 15 | - WARNING: By default, fail2ban is deployed to protect the host. You have only one try to connect using SSH. If you enter an incorrect password, you will be ban during 1 hour. And you have three tries for websites. See include/fail2ban. 16 | 17 | 18 | ## 0. Download sources 19 | ### 0.1 Install Docker 20 | - On Linux: 21 | You can skip this part, it's done automatically. 22 | - On Mac or Windows: 23 | see: https://docs.docker.com/engine/installation/ 24 | 25 | ### 0.2 Download sources 26 | On Windows, I recommend you to install this project in your home, i.e.: C:\Users\< user >\docker. (if you use Hyper-V to virtualize the Docker Engine, you can install it where you want) 27 | ```bash 28 | git clone https://github.com/cloneMe/turbo-seedbox.git 29 | cd turbo-seedbox 30 | chmod +x build.sh 31 | ``` 32 | 33 | ## 1. Configuration 34 | ### 1.1 Create your users 35 | Run the following command to create an user: 36 | ```bash 37 | printf ":$(openssl passwd -crypt )\n" >> htpasswd.txt 38 | ``` 39 | Or do nothing and a htpasswd.txt file will be generated with two users: foo and bar, using the password foo. 40 | Example to create bar: 41 | ```bash 42 | printf "bar:$(openssl passwd -crypt foo)\n" >> htpasswd.txt 43 | ``` 44 | 45 | ### 1.2 Edit properties in build.sh 46 | By default: 47 | - The host is 192.168.99.100. Please update the `server_name` property. 48 | - All servers with the property at true will be deployed. 49 | - Files created by servers are saved in the parent folder. To use another folder, change the `seedboxFiles` property. Following folders will be created: 50 | * config 51 | * downloads 52 | * log 53 | 54 | ### 1.3 [optional] Configure your DNS 55 | Following subdomains can be used: files, explorer. It depends of what you have defined in build.sh. 56 | If your DNS handle wildcards, you are lucky. 57 | Otherwise, you need to declare each subdomain. 58 | 59 | ## 2. Run build.sh 60 | It will: 61 | - Install Docker if needed. 62 | - Generate docker-compose & nginx. These files depend on users in htpasswd.txt. If you add or remove an user, you have to launch ./build.sh again. 63 | - Launch servers. 64 | - Update servers' configuration (Sickrage & Couchpotato). 65 | 66 | ## 3. Server configuration 67 | **After launching build.sh, a folder named "help" is generated ;)** 68 | 69 | Plex 70 | Issue : Plex NEVER asks for authentication. Everybody can access to it :/ 71 | `nano $seedboxFiles/config/plex/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml` 72 | There is "Disable Remote Security=1". Changed that 1 to a 0 and restarted my Plex : docker restart seedboxdocker_plex_1 73 | Src : https://forums.plex.tv/discussion/132399/plex-security-issue 74 | 75 | 76 | ## ... 77 | 78 | * To start all servers: `docker-compose up -d`. The first time, take a coffee or a beer ;) This step depends of: 79 | -- your connection, you have to download 1.7G or 3G :/ 80 | -- your CPU, the server will not respond, i.e. console frozen, during a while with an Intel C2350 1,70GHz ;) 81 | * To see logs: `docker-compose logs` 82 | * To stop all servers: `docker-compose stop` 83 | * To stop all servers+: `docker stop $(docker ps -q)` 84 | * To check resources used: `docker stats` 85 | * all containers use restart, so run the following command to not launch containers at startup: 86 | `docker-compose rm` 87 | * To remove images: `docker ps -a | awk '{print $1}' | xargs --no-run-if-empty docker rm` 88 | * Delete all containers `docker rm $(docker ps -a -q)` 89 | * Delete all images `docker rmi $(docker images -q)` 90 | 91 | 92 | ##### To note 93 | * On all pages, you should have a popup asking your login/password. 94 | * On http://__your domain.com__/couchpotato, if you have a page displaying "NON". It means that nginx is working but your couchpotato server does not have a correct configuration. 95 | * If after some tries, the popup asking your login/password does not show up, it means you have been banned during one hour :p (set fail2ban to false to authorize brute force attacks ;) 96 | * If file=true and you have "_This site can’t be reached files.domain.com's server DNS address could not be found. ERR NAME NOT RESOLVED_", please check your DNS configuration OR wait a while. 97 | 98 | 99 | 100 | 101 | # [For dev] 102 | - run `cp build.sh local.sh` and work with local.sh 103 | ## Windows users 104 | - Edit your C:\Windows\System32\drivers\etc\hosts 105 | 106 | And add (if the docker's IP is 192.168.99.100, run "docker-machine ip default" to know it) 107 | ``` 108 | 192.168.99.100 dock 109 | 192.168.99.100 files.dock 110 | 192.168.99.100 explorer.dock 111 | ``` 112 | Then you can access to servers using these urls: 113 | ``` 114 | http://files.dock 115 | http://explorer.dock 116 | ``` 117 | ## Linux users 118 | - Edit your /etc/hosts 119 | ``` 120 | 127.0.0.1 dock 121 | ... 122 | ``` 123 | 124 | # Links 125 | https://github.com/Kelvin-Chen/seedbox 126 | 127 | Docker : https://github.com/wsargent/docker-cheat-sheet 128 | 129 | Plex: https://hub.docker.com/r/timhaak/plex/ 130 | https://forums.plex.tv/discussion/132399/plex-security-issue 131 | 132 | Emby: https://github.com/MediaBrowser/Emby 133 | 134 | LimboMedia: http://limbomedia.net/ 135 | 136 | Explorer: https://github.com/soyuka/explorer 137 | 138 | Sickrage: https://mondedie.fr/viewtopic.php?id=6674 139 | 140 | rtorrent : https://github.com/gaaara/gaaara/blob/master/rtorrent-useradd 141 | https://mondedie.fr/viewtopic.php?id=5399 142 | https://github.com/ifsred/media-server 143 | https://github.com/david-sawatzke/rtorrent-rutorrent 144 | https://github.com/diameter/rtorrent-rutorrent 145 | 146 | HTTPS 147 | https://mondedie.fr/viewtopic.php?id=7414 148 | https://www.kassianoff.fr/blog/fr/let-encrypt-certificat-gratuit-valide 149 | https://blog.ouvrard.it/2016/03/18/lets-encrypt-nginx/ 150 | https://github.com/mazelab/docker-ftp/blob/master/Dockerfile 151 | https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion 152 | Webserver with nginx, letsencrypt and fail2ban built-in: 153 | https://hub.docker.com/r/aptalca/nginx-letsencrypt/ 154 | https://github.com/luiz-simples/docker-webserver 155 | 156 | e-mails 157 | https://mondedie.fr/viewtopic.php?id=5750 158 | https://github.com/hardware/mailserver/blob/master/docker-compose.sample.yml 159 | 160 | Fail2ban 161 | https://mondedie.fr/viewtopic.php?id=6978 162 | https://hub.docker.com/r/voobscout/base-deb/ 163 | 164 | Other 165 | https://github.com/webdevops/Dockerfile 166 | 167 | 168 | ## Why? 169 | I did this to learn and because I could not find a seedbox easy to install & multi-users. 170 | 171 | Kiss. 172 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # MAINTAINER https://github.com/cloneMe 3 | 4 | # run "docker-machine ip default" or set your domain name 5 | server_name=127.0.0.1 6 | # Possible value for useHttps: false or letsEncrypt or self or provided 7 | # letsEncrypt: Let's Encrypt is a free, automated, and open certificate authority brought to you 8 | # self: generate a self-signed certificate 9 | # provided: you have to provide following certificates: {nginx.crt, nginx.key} OR {privkey.pem, fullchain.pem, dhparams.pem} in the ssl generated folder. 10 | useHttps=false 11 | #for https 12 | EMAIL="seedbox@yopmail.com" 13 | #warning: using letsEncrypt, all subdomains should be defined on DNS side 14 | SUBDOMAINS="" 15 | #SUBDOMAINS="files,explorer" 16 | #see http://php.net/manual/en/timezones.php 17 | TZ="Europe/Paris" 18 | 19 | 20 | 21 | 22 | ############### SERVER 23 | # All servers with the property at true will be deployed. 24 | # fail2ban will protect apps and the host from hackers and robots 25 | fail2ban=true 26 | 27 | #plex, emby and limbomedia will stream film, series, ... (like Youtube) 28 | # https://hub.docker.com/r/timhaak/plex/ 29 | plex=true 30 | plexUser=PlexUser 31 | plexPass="PlexPass" 32 | # Plex Usage tracker https://github.com/linuxserver/docker-plexpy 33 | plexpy=f 34 | # another home media server https://github.com/MediaBrowser/Emby 35 | emby=f 36 | # another home media server, http://limbomedia.net/ login: admin / admin 37 | limbomedia=f 38 | # Music streaming platform https://github.com/Libresonic/libresonic 39 | libresonic=f 40 | # Comics streaming platform, https://vaemendis.net/ubooquity/ 41 | ubooquity=f 42 | 43 | 44 | # sickrage will download series 45 | sickrage=true 46 | # couchPotato and radarr will download films, choose one of them 47 | couchpotato=true 48 | radarr=false 49 | # Automated comic book (cbr/cbz) downloader, https://github.com/evilhero/mylar 50 | mylar=false 51 | # to download music, https://github.com/rembo10/headphones, https://mondedie.fr/viewtopic.php?id=7475 52 | # not yet multi users 53 | headphones=f 54 | 55 | # jackett: Jackett works as a proxy server: it translates queries from apps (Sonarr, SickRage, CouchPotato, Mylar, etc) into tracker-site-specific http queries 56 | # https://github.com/Jackett/Jackett 57 | jackett=true 58 | # to download torrent 59 | rtorrent=true 60 | 61 | # muximux or htpc will be your Home page (soon) 62 | # Lightweight portal to your webapps https://github.com/mescon/Muximux 63 | muximux=true 64 | # https://github.com/Hellowlol/HTPC-Manager 65 | htpcmanager=false 66 | 67 | # monitoring tool https://nicolargo.github.io/glances/ 68 | glances=f 69 | 70 | # https://hub.docker.com/r/kylemanna/openvpn/ 71 | # createVpnFor.sh will be generated automatically. 72 | # Run './createVpnFor.sh foo' to create foo.ovpn 73 | openvpn=f 74 | # https://hub.docker.com/r/devalx/docker-teamspeak3/ 75 | teamspeak=f 76 | 77 | 78 | # FTP (not secured?) https://hub.docker.com/r/stilliard/pure-ftpd/ 79 | pureftpd=f 80 | 81 | #Best file explorer https://github.com/Studio-42/elFinder 82 | elfinder=f 83 | #### others file explorer 84 | # https://github.com/simogeo/Filemanager 85 | filemanager=f 86 | # see https://github.com/soyuka/explorer 87 | # enter : admin/admin then configure and update the home to /torrents 88 | explorer=f 89 | #file explorer http://cloudcmd.io/ 90 | cloud=f 91 | #### 92 | 93 | 94 | # Multiple devices syncronisation tool https://docs.syncthing.net/ https://hub.docker.com/r/linuxserver/syncthing/ 95 | syncthing=f 96 | 97 | #docker web ui manager, https://github.com/portainer/portainer 98 | portainer=f 99 | # docker tool that check and update others containers automaticaly. https://github.com/v2tec/watchtower 100 | watchtower=f 101 | 102 | #subliminal subtitle auto download 103 | subliminal=f 104 | 105 | #a web terminal 106 | butterfly=f 107 | 108 | #END SERVER 109 | 110 | #set "#" if you have the following Error: 111 | #Unable to set up server: sqlite3_statement_backend::prepare: disk I/O error for SQL: PRAGMA cache_size=4000 112 | plex_config="" 113 | #set "#" if necessary 114 | emby_config="" 115 | #set "#" if you cannot connect to headphones 116 | headphones_config="" 117 | mux_config="" 118 | 119 | #where find nginx.conf, htpasswd.txt, ... 120 | here=`pwd` 121 | # where save following folders: config, downloads, log 122 | #By default, get the parent directory of current directory 123 | # another path: "/home/seedbox/seedBoxFiles" or /tmp/seedbox 124 | seedboxFiles="$(dirname "$here")" 125 | mkdir -p $seedboxFiles 126 | 127 | 128 | #launch scripts 129 | INCLUDE="include" 130 | . "$INCLUDE"/main.sh 131 | 132 | read -p "To launch servers, enter y: " response 133 | if [[ "$response" = "y" || "$response" = "Y" ]]; then 134 | docker-compose up -d 135 | read -p "To update couchPotato, sickrage,... enter y: " response 136 | if [[ "$response" = "y" || "$response" = "Y" ]]; then 137 | . "$INCLUDE"/update.sh 138 | fi 139 | fi 140 | 141 | 142 | # docker-compose up -d --remove-orphans 143 | # docker restart seedboxdocker_front_1 144 | # stop & remove containers 145 | # docker-compose down --remove-orphans 146 | # docker-compose logs 147 | # when using "buid: ../xxx" in docker-compose.yml, run: docker-compose build 148 | -------------------------------------------------------------------------------- /include/docker-compose.yml.tmpl: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | frontend: 4 | image: cloneme/nginx 5 | #build: ../nginx 6 | container_name: seedboxdocker_front_1 7 | restart: always 8 | networks: 9 | - seedbox 10 | environment: 11 | - server_name=#server_name# 12 | - USE_SSL=#useSSL# 13 | - TZ=#TZ# 14 | #frontend_dependencies# 15 | ports: 16 | - "80:80" 17 | - "443:443" 18 | volumes: 19 | - #pwd#/ssl:/etc/nginx/ssl/:ro 20 | - #seedboxFolder#/config:/config 21 | - #pwd#/htpasswd.txt:/etc/nginx/.htpasswd:ro 22 | - #pwd#/nginx.conf:/etc/nginx/nginx.conf:ro 23 | - #seedboxFolder#/log/nginx-front:/var/log/nginx 24 | 25 | #start_rtorrent 26 | rtorrent: 27 | image: funtwo/rtorrent-rutorrent:64bit 28 | #build: ../rtorrent-rutorrent 29 | container_name: seedboxdocker_rtorrent_1 30 | restart: always 31 | networks: 32 | - seedbox 33 | # On ne litmite pas rTorrent vu que c'est le process "principal" de la machine 34 | # mem_limit: 2000m 35 | # memswap_limit: 1000m 36 | # cpu_shares: 512 37 | environment: 38 | - VIRTUAL_HOST=rtorrent 39 | - USE_SSL=#useSSL# 40 | - TZ=#TZ# 41 | ports: 42 | - "49160-49175:49160-49175" 43 | - "49161-49175:49161-49175/udp" 44 | volumes: 45 | - #pwd#/htpasswd.txt:/.htpasswd:ro 46 | - #pwd#/ssl:/etc/nginx/ssl:ro 47 | - #seedboxFolder#/config:/config 48 | - #seedboxFolder#/log/:/log 49 | - #seedboxFolder#/downloads/:/downloads 50 | #The authentification is done by the container. 51 | - #seedboxFolder#/log/nginx-torrent:/var/log/nginx 52 | #end_rtorrent 53 | 54 | #start_fail2ban 55 | fail2ban: 56 | image: funtwo/fail2ban:latest-dev 57 | container_name: seedboxdocker_fail2ban 58 | restart: always 59 | privileged: true 60 | network_mode: "host" 61 | environment: 62 | - TIMEZONE=Europe/Paris 63 | volumes: 64 | - #pwd#/include/fail2ban/jail.txt:/etc/fail2ban/jail.local:ro 65 | - #pwd#/include/fail2ban/nginx-http-auth.conf:/etc/fail2ban/filter.d/nginx-http-auth.conf:ro 66 | - #pwd#/include/fail2ban/docker-action.conf:/etc/fail2ban/action.d/docker-action.conf:ro 67 | - #pwd#/include/fail2ban/nginx-badbots.conf:/etc/fail2ban/filter.d/nginx-badbots.conf:ro 68 | - #seedboxFolder#/log:/var/log/ 69 | - /var/log:/host 70 | #end_fail2ban 71 | 72 | #start_sickrage 73 | sickrage: 74 | image: funtwo/sickrage:latest-dev 75 | container_name: seedboxdocker_sickrage 76 | restart: always 77 | networks: 78 | - seedbox 79 | mem_limit: 300m 80 | memswap_limit: 500m 81 | volumes: 82 | - #pwd#/htpasswd.txt:/etc/nginx/.htpasswd:ro 83 | - #seedboxFolder#/config/sickrage:/config 84 | - #seedboxFolder#/downloads/:/torrents 85 | #end_sickrage 86 | 87 | #start_radarr 88 | radarr: 89 | image: linuxserver/radarr 90 | container_name: autodl-movies_radarr 91 | restart: always 92 | networks: 93 | - seedbox 94 | volumes: 95 | - #seedboxFolder#/config/radarr:/config 96 | - #seedboxFolder#/downloads:/downloads 97 | - #seedboxFolder#/downloads:/movies 98 | environment: 99 | - TZ=#TZ# 100 | # - PUID=1069 101 | # - PGID=1069 102 | #end_radarr 103 | 104 | #start_mylar 105 | mylar: 106 | image: linuxserver/mylar 107 | container_name: autodl-comics_mylar 108 | restart: always 109 | hostname: mylar 110 | networks: 111 | - seedbox 112 | volumes: 113 | - #seedboxFolder#/config/mylar:/config 114 | - #seedboxFolder#/downloads/BDINC:/downloads 115 | - #seedboxFolder#/downloads/BDS:/comics 116 | - /etc/localtime:/etc/localtime:ro 117 | environment: 118 | - TZ=#TZ# 119 | # - PUID=1069 120 | # - PGID=1069 121 | #end_mylar 122 | 123 | #start_couchpotato 124 | #couckPotato_conf# 125 | #end_couchpotato 126 | 127 | #start_plex 128 | plex: 129 | image: timhaak/plex 130 | container_name: seedboxdocker_plex_1 131 | restart: always 132 | networks: 133 | - seedbox 134 | mem_limit: 2000m 135 | memswap_limit: 2000m 136 | ports: 137 | - "32400:32400" 138 | environment: 139 | - VIRTUAL_HOST=plex.dock 140 | - PLEX_USERNAME=#PLEX_USERNAME# 141 | - PLEX_PASSWORD=#PLEX_PASSWORD# 142 | volumes: 143 | #Some users have the folliwing issue 144 | #Error: Unable to set up server: sqlite3_statement_backend::prepare: disk I/O error for SQL: PRAGMA cache_size=4000 145 | #uncomment the next line to test if it works on your side 146 | #plex_config# - #seedboxFolder#/config/plex:/config 147 | - #seedboxFolder#/downloads/:/data 148 | #end_plex 149 | 150 | #start_emby 151 | emby: 152 | image: emby/embyserver 153 | container_name: emby 154 | restart: always 155 | networks: 156 | - seedbox 157 | environment: 158 | - TZ=#TZ# 159 | - AUTO_UPDATES_ON=true 160 | volumes: 161 | #emby_config# - #seedboxFolder#/config/emby:/config 162 | - #seedboxFolder#/downloads/:/media 163 | #end_emby 164 | 165 | #start_limbomedia 166 | limbomedia: 167 | image: limbomedia/limbomedia 168 | container_name: limbomedia 169 | restart: always 170 | networks: 171 | - seedbox 172 | volumes: 173 | - #seedboxFolder#/downloads/:/data 174 | #end_limbomedia 175 | 176 | #start_libresonic 177 | libresonic: 178 | restart: always 179 | image: linuxserver/libresonic 180 | container_name: stream-music_libresonic 181 | hostname: libresonic 182 | networks: 183 | - seedbox 184 | volumes: 185 | - #seedboxFolder#/downloads:/music:ro 186 | - #seedboxFolder#/downloads:/podcasts:ro 187 | - #seedboxFolder#/downloads:/playlists:ro 188 | - #seedboxFolder#/downloads:/media:ro 189 | #mux_config# - #seedboxFolder#/config/libresonic:/config:rw 190 | - /etc/localtime:/etc/localtime:ro 191 | environment: 192 | - CONTEXT_PATH=/libresonic 193 | - SSL=no 194 | - TERM=xterm 195 | # - PGID=1069 196 | # - PUID=1069 197 | #end_libresonic 198 | 199 | #start_ubooquity 200 | ubooquity: 201 | restart: always 202 | image: cromigon/ubooquity 203 | container_name: stream-comics_ubooquity 204 | hostname: library 205 | networks: 206 | - seedbox 207 | volumes: 208 | - #seedboxFolder#/downloads/LIBRARY:/opt/data:ro 209 | #mux_config# - #seedboxFolder#/config/ubooquity:/opt/ubooquity-data:rw 210 | - /etc/localtime:/etc/localtime:ro 211 | environment: 212 | - TZ=#TZ# 213 | # - PUID=1069 214 | # - PGID=1069 215 | #end_ubooquity 216 | 217 | #start_jackett 218 | jackett: 219 | restart: always 220 | image: linuxserver/jackett 221 | container_name: jackett 222 | networks: 223 | - seedbox 224 | volumes: 225 | - #seedboxFolder#/downloads/blackhole:/downloads 226 | #mux_config# - #seedboxFolder#/config/jackett:/config 227 | environment: 228 | - TZ=#TZ# 229 | # - PUID=1069 230 | # - PGID=1069 231 | #end_jackett 232 | 233 | #start_cloud 234 | cloud: 235 | image: coderaiser/cloudcmd 236 | container_name: seedboxdocker_cloud 237 | restart: always 238 | networks: 239 | - seedbox 240 | volumes: 241 | - #seedboxFolder#/config/cloud:/root 242 | - #seedboxFolder#/downloads:/mnt/fs 243 | #end_cloud 244 | 245 | #start_explorer 246 | explorer: 247 | image: cloneme/explorer 248 | container_name: seedboxdocker_explorer_1 249 | restart: always 250 | networks: 251 | - seedbox 252 | volumes: 253 | - #seedboxFolder#/config/explorer:/opt/explorer 254 | - #seedboxFolder#/downloads:/torrents 255 | #end_explorer 256 | 257 | #start_filemanager 258 | filemanager: 259 | image: funtwo/filemanager:latest-dev 260 | container_name: seedboxdocker_filemanager_1 261 | restart: always 262 | networks: 263 | - seedbox 264 | volumes: 265 | - #pwd#/htpasswd.txt:/.userlist:ro 266 | - #seedboxFolder#/downloads:/downloads 267 | #The authentification is done on front side. 268 | #end_filemanager 269 | 270 | #start_openvpn 271 | openvpn: 272 | image: kylemanna/openvpn 273 | container_name: seedboxdocker_openvpn_1 274 | restart: always 275 | networks: 276 | - seedbox 277 | ports: 278 | - "1194:1194/udp" 279 | volumes: 280 | - #seedboxFolder#/config/openvpn:/etc/openvpn 281 | cap_add: 282 | - NET_ADMIN 283 | #end_openvpn 284 | 285 | #start_teamspeak 286 | teamspeak: 287 | image: devalx/docker-teamspeak3:latest 288 | container_name: seedboxdocker_teamspeak_1 289 | restart: always 290 | networks: 291 | - seedbox 292 | mem_limit: 300m 293 | memswap_limit: 500m 294 | ports: 295 | - "9987:9987/udp" 296 | - "30033:30033" 297 | - "10011:10011" 298 | volumes: 299 | - #seedboxFolder#/config/ts3:/home/ts3/data 300 | #end_teamspeak 301 | 302 | #start_headphones 303 | headphones: 304 | image: pwntr/headphones-alpine 305 | container_name: seedboxdocker_headphones_1 306 | restart: always 307 | networks: 308 | - seedbox 309 | volumes: 310 | #headphones_config# - #seedboxFolder#/config/headphones:/config 311 | - #seedboxFolder#/downloads/rtorrent:/downloads 312 | - #seedboxFolder#/downloads/music:/music 313 | environment: 314 | - TZ=#TZ# 315 | #end_headphones 316 | 317 | #start_pureftpd 318 | pureftpd: 319 | image: cloneme/pure-ftpd 320 | container_name: seedboxdocker_pureftpd_1 321 | restart: always 322 | networks: 323 | - seedbox 324 | ports: 325 | - "21:21" 326 | - "30000-30009:30000-30009" 327 | volumes: 328 | - #pwd#/htpasswd.txt:/etc/nginx/.htpasswd:ro 329 | - #seedboxFolder#/downloads:/downloads 330 | environment: 331 | - PUBLICHOST=#server_name# 332 | - TZ=#TZ# 333 | #end_pureftpd 334 | 335 | #start_muximux 336 | muximux: 337 | image: linuxserver/muximux 338 | container_name: seedboxdocker_muximux_1 339 | restart: always 340 | networks: 341 | - seedbox 342 | environment: 343 | - TZ=#TZ# 344 | # - PGID=1000 345 | # - PUID=1000 346 | #mux_config# volumes: 347 | #mux_config# - #seedboxFolder#/config/muximux:/config 348 | #end_muximux 349 | 350 | #start_htpcmanager 351 | htpcmanager: 352 | image: linuxserver/htpcmanager 353 | container_name: tool_HTPCManager 354 | #mux_config# volumes: 355 | #mux_config# - #seedboxFolder#/config/htpcmanager:/config 356 | restart: always 357 | networks: 358 | - seedbox 359 | environment: 360 | - TZ=#TZ# 361 | # - PUID=1069 362 | # - PGID=1069 363 | #end_htpcmanager 364 | 365 | #start_glances 366 | glances: 367 | image: funtwo/glances:master 368 | container_name: seedboxdocker_glances_1 369 | restart: always 370 | pid: host 371 | networks: 372 | - seedbox 373 | # ports: 374 | # - "61208:61208" 375 | volumes: 376 | - /var/run/docker.sock:/var/run/docker.sock:ro 377 | - #seedboxFolder#/config:/data/config 378 | - #seedboxFolder#/downloads:/data/downloads 379 | - #seedboxFolder#/log:/data/log 380 | environment: 381 | - GLANCES_OPT=-w 382 | #end_glances 383 | 384 | #start_plexpy 385 | plexpy: 386 | image: linuxserver/plexpy 387 | container_name: seedboxdocker_plexpy_1 388 | restart: always 389 | networks: 390 | - seedbox 391 | # ports: 392 | # - "8181:8181" 393 | volumes: 394 | - /etc/localtime:/etc/localtime:ro 395 | - #seedboxFolder#/config/plexpy:/config 396 | - #seedboxFolder#/config/plex/Library/Application\040Support/Plex\040Media\040Server/Logs:/logs:ro 397 | #end_plexpy 398 | 399 | #start_syncthing 400 | syncthing: 401 | image: linuxserver/syncthing 402 | container_name: seedboxdocker_syncthing_1 403 | restart: always 404 | networks: 405 | - seedbox 406 | volumes: 407 | - #seedboxFolder#/config/syncthing:/config 408 | - #seedboxFolder#/downloads:/storage 409 | environment: 410 | - PGID=1000 411 | - PUID=1000 412 | # ports: 413 | # - "8384:8384" 414 | # - "22000:22000" 415 | # - "21027:21027/udp" 416 | #end_syncthing 417 | 418 | #start_portainer 419 | portainer: 420 | image: portainer/portainer 421 | container_name: seedboxdocker_portainer_1 422 | restart: always 423 | networks: 424 | - seedbox 425 | volumes: 426 | - /var/run/docker.sock:/var/run/docker.sock 427 | # ports: 428 | # - "9000:9000" 429 | #end_portainer 430 | 431 | #start_watchtower 432 | watchtower: 433 | image: v2tec/watchtower 434 | container_name: tool-docker_watchtower 435 | hostname: watchtower 436 | volumes: 437 | - /var/run/docker.sock:/var/run/docker.sock 438 | - /etc/localtime:/etc/localtime:ro 439 | restart: always 440 | environment: 441 | - TZ=#TZ# 442 | #end_watchtower 443 | 444 | #start_elfinder 445 | elfinder: 446 | image: sebastianhutter/elfinder 447 | container_name: seedboxdocker_elfinder_1 448 | restart: always 449 | networks: 450 | - seedbox 451 | environment: 452 | - ELFINDER_FILES_URI=/elfinder/files 453 | volumes: 454 | - #seedboxFolder#:/var/www/html/files 455 | #end_elfinder 456 | 457 | #start_subliminal 458 | subliminal: 459 | image: funtwo/subliminal:master 460 | container_name: seedboxdocker_subliminal_1 461 | restart: always 462 | networks: 463 | - seedbox 464 | volumes: 465 | - #seedboxFolder#/downloads:/downloads 466 | - #pwd#/htpasswd.txt:/etc/.htpasswd:ro 467 | - #seedboxFolder#/log/subliminal:/var/log/subliminal 468 | #end_subliminal 469 | 470 | #start_butterfly 471 | butterfly: 472 | image: garland/butterfly 473 | container_name: seedboxdocker_butterfly_1 474 | restart: always 475 | networks: 476 | - seedbox 477 | environment: 478 | - PORT=57575 479 | volumes: 480 | - #seedboxFolder#:/data 481 | # ports: 482 | # - "57575:57575" 483 | #end_butterfly 484 | 485 | networks: 486 | seedbox: 487 | driver: bridge 488 | -------------------------------------------------------------------------------- /include/fail2ban/docker-action.conf: -------------------------------------------------------------------------------- 1 | # http://blog.amigapallo.org/2016/04/14/configuring-fail2ban-and-iptables-to-get-along-with-docker/ 2 | # http://scorban.de/2016/05/25/fail2ban_und_docker/ 3 | 4 | [Definition] 5 | 6 | actionstart = 7 | 8 | actionstop = 9 | 10 | actioncheck = iptables -n -L FORWARD | grep -q 'DOCKER[ \t]' 11 | 12 | actionban = iptables -I DOCKER 1 -s -j DROP 13 | 14 | actionunban = iptables -D DOCKER -s -j DROP 15 | -------------------------------------------------------------------------------- /include/fail2ban/jail.txt: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | ignoreip = 127.0.0.1/8 3 | bantime = 1800 4 | findtime = 1800 5 | maxretry = 5 6 | banaction = docker-action 7 | iptables-multiport 8 | 9 | [ssh] 10 | enabled = true 11 | port = ssh 12 | filter = sshd 13 | logpath = /host/auth.log 14 | maxretry = 5 15 | 16 | [nginx-dos] 17 | # Based on apache-badbots but a simple IP check (any IP requesting more than 18 | # 240 pages in 60 seconds, or 4p/s average, is suspicious) 19 | # Block for two full days. 20 | # @author Yannick Warnier 21 | enabled = true 22 | port = http,https 23 | filter = nginx-badbots 24 | logpath = /var/log/nginx*/access.log 25 | findtime = 60 26 | bantime = 172800 27 | maxretry = 240 28 | 29 | [nginx-http-auth] 30 | 31 | enabled = true 32 | filter = nginx-http-auth 33 | port = http,https 34 | logpath = /var/log/nginx*/error.log 35 | 36 | # Pour vsftpd, il est dans le fichier donc vous modifiez juste false en true si besoin 37 | [vsftpd] 38 | 39 | enabled = false 40 | port = ftp,ftp-data,ftps,ftps-data 41 | filter = vsftpd 42 | logpath = /var/log/vsftpd.log 43 | # or overwrite it in jails.local to be 44 | # logpath = /var/log/auth.log 45 | # if you want to rely on PAM failed login attempts 46 | # vsftpd's failregex should match both of those formats 47 | maxretry = 5 -------------------------------------------------------------------------------- /include/fail2ban/nginx-badbots.conf: -------------------------------------------------------------------------------- 1 | # Fail2Ban configuration file 2 | # 3 | # Regexp to catch known spambots and software alike. Please verify 4 | # that it is your intent to block IPs which were driven by 5 | # above mentioned bots. 6 | 7 | 8 | [Definition] 9 | 10 | badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider 11 | badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 \+http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots, \+http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00 12 | 13 | failregex = ^ -.*"(GET|POST|HEAD).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$ 14 | 15 | ignoreregex = 16 | 17 | # DEV Notes: 18 | # List of bad bots fetched from http://www.user-agents.org 19 | # Generated on Thu Nov 7 14:23:35 PST 2013 by files/gen_badbots. 20 | # 21 | # Author: Yaroslav Halchenko -------------------------------------------------------------------------------- /include/fail2ban/nginx-http-auth.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: 3 | # 4 | # Blocks IPs that fail to authenticate using basic authentication 5 | # 6 | [Definition] 7 | 8 | failregex = no user/password was provided for basic authentication.*client: 9 | user .* was not found in.*client: 10 | user .* password mismatch.*client: 11 | 12 | ignoreregex = -------------------------------------------------------------------------------- /include/functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # MAINTAINER https://github.com/cloneMe 3 | 4 | 5 | function addProxy_pass { 6 | local result="$1" 7 | result="$result if (\$remote_user = \"$4\") {\n" 8 | result="$result proxy_pass http://$2:$3;\n" 9 | result="$result break;\n }\n" 10 | echo "$result" 11 | } 12 | function addCouchPotato { 13 | local result="$1\n" 14 | result="$result couchpotato_$2:\n" 15 | result="$result image: funtwo/couchpotato:latest-dev\n" 16 | result="$result container_name: seedboxdocker_couchpotato_$2\n" 17 | result="$result restart: always\n" 18 | result="$result networks: \n" 19 | result="$result - seedbox\n" 20 | result="$result mem_limit: 300m\n" 21 | result="$result memswap_limit: 500m\n" 22 | result="$result volumes:\n" 23 | result="$result - #seedboxFolder#/config/couchpotato_$2/:/config\n" 24 | result="$result - #seedboxFolder#/downloads/:/torrents\n" 25 | 26 | echo "$result" 27 | } 28 | 29 | function delete { 30 | #Delete the lines starting from the pattern '#start_servicename' till #end_servicename 31 | if [ "$2" != "true" ]; then 32 | local l=$(grep -n "#start_$1" docker-compose.yml | grep -Eo '^[^:]+' ) 33 | if [ "$l" != "" ]; then 34 | sed -i "$l,/#end_$1/d" docker-compose.yml 35 | fi 36 | 37 | l=$(grep -n "#start_$1" nginx.conf | grep -Eo '^[^:]+' | head -1) 38 | while [ "$l" != "" ]; do 39 | # >&2 echo "q" 40 | sed -i "$l,/#end_$1/d" nginx.conf 41 | l=$(grep -n "#start_$1" nginx.conf | grep -Eo '^[^:]+' | head -1) 42 | done 43 | else 44 | echo " - $1\n" 45 | fi 46 | } 47 | 48 | function generateHelp { 49 | mkdir -p help 50 | userUp=$(echo "$1" | tr '[:lower:]' '[:upper:]') 51 | 52 | echo " 53 | 54 | -- Jackett 55 | Open Jackett and click on \"+ Add indexer\" 56 | 57 | -- Sickrage 58 | 59 | Open \"Search Settings\" and click on the \"torrent search\" tab. Choose \"rtorrent\" and put following values: 60 | 61 | Search Settings: $httpMode://rtorrent.$server_name/RPC$userUp 62 | Http auth : basic 63 | Set userName & password 64 | Download file location: /downloads/rtorrent/$1/watch 65 | 66 | On \"Search Settings\", click on \"NZB search\" tab and Enable NZB search provider. 67 | On \"Search Providers\", click on \"Configure custom Newznab Providers\" tab and put following values: 68 | Select provider: --add new provider -- 69 | Provider name: jackett- 70 | Site URL: http://jackett:9117/jackett/torznab// 71 | Set the API key. 72 | 73 | On \"Search Providers\", click on \"Provider priorities\" tab and Select jackett-. 74 | On \"Search Providers\", click on \"Provider Options\" tab and Select \"Enable daily searches\", ... 75 | 76 | 77 | Open the \"Post Processing\" menu, activate it and set following values: 78 | /downloads/rtorrent/$1/watch 79 | Processing Method: hard link 80 | 81 | When adding a a new serie, set /downloads/rtorrent/$1/serie as the parent folder (step 2). 82 | 83 | -- Couchpotato 84 | 85 | It is not necessary to set username & password. Activate \"rtorrent\" and put following values: 86 | 87 | Host: $httpMode://rtorrent.$server_name 88 | Rpc Url: /RPC$userUp 89 | Http auth : basic 90 | Set userName & password 91 | Download file location: /downloads/rtorrent/$1/film 92 | 93 | 94 | In Settings > Searcher, activate TorrentPotato and put following values: 95 | host: http://jackett:9117/jackett/potato/ 96 | For the Passkey use the API key 97 | Leave the username field blank. 98 | And Check the combo box ! (otherwise it will not work ) 99 | 100 | In Settings > Categories, add in the ignore list: 101 | HC,HDTS,.MD.,-MD-,_MD_,DVD9 102 | 103 | -- Plex 104 | Issue : Plex NEVER asks for authentication. Everybody can access to it :/ 105 | nano $seedboxFiles/config/plex/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml 106 | There is \"Disable Remote Security=1\". Changed that 1 to a 0 and restarted my Plex : docker restart seedboxdocker_plex_1 107 | Src : https://forums.plex.tv/discussion/132399/plex-security-issue 108 | 109 | 110 | -- To configure ubooquity, 111 | Execute: 112 | docker stop stream-comics_ubooquity 113 | docker run --rm -ti -v $seedboxFiles/config/ubooquity:/opt/ubooquity-data:rw -v $seedboxFiles/downloads/LIBRARY:/opt/data -p 2203:2202 cromigon/ubooquity:latest -webadmin 114 | Then open http://$server_name:2203/ubooquity/admin 115 | And the end, execute following command to restart ubooquity: 116 | docker start stream-comics_ubooquity 117 | 118 | See https://github.com/cromigon/ubooquity-docker for more information 119 | 120 | " > help/$1.txt 121 | } 122 | 123 | function generateURL { 124 | mkdir -p help 125 | echo " 126 | Following services are deployed: 127 | " > help/URL.txt 128 | if [ "$portainer" = "true" ]; then 129 | echo " 130 | portainer 131 | $httpMode://$server_name/portainer 132 | " >> help/URL.txt 133 | fi 134 | if [ "$rtorrent" = "true" ]; then 135 | echo " 136 | rtorrent 137 | $httpMode://$server_name/rtorrent 138 | " >> help/URL.txt 139 | fi 140 | if [ "$jackett" = "true" ]; then 141 | echo " 142 | jackett 143 | $httpMode://$server_name/jackett/ 144 | " >> help/URL.txt 145 | fi 146 | if [ "$sickrage" = "true" ]; then 147 | echo " 148 | sickrage 149 | $httpMode://$server_name/sickrage 150 | " >> help/URL.txt 151 | fi 152 | if [ "$couchpotato" = "true" ]; then 153 | echo " 154 | couchpotato 155 | $httpMode://$server_name/couchpotato 156 | " >> help/URL.txt 157 | fi 158 | if [ "$radarr" = "true" ]; then 159 | echo " 160 | radarr 161 | $httpMode://$server_name/radarr 162 | " >> help/URL.txt 163 | fi 164 | if [ "$mylar" = "true" ]; then 165 | echo " 166 | mylar 167 | $httpMode://$server_name/mylar 168 | " >> help/URL.txt 169 | fi 170 | 171 | if [ "$headphones" = "true" ]; then 172 | echo " 173 | headphones 174 | $httpMode://$server_name/headphones 175 | " >> help/URL.txt 176 | fi 177 | if [ "$plex" = "true" ]; then 178 | echo " 179 | Plex 180 | $httpMode://$server_name/plex 181 | " >> help/URL.txt 182 | fi 183 | if [ "$libresonic" = "true" ]; then 184 | echo " 185 | libresonic 186 | $httpMode://$server_name/libresonic 187 | Warning: Default user/pass is admin/admin 188 | 189 | " >> help/URL.txt 190 | fi 191 | if [ "$ubooquity" = "true" ]; then 192 | echo " 193 | ubooquity 194 | $httpMode://$server_name/ubooquity 195 | " >> help/URL.txt 196 | fi 197 | if [ "$emby" = "true" ]; then 198 | echo " 199 | emby 200 | $httpMode://$server_name/emby 201 | " >> help/URL.txt 202 | fi 203 | if [ "$limbomedia" = "true" ]; then 204 | echo " 205 | limbomedia 206 | $httpMode://$server_name/media 207 | " >> help/URL.txt 208 | fi 209 | if [ "$cloud" = "true" ]; then 210 | echo " 211 | cloud 212 | $httpMode://$server_name/cloud 213 | " >> help/URL.txt 214 | fi 215 | if [ "$elfinder" = "true" ]; then 216 | echo " 217 | cloud 218 | $httpMode://$server_name/elfinder 219 | " >> help/URL.txt 220 | fi 221 | if [ "$muximux" = "true" ]; then 222 | echo " 223 | muximux 224 | $httpMode:/$server_name/muximux 225 | " >> help/URL.txt 226 | fi 227 | if [ "$htpcmanager" = "true" ]; then 228 | echo " 229 | htpcmanager 230 | $httpMode:/$server_name/htpcmanager 231 | " >> help/URL.txt 232 | fi 233 | if [ "$glances" = "true" ]; then 234 | echo " 235 | glances 236 | $httpMode://$server_name/glances 237 | " >> help/URL.txt 238 | fi 239 | if [ "$plexpy" = "true" ]; then 240 | echo " 241 | plexpy 242 | $httpMode://$server_name/plexpy 243 | " >> help/URL.txt 244 | fi 245 | if [ "$syncthing" = "true" ]; then 246 | echo " 247 | syncthing 248 | $httpMode://$server_name/syncthing 249 | " >> help/URL.txt 250 | fi 251 | if [ "$pureftpd" = "true" ]; then 252 | echo " 253 | FTP 254 | ftp://$server_name 255 | " >> help/URL.txt 256 | fi 257 | if [ "$explorer" = "true" ]; then 258 | echo " 259 | explorer 260 | $httpMode://explorer.$server_name 261 | " >> help/URL.txt 262 | fi 263 | if [ "$filemanager" = "true" ]; then 264 | echo " 265 | File manager 266 | $httpMode://files.$server_name 267 | " >> help/URL.txt 268 | fi 269 | if [ "$butterfly" = "true" ]; then 270 | echo " 271 | Web console 272 | $httpMode://$server_name/butterfly 273 | " >> help/URL.txt 274 | fi 275 | 276 | echo " 277 | Hosting info (does not work with all hosting) 278 | http://$(hostname -f) 279 | " >> help/URL.txt 280 | 281 | } 282 | 283 | function generateMuximuxConf { 284 | # see https://github.com/mescon/Muximux/blob/71f1bcaa43bfa4cc0900b221eccb9882b53da66b/css/font-muximux.css 285 | #local l=$(grep -n last_check $seedboxFiles/config/muximux/www/muximux/settings.ini.php | grep -Eo '^[^:]+' ) 286 | 287 | head -n 23 $seedboxFiles/config/muximux/www/muximux/settings.ini.php-example > $tmpFolder/muximux_settings.ini.php 288 | if [ "$portainer" = "true" ]; then 289 | echo " 290 | [Portainer] 291 | name = \"Portainer\" 292 | url = \"$httpMode://$server_name/portainer\" 293 | scale = 1 294 | icon = \"muximux-stack\" 295 | color = \"#6aa84f\" 296 | enabled = \"true\" 297 | dd = \"true\" 298 | " >> $tmpFolder/muximux_settings.ini.php 299 | fi 300 | if [ "$rtorrent" = "true" ]; then 301 | echo " 302 | [rTorrent] 303 | name = \"rTorrent\" 304 | url = \"$httpMode://$server_name/rtorrent\" 305 | scale = 1 306 | icon = \"muximux-rutorrent\" 307 | color = \"#1a1bfe\" 308 | enabled = \"true\" 309 | 310 | " >> $tmpFolder/muximux_settings.ini.php 311 | fi 312 | if [ "$jackett" = "true" ]; then 313 | echo " 314 | [Jackett] 315 | name = \"Jackett\" 316 | url = \"$httpMode://$server_name/jackett/\" 317 | scale = 1 318 | icon = \"muximux-jackett\" 319 | color = \"#3d85c6\" 320 | enabled = \"true\" 321 | 322 | " >> $tmpFolder/muximux_settings.ini.php 323 | fi 324 | if [ "$sickrage" = "true" ]; then 325 | echo " 326 | [Sickrage] 327 | name = \"Sickrage\" 328 | url = \"$httpMode://$server_name/sickrage\" 329 | scale = 1 330 | icon = \"muximux-sickbeard\" 331 | color = \"#3d85c6\" 332 | enabled = \"true\" 333 | 334 | " >> $tmpFolder/muximux_settings.ini.php 335 | fi 336 | if [ "$couchpotato" = "true" ]; then 337 | echo " 338 | [Couchpotato] 339 | name = \"CouchPotato\" 340 | url = \"$httpMode://$server_name/couchpotato\" 341 | scale = 1 342 | icon = \"muximux-couchpotato\" 343 | color = \"#f85c22\" 344 | enabled = \"true\" 345 | 346 | " >> $tmpFolder/muximux_settings.ini.php 347 | fi 348 | if [ "$radarr" = "true" ]; then 349 | echo " 350 | [Radarr] 351 | name = \"Radarr\" 352 | url = \"$httpMode://$server_name/radarr\" 353 | scale = 1 354 | icon = \"muximux-sonarr\" 355 | color = \"#35c5f4\" 356 | enabled = \"true\" 357 | 358 | " >> $tmpFolder/muximux_settings.ini.php 359 | fi 360 | if [ "$mylar" = "true" ]; then 361 | echo " 362 | [Mylar] 363 | name = \"Mylar\" 364 | url = \"$httpMode://$server_name/mylar\" 365 | scale = 1 366 | icon = \"muximux-book\" 367 | color = \"\" 368 | enabled = \"true\" 369 | 370 | " >> $tmpFolder/muximux_settings.ini.php 371 | fi 372 | 373 | if [ "$headphones" = "true" ]; then 374 | echo " 375 | [Headphones] 376 | name = \"Headphones\" 377 | url = \"$httpMode://$server_name/headphones\" 378 | scale = 1 379 | icon = \"muximux-headphones\" 380 | color = \"#000000\" 381 | enabled = \"true\" 382 | 383 | " >> $tmpFolder/muximux_settings.ini.php 384 | fi 385 | if [ "$plex" = "true" ]; then 386 | echo " 387 | [Plex] 388 | name = \"Plex\" 389 | url = \"$httpMode://$server_name/plex\" 390 | scale = 1 391 | icon = \"muximux-plex\" 392 | color = \"#f9be03\" 393 | enabled = \"true\" 394 | default = \"true\" 395 | 396 | " >> $tmpFolder/muximux_settings.ini.php 397 | fi 398 | if [ "$libresonic" = "true" ]; then 399 | echo " 400 | [Libresonic] 401 | name = \"Libresonic\" 402 | url = \"$httpMode://$server_name/libresonic\" 403 | scale = 1 404 | icon = \"muximux-music\" 405 | color = \"#cc7b19\" 406 | enabled = \"true\" 407 | 408 | " >> $tmpFolder/muximux_settings.ini.php 409 | fi 410 | if [ "$ubooquity" = "true" ]; then 411 | echo " 412 | [Ubooquity] 413 | name = \"Ubooquity\" 414 | url = \"$httpMode://$server_name/ubooquity\" 415 | scale = 1 416 | icon = \"muximux-books\" 417 | color = \"#3d6fae\" 418 | enabled = \"true\" 419 | 420 | " >> $tmpFolder/muximux_settings.ini.php 421 | fi 422 | if [ "$emby" = "true" ]; then 423 | echo " 424 | [Emby] 425 | name = \"Emby\" 426 | url = \"$httpMode://$server_name/emby\" 427 | scale = 1 428 | icon = \"muximux-plex\" 429 | color = \"#f9be03\" 430 | enabled = \"true\" 431 | 432 | " >> $tmpFolder/muximux_settings.ini.php 433 | fi 434 | if [ "$limbomedia" = "true" ]; then 435 | echo " 436 | [Limbomedia] 437 | name = \"Limbomedia\" 438 | url = \"$httpMode://$server_name/media\" 439 | scale = 1 440 | icon = \"muximux-plex\" 441 | color = \"#3d85c6\" 442 | enabled = \"true\" 443 | 444 | " >> $tmpFolder/muximux_settings.ini.php 445 | fi 446 | if [ "$cloud" = "true" ]; then 447 | echo " 448 | [Cloud] 449 | name = \"Cloud\" 450 | url = \"$httpMode://$server_name/cloud\" 451 | scale = 1 452 | icon = \"muximux-cloud\" 453 | color = \"#3d85c6\" 454 | enabled = \"true\" 455 | 456 | " >> $tmpFolder/muximux_settings.ini.php 457 | fi 458 | if [ "$elfinder" = "true" ]; then 459 | echo " 460 | [Elfinder] 461 | name = \"Elfinder\" 462 | url = \"$httpMode://$server_name/elfinder\" 463 | scale = 1 464 | icon = \"muximux-folder\" 465 | color = \"#3d85c6\" 466 | enabled = \"true\" 467 | 468 | " >> $tmpFolder/muximux_settings.ini.php 469 | fi 470 | if [ "$glances" = "true" ]; then 471 | echo " 472 | [Glances] 473 | name = \"Glances\" 474 | url = \"$httpMode://$server_name/glances\" 475 | scale = 1 476 | icon = \"muximux-eye\" 477 | color = \"#59D16C\" 478 | enabled = \"true\" 479 | " >> $tmpFolder/muximux_settings.ini.php 480 | fi 481 | if [ "$plexpy" = "true" ]; then 482 | echo " 483 | [PlexPy] 484 | name = \"PlexPy\" 485 | url = \"$httpMode://$server_name/plexpy\" 486 | scale = 1 487 | icon = \"muximux-plexivity\" 488 | color = \"#cc7b19\" 489 | enabled = \"true\" 490 | 491 | " >> $tmpFolder/muximux_settings.ini.php 492 | fi 493 | if [ "$syncthing" = "true" ]; then 494 | echo " 495 | [Syncthing] 496 | name = \"Syncthing\" 497 | url = \"$httpMode://$server_name/syncthing\" 498 | scale = 1 499 | icon = \"muximux-sync\" 500 | color = \"#3d85c6\" 501 | enabled = \"true\" 502 | dd = \"true\" 503 | 504 | " >> $tmpFolder/muximux_settings.ini.php 505 | fi 506 | if [ "$pureftpd" = "true" ]; then 507 | echo " 508 | [FTP] 509 | name = \"FTP\" 510 | url = \"ftp://$server_name\" 511 | scale = 1 512 | icon = \"muximux-folder2\" 513 | color = \"#3d85c6\" 514 | enabled = \"true\" 515 | 516 | " >> $tmpFolder/muximux_settings.ini.php 517 | fi 518 | if [ "$explorer" = "true" ]; then 519 | echo " 520 | [Explorer] 521 | name = \"Explorer\" 522 | url = \"$httpMode://explorer.$server_name\" 523 | scale = 1 524 | icon = \"muximux-folder\" 525 | color = \"#3d85c6\" 526 | enabled = \"true\" 527 | 528 | " >> $tmpFolder/muximux_settings.ini.php 529 | fi 530 | if [ "$filemanager" = "true" ]; then 531 | echo " 532 | [FileManager] 533 | name = \"File manager\" 534 | url = \"$httpMode://files.$server_name\" 535 | scale = 1 536 | icon = \"muximux-folder\" 537 | color = \"#3d85c6\" 538 | enabled = \"true\" 539 | 540 | " >> $tmpFolder/muximux_settings.ini.php 541 | fi 542 | if [ "$butterfly" = "true" ]; then 543 | echo " 544 | [Butterfly] 545 | name = \"Web console\" 546 | url = \"$httpMode://$server_name/butterfly\" 547 | scale = 1 548 | icon = \"muximux-sync\" 549 | color = \"#3d85c6\" 550 | enabled = \"true\" 551 | 552 | " >> $tmpFolder/muximux_settings.ini.php 553 | fi 554 | 555 | if [ false ]; then 556 | echo " 557 | [Hosting] 558 | name = \"Hosting info\" 559 | url = \"http://$(hostname -f)\" 560 | scale = 1 561 | icon = \"muximux-info\" 562 | color = \"#3d85c6\" 563 | enabled = \"true\" 564 | 565 | " >> $tmpFolder/muximux_settings.ini.php 566 | fi 567 | 568 | } 569 | 570 | 571 | -------------------------------------------------------------------------------- /include/glances.conf: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # Globals Glances parameters 3 | ############################################################################## 4 | 5 | [global] 6 | # Does Glances should check if a newer version is available on PyPI ? 7 | check_update=true 8 | # History size (maximum number of values) 9 | # Default is 28800: 1 day with 1 point every 3 seconds (default refresh time) 10 | history_size=28800 11 | 12 | ############################################################################## 13 | # User interface 14 | ############################################################################## 15 | 16 | [outputs] 17 | # Theme name for the Curses interface: black or white 18 | curse_theme=black 19 | # Limit the number of processes to display in the WebUI 20 | max_processes_display=30 21 | 22 | ############################################################################## 23 | # plugins 24 | ############################################################################## 25 | 26 | [quicklook] 27 | # Define CPU, MEM and SWAP thresholds in % 28 | cpu_careful=50 29 | cpu_warning=70 30 | cpu_critical=90 31 | mem_careful=50 32 | mem_warning=70 33 | mem_critical=90 34 | swap_careful=50 35 | swap_warning=70 36 | swap_critical=90 37 | 38 | [cpu] 39 | # Default values if not defined: 50/70/90 (except for iowait) 40 | user_careful=50 41 | user_warning=70 42 | user_critical=90 43 | #user_log=False 44 | #user_critical_action=echo {{user}} {{value}} {{max}} > /tmp/cpu.alert 45 | system_careful=50 46 | system_warning=70 47 | system_critical=90 48 | steal_careful=50 49 | steal_warning=70 50 | steal_critical=90 51 | #steal_log=True 52 | # I/O wait percentage should be lower than 1/# (of CPU cores) 53 | # Leave commented to just use the default config (1/#-20% / 1/#-10% / 1/#) 54 | #iowait_careful=30 55 | #iowait_warning=40 56 | #iowait_critical=50 57 | # Context switch limit (core / second) 58 | # Leave commented to just use the default config (critical is 56000/# (of CPU core)) 59 | #ctx_switches_careful=10000 60 | #ctx_switches_warning=12000 61 | #ctx_switches_critical=14000 62 | 63 | [percpu] 64 | # Define CPU thresholds in % 65 | # Default values if not defined: 50/70/90 66 | user_careful=50 67 | user_warning=70 68 | user_critical=90 69 | iowait_careful=50 70 | iowait_warning=70 71 | iowait_critical=90 72 | system_careful=50 73 | system_warning=70 74 | system_critical=90 75 | 76 | [gpu] 77 | # Default processor values if not defined: 50/70/90 78 | proc_careful=50 79 | proc_warning=70 80 | proc_critical=90 81 | # Default memory values if not defined: 50/70/90 82 | mem_careful=50 83 | mem_warning=70 84 | mem_critical=90 85 | 86 | [mem] 87 | # Define RAM thresholds in % 88 | # Default values if not defined: 50/70/90 89 | careful=50 90 | warning=70 91 | critical=90 92 | 93 | [memswap] 94 | # Define SWAP thresholds in % 95 | # Default values if not defined: 50/70/90 96 | careful=50 97 | warning=70 98 | critical=90 99 | 100 | [load] 101 | # Define LOAD thresholds 102 | # Value * number of cores 103 | # Default values if not defined: 0.7/1.0/5.0 per number of cores 104 | # Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages 105 | # http://www.linuxjournal.com/article/9001 106 | careful=0.7 107 | warning=1.0 108 | critical=5.0 109 | #log=False 110 | 111 | [network] 112 | # Default bitrate thresholds in % of the network interface speed 113 | # Default values if not defined: 70/80/90 114 | rx_careful=70 115 | rx_warning=80 116 | rx_critical=90 117 | tx_careful=70 118 | tx_warning=80 119 | tx_critical=90 120 | # Define the list of hidden network interfaces (comma-separated regexp) 121 | #hide=docker.*,lo 122 | # WLAN 0 alias 123 | #wlan0_alias=Wireless IF 124 | # It is possible to overwrite the bitrate thresholds per interface 125 | # WLAN 0 Default limits (in bits per second aka bps) for interface bitrate 126 | #wlan0_rx_careful=4000000 127 | #wlan0_rx_warning=5000000 128 | #wlan0_rx_critical=6000000 129 | #wlan0_rx_log=True 130 | #wlan0_tx_careful=700000 131 | #wlan0_tx_warning=900000 132 | #wlan0_tx_critical=1000000 133 | #wlan0_tx_log=True 134 | 135 | [wifi] 136 | # Define the list of hidden wireless network interfaces (comma-separated regexp) 137 | hide=lo,docker.* 138 | # Define SIGNAL thresholds in db (lower is better...) 139 | # Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength 140 | careful=-65 141 | warning=-75 142 | critical=-85 143 | 144 | #[diskio] 145 | # Define the list of hidden disks (comma-separated regexp) 146 | #hide=sda2,sda5,loop.* 147 | # Alias for sda1 148 | #sda1_alias=IntDisk 149 | 150 | [fs] 151 | # Define the list of hidden file system (comma-separated regexp) 152 | #hide=/boot.* 153 | # Define filesystem space thresholds in % 154 | # Default values if not defined: 50/70/90 155 | # It is also possible to define per mount point value 156 | # Example: /_careful=40 157 | careful=50 158 | warning=70 159 | critical=90 160 | # Allow additional file system types (comma-separated FS type) 161 | #allow=zfs 162 | 163 | [folders] 164 | # Define a folder list to monitor 165 | # The list is composed of items (list_#nb <= 10) 166 | # An item is defined by: 167 | # * path: absolute path 168 | # * careful: optional careful threshold (in MB) 169 | # * warning: optional warning threshold (in MB) 170 | # * critical: optional critical threshold (in MB) 171 | #folder_1_path=/tmp 172 | #folder_1_careful=2500 173 | #folder_1_warning=3000 174 | #folder_1_critical=3500 175 | #folder_2_path=/home/nicolargo/Videos 176 | #folder_2_warning=17000 177 | #folder_2_critical=20000 178 | #folder_3_path=/nonexisting 179 | #folder_4_path=/root 180 | 181 | [sensors] 182 | # Sensors core thresholds (in Celsius...) 183 | # Default values if not defined: 60/70/80 184 | temperature_core_careful=60 185 | temperature_core_warning=70 186 | temperature_core_critical=80 187 | # Temperatures threshold in °C for hddtemp 188 | # Default values if not defined: 45/52/60 189 | temperature_hdd_careful=45 190 | temperature_hdd_warning=52 191 | temperature_hdd_critical=60 192 | # Battery threshold in % 193 | battery_careful=80 194 | battery_warning=90 195 | battery_critical=95 196 | # Sensors alias 197 | #temp1_alias=Motherboard 0 198 | #temp2_alias=Motherboard 1 199 | #core 0_alias=CPU Core 0 200 | #core 1_alias=CPU Core 1 201 | 202 | [processlist] 203 | # Define CPU/MEM (per process) thresholds in % 204 | # Default values if not defined: 50/70/90 205 | cpu_careful=50 206 | cpu_warning=70 207 | cpu_critical=90 208 | mem_careful=50 209 | mem_warning=70 210 | mem_critical=90 211 | 212 | [ports] 213 | # Ports scanner plugin configuration 214 | # Interval in second between two scans 215 | refresh=30 216 | # Set the default timeout (in second) for a scan (can be overwritten in the scan list) 217 | timeout=3 218 | # If port_default_gateway is True, add the default gateway on top of the scan list 219 | port_default_gateway=True 220 | # Define the scan list (1 < x < 255) 221 | # port_x_host (name or IP) is mandatory 222 | # port_x_port (TCP port number) is optional (if not set, use ICMP) 223 | # port_x_description is optional (if not set, define to host:port) 224 | # port_x_timeout is optional and overwrite the default timeout value 225 | # port_x_rtt_warning is optional and defines the warning threshold in ms 226 | #port_1_host=192.168.0.1 227 | #port_1_port=80 228 | #port_1_description=Home Box 229 | #port_1_timeout=1 230 | #port_2_host=www.free.fr 231 | #port_2_description=My ISP 232 | #port_3_host=www.google.com 233 | #port_3_description=Internet ICMP 234 | #port_3_rtt_warning=1000 235 | #port_4_host=www.google.com 236 | #port_4_description=Internet Web 237 | #port_4_port=80 238 | #port_4_rtt_warning=1000 239 | 240 | [docker] 241 | # Thresholds for CPU and MEM (in %) 242 | #cpu_careful=50 243 | #cpu_warning=70 244 | #cpu_critical=90 245 | #mem_careful=20 246 | #mem_warning=50 247 | #mem_critical=70 248 | # Per container thresholds 249 | #containername_cpu_careful=10 250 | #containername_cpu_warning=20 251 | #containername_cpu_critical=30 252 | 253 | ############################################################################## 254 | # Client/server 255 | ############################################################################## 256 | 257 | [serverlist] 258 | # Define the static servers list 259 | #server_1_name=localhost 260 | #server_1_alias=My local PC 261 | #server_1_port=61209 262 | #server_2_name=localhost 263 | #server_2_port=61235 264 | #server_3_name=192.168.0.17 265 | #server_3_alias=Another PC on my network 266 | #server_3_port=61209 267 | #server_4_name=pasbon 268 | #server_4_port=61237 269 | 270 | [passwords] 271 | # Define the passwords list 272 | # Syntax: host=password 273 | # Where: host is the hostname 274 | # password is the clear password 275 | # Additionally (and optionally) a default password could be defined 276 | #localhost=abc 277 | #default=defaultpassword 278 | 279 | ############################################################################## 280 | # Exports 281 | ############################################################################## 282 | 283 | [influxdb] 284 | # Configuration for the --export-influxdb option 285 | # https://influxdb.com/ 286 | host=localhost 287 | port=8086 288 | user=root 289 | password=root 290 | db=glances 291 | prefix=localhost 292 | #tags=foo:bar,spam:eggs 293 | 294 | [cassandra] 295 | # Configuration for the --export-cassandra option 296 | # Also works for the ScyllaDB 297 | # https://influxdb.com/ or http://www.scylladb.com/ 298 | host=localhost 299 | port=9042 300 | protocol_version=3 301 | keyspace=glances 302 | replication_factor=2 303 | # If not define, table name is set to host key 304 | table=localhost 305 | 306 | [opentsdb] 307 | # Configuration for the --export-opentsdb option 308 | # http://opentsdb.net/ 309 | host=localhost 310 | port=4242 311 | #prefix=glances 312 | #tags=foo:bar,spam:eggs 313 | 314 | [statsd] 315 | # Configuration for the --export-statsd option 316 | # https://github.com/etsy/statsd 317 | host=localhost 318 | port=8125 319 | #prefix=glances 320 | 321 | [elasticsearch] 322 | # Configuration for the --export-elasticsearch option 323 | # Data are available via the ES Restful API. ex: URL//cpu/system 324 | # https://www.elastic.co 325 | host=localhost 326 | port=9200 327 | index=glances 328 | 329 | [riemann] 330 | # Configuration for the --export-riemann option 331 | # http://riemann.io 332 | host=localhost 333 | port=5555 334 | 335 | [rabbitmq] 336 | host=localhost 337 | port=5672 338 | user=guest 339 | password=guest 340 | queue=glances_queue 341 | 342 | [couchdb] 343 | # Configuration for the --export-couchdb option 344 | # https://www.couchdb.org 345 | host=localhost 346 | port=5984 347 | db=glances 348 | # user and password are optional (comment if not configured on the server side) 349 | #user=root 350 | #password=root 351 | 352 | [zeromq] 353 | # Configuration for the --export-zeromq option 354 | # http://www.zeromq.org 355 | # Use * to bind on all interfaces 356 | host=* 357 | port=5678 358 | # Glances envelopes the stats in a publish message with two frames: 359 | # - First frame containing the following prefix (STRING) 360 | # - Second frame with the Glances plugin name (STRING) 361 | # - Third frame with the Glances plugin stats (JSON) 362 | prefix=G 363 | 364 | ############################################################################## 365 | # AMPS 366 | # * enable: Enable (true) or disable (false) the AMP 367 | # * regex: Regular expression to filter the process(es) 368 | # * refresh: The AMP is executed every refresh seconds 369 | # * one_line: (optional) Force (if true) the AMP to be displayed in one line 370 | # * command: (optional) command to execute when the process is detected (thk to the regex) 371 | # * countmin: (optional) minimal number of processes 372 | # A warning will be displayed if number of process < count 373 | # * countmax: (optional) maximum number of processes 374 | # A warning will be displayed if number of process > count 375 | # * : Others variables can be defined and used in the AMP script 376 | ############################################################################## 377 | 378 | [amp_dropbox] 379 | # Use the default AMP (no dedicated AMP Python script) 380 | # Check if the Dropbox daemon is running 381 | # Every 3 seconds, display the 'dropbox status' command line 382 | enable=false 383 | regex=.*dropbox.* 384 | refresh=3 385 | one_line=false 386 | command=dropbox status 387 | countmin=1 388 | 389 | [amp_python] 390 | # Use the default AMP (no dedicated AMP Python script) 391 | # Monitor all the Python scripts 392 | # Alert if more than 20 Python scripts are running 393 | enable=false 394 | regex=.*python.* 395 | refresh=3 396 | countmax=20 397 | 398 | [amp_nginx] 399 | # Use the NGinx AMP 400 | # Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/) 401 | enable=true 402 | regex=\/usr\/sbin\/nginx 403 | refresh=60 404 | one_line=false 405 | status_url=http://localhost/nginx_status 406 | 407 | [amp_systemd] 408 | # Use the Systemd AMP 409 | enable=true 410 | regex=\/lib\/systemd\/systemd 411 | refresh=30 412 | one_line=true 413 | systemctl_cmd=/bin/systemctl --plain 414 | 415 | [amp_systemv] 416 | # Use the Systemv AMP 417 | enable=true 418 | regex=\/sbin\/init 419 | refresh=30 420 | one_line=true 421 | service_cmd=/usr/bin/service --status-all -------------------------------------------------------------------------------- /include/headphones.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | http_host = 0.0.0.0 3 | nzb_downloader = 0 4 | download_torrent_dir = "" 5 | file_permissions_enabled = 1 6 | encoderquality = 2 7 | search_interval = 1440 8 | libraryscan = 1 9 | music_encoder = 0 10 | folder_permissions = 0755 11 | ignore_clean_releases = 0 12 | http_password = "" 13 | numberofseeders = 10 14 | open_magnet_links = 0 15 | git_user = rembo10 16 | add_album_art = 0 17 | preferred_quality = 0 18 | headphones_indexer = 0 19 | rename_files = 0 20 | file_format = $Track $Artist - $Album [$Year] - $Title 21 | customhost = localhost 22 | customport = 5000 23 | interface = default 24 | folder_format = $Artist/$Album [$Year] 25 | move_files = 0 26 | cleanup_files = 0 27 | replace_existing_folders = 0 28 | preferred_bitrate_allow_lossless = 0 29 | embed_album_art = 0 30 | preferred_bitrate = "" 31 | destination_dir = "" 32 | check_github_on_startup = 1 33 | encodervbrcbr = cbr 34 | http_port = 8181 35 | xldprofile = "" 36 | delete_lossless_files = 1 37 | cue_split = 1 38 | autowant_all = 0 39 | official_releases_only = 0 40 | magnet_links = 0 41 | log_dir = /data/logs 42 | torrentblackhole_dir = "" 43 | update_db_interval = 24 44 | ignored_words = "" 45 | hppass = "" 46 | freeze_db = 0 47 | encoder_multicore_count = 0 48 | https_cert = /data/server.crt 49 | http_root = /headphones 50 | download_dir = "" 51 | http_proxy = 0 52 | git_path = "" 53 | launch_browser = 1 54 | required_words = "" 55 | git_branch = master 56 | advancedencoder = "" 57 | http_username = "" 58 | lossless_destination_dir = "" 59 | https_key = /data/server.key 60 | cache_dir = /data/cache 61 | cue_split_flac_path = "" 62 | mb_ignore_age = 365 63 | libraryscan_interval = 300 64 | file_underscores = 0 65 | soft_chroot = "" 66 | rename_unprocessed = 1 67 | keep_nfo = 0 68 | preferred_bitrate_high_buffer = 0 69 | blackhole = 0 70 | customsleep = 1 71 | keep_torrent_files = 0 72 | lossless_bitrate_from = 0 73 | api_key = "" 74 | do_not_override_git_branch = 0 75 | include_extras = 0 76 | usenet_retention = 1500 77 | samplingfrequency = 44100 78 | rename_frozen = 1 79 | enable_https = 0 80 | encoder_path = "" 81 | hpuser = "" 82 | encoderlossless = 1 83 | torrent_downloader = 0 84 | detect_bitrate = 0 85 | torrent_removal_interval = 720 86 | blackhole_dir = "" 87 | keep_original_folder = 0 88 | extras = "" 89 | autowant_manually_added = 1 90 | encoder_multicore = 0 91 | encoderfolder = "" 92 | mirror = musicbrainz.org 93 | album_art_format = folder 94 | preferred_words = "" 95 | folder_permissions_enabled = 1 96 | check_github = 1 97 | custompass = "" 98 | api_enabled = 0 99 | correct_metadata = 0 100 | encoder = ffmpeg 101 | customuser = "" 102 | download_scan_interval = 5 103 | cue_split_shntool_path = "" 104 | bitrate = 192 105 | wait_until_release_date = 0 106 | music_dir = "" 107 | auto_add_artists = 1 108 | do_not_process_unmatched = 0 109 | lastfm_username = "" 110 | embed_lyrics = 0 111 | autowant_upcoming = 1 112 | config_version = 5 113 | check_github_interval = 360 114 | preferred_bitrate_low_buffer = 0 115 | customauth = 0 116 | file_permissions = 0644 117 | prefer_torrents = 0 118 | encoderoutputformat = mp3 119 | lossless_bitrate_to = 0 120 | [Growl] 121 | growl_enabled = 0 122 | growl_onsnatch = 0 123 | growl_host = "" 124 | growl_password = "" 125 | [Subsonic] 126 | subsonic_host = "" 127 | subsonic_password = "" 128 | subsonic_enabled = 0 129 | subsonic_username = "" 130 | [Advanced] 131 | ignored_files = , 132 | verify_ssl_cert = 1 133 | album_completion_pct = 80 134 | ignored_folders = , 135 | cache_sizemb = 32 136 | journal_mode = wal 137 | [XBMC] 138 | xbmc_update = 0 139 | xbmc_notify = 0 140 | xbmc_username = "" 141 | xbmc_enabled = 0 142 | xbmc_password = "" 143 | xbmc_host = "" 144 | [Email] 145 | email_smtp_user = "" 146 | email_onsnatch = 0 147 | email_tls = 0 148 | email_smtp_port = 25 149 | email_smtp_server = "" 150 | email_ssl = 0 151 | email_smtp_password = "" 152 | email_to = "" 153 | email_enabled = 0 154 | email_from = "" 155 | [Waffles] 156 | waffles_passkey = "" 157 | waffles = 0 158 | waffles_ratio = "" 159 | waffles_uid = "" 160 | [NZBget] 161 | nzbget_category = "" 162 | nzbget_priority = 0 163 | nzbget_password = "" 164 | nzbget_username = nzbget 165 | nzbget_host = "" 166 | [Synoindex] 167 | synoindex_enabled = 0 168 | [Plex] 169 | plex_token = "" 170 | plex_client_host = "" 171 | plex_notify = 0 172 | plex_server_host = "" 173 | plex_enabled = 0 174 | plex_username = "" 175 | plex_update = 0 176 | plex_password = "" 177 | [Old Piratebay] 178 | oldpiratebay = 0 179 | oldpiratebay_ratio = "" 180 | oldpiratebay_url = "" 181 | [Twitter] 182 | twitter_username = "" 183 | twitter_prefix = Headphones 184 | twitter_onsnatch = 0 185 | twitter_enabled = 0 186 | twitter_password = "" 187 | [Pushover] 188 | pushover_apitoken = "" 189 | pushover_onsnatch = 0 190 | pushover_enabled = 0 191 | pushover_keys = "" 192 | pushover_priority = 0 193 | [NZBsorg] 194 | nzbsorg_hash = "" 195 | nzbsorg_uid = "" 196 | nzbsorg = 0 197 | [NMA] 198 | nma_priority = 0 199 | nma_onsnatch = 0 200 | nma_apikey = "" 201 | nma_enabled = 0 202 | [Piratebay] 203 | piratebay_proxy_url = "" 204 | piratebay_ratio = "" 205 | piratebay = 0 206 | [Deluge] 207 | deluge_host = "" 208 | deluge_paused = 0 209 | deluge_done_directory = "" 210 | deluge_cert = "" 211 | deluge_label = "" 212 | deluge_password = "" 213 | [Newznab] 214 | newznab = 0 215 | newznab_enabled = 1 216 | extra_newznabs = , 217 | newznab_host = "" 218 | newznab_apikey = "" 219 | [Prowl] 220 | prowl_onsnatch = 0 221 | prowl_enabled = 0 222 | prowl_keys = "" 223 | prowl_priority = 0 224 | [SABnzbd] 225 | sab_host = "" 226 | sab_category = "" 227 | sab_password = "" 228 | sab_username = "" 229 | sab_apikey = "" 230 | [Transmission] 231 | transmission_username = "" 232 | transmission_host = "" 233 | transmission_password = "" 234 | [Telegram] 235 | telegram_enabled = 0 236 | telegram_token = "" 237 | telegram_onsnatch = 0 238 | telegram_userid = "" 239 | [Torznab] 240 | extra_torznabs = , 241 | torznab_host = "" 242 | torznab_enabled = 1 243 | torznab_apikey = "" 244 | torznab = 0 245 | [Songkick] 246 | songkick_apikey = nd1We7dFW2RqxPw8 247 | songkick_filter_enabled = 0 248 | songkick_location = "" 249 | songkick_enabled = 1 250 | [uTorrent] 251 | utorrent_password = "" 252 | utorrent_label = "" 253 | utorrent_host = "" 254 | utorrent_username = "" 255 | [Kat] 256 | kat = 0 257 | kat_ratio = "" 258 | kat_proxy_url = "" 259 | [omgwtfnzbs] 260 | omgwtfnzbs = 0 261 | omgwtfnzbs_uid = "" 262 | omgwtfnzbs_apikey = "" 263 | [LMS] 264 | lms_enabled = 0 265 | lms_host = "" 266 | [Pushalot] 267 | pushalot_apikey = "" 268 | pushalot_enabled = 0 269 | pushalot_onsnatch = 0 270 | [Rutracker] 271 | rutracker = 0 272 | rutracker_password = "" 273 | rutracker_ratio = "" 274 | rutracker_user = "" 275 | [PushBullet] 276 | pushbullet_deviceid = "" 277 | pushbullet_apikey = "" 278 | pushbullet_enabled = 0 279 | pushbullet_onsnatch = 0 280 | [OSX_Notify] 281 | osx_notify_app = /Applications/Headphones 282 | osx_notify_onsnatch = 0 283 | osx_notify_enabled = 0 284 | [Mininova] 285 | mininova_ratio = "" 286 | mininova = 0 287 | [Strike] 288 | strike = 0 289 | strike_ratio = "" 290 | [What.cd] 291 | whatcd_username = "" 292 | whatcd = 0 293 | whatcd_ratio = "" 294 | whatcd_password = "" 295 | [Boxcar] 296 | boxcar_enabled = 0 297 | boxcar_token = "" 298 | boxcar_onsnatch = 0 299 | [Beets] 300 | idtag = 0 301 | [MPC] 302 | mpc_enabled = 0 303 | -------------------------------------------------------------------------------- /include/https.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function letsencrypt () 4 | { 5 | mkdir -p ssl 6 | mkdir -p $tmpFolder/letsencrypt/defaults 7 | URL=$server_name 8 | if [ ! -z $SUBDOMAINS ]; then 9 | # see https://github.com/aptalca/docker-webserver/blob/master/firstrun.sh 10 | echo "SUBDOMAINS entered, processing" 11 | for job in $(echo $SUBDOMAINS | tr "," " "); do 12 | export SUBDOMAINS2="$SUBDOMAINS2 -d "$job"."$URL"" 13 | done 14 | echo "Sub-domains processed are:" $SUBDOMAINS2 15 | echo -e "SUBDOMAINS2=\"$SUBDOMAINS2\" URL=\"$URL\" EMAIL=\"$EMAIL\"" > $tmpFolder/letsencrypt/defaults/domains.conf 16 | else 17 | echo "No subdomains defined" 18 | echo -e "URL=\"$URL\" EMAIL=\"$EMAIL\"" > $tmpFolder/letsencrypt/defaults/domains.conf 19 | fi 20 | 21 | if [ ! -f $tmpFolder/letsencrypt/config/donoteditthisfile.conf ]; then 22 | mkdir -p $tmpFolder/letsencrypt/config 23 | touch $tmpFolder/letsencrypt/config/donoteditthisfile.conf 24 | fi 25 | 26 | . $tmpFolder/letsencrypt/config/donoteditthisfile.conf 27 | #use quotes to fix: 28 | #include/https.sh: line 29: [: files,rtorrent,sickrage,couchpotato,plex,explorer: unary operator expected 29 | 30 | if [ ! "$URL" = "$ORIGURL" ] || [ ! "$SUBDOMAINS" = "$ORIGSUBDOMAINS" ]; then 31 | if [ -d $tmpFolder/letsencrypt/$URL ]; then 32 | echo "Different sub/domains entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created" 33 | docker run -it --rm \ 34 | -v $tmpFolder/letsencrypt:/etc/letsencrypt \ 35 | -p 8080:80 -p 8443:443 \ 36 | xataz/letsencrypt \ 37 | revoke --non-interactive --cert-path /etc/letsencrypt/live/$URL/fullchain.pem 38 | fi 39 | rm -rf $tmpFolder/letsencrypt/live/$URL 40 | rm -rf /ssl/*.pem 41 | echo -e "ORIGURL=\"$URL\" ORIGSUBDOMAINS=\"$SUBDOMAINS\"" > $tmpFolder/letsencrypt/config/donoteditthisfile.conf 42 | fi 43 | chmod +x $INCLUDE/letsencrypt.sh 44 | echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > $tmpFolder/letsencryptcron.conf 45 | here2=`pwd` 46 | echo "0 2 * * * $here/$INCLUDE/letsencrypt.sh $tmpFolder $here2/ssl/ >> $tmpFolder/letsencrypt.log 2>&1" >> $tmpFolder/letsencryptcron.conf 47 | crontab $tmpFolder/letsencryptcron.conf 48 | if [[ ! -f ssl/dhparams.pem ]]; then 49 | openssl dhparam -out ssl/dhparams.pem 4096 & 50 | fi 51 | # generate the certificate 52 | $here/$INCLUDE/letsencrypt.sh $tmpFolder $here2/ssl/ 53 | } 54 | 55 | function self () 56 | { 57 | mkdir -p ssl 58 | openssl req -x509 -nodes -days 365 -newkey rsa:4096 \ 59 | -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=*.$server_name" \ 60 | -keyout ssl/nginx.key -out ssl/nginx.crt 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /include/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # MAINTAINER https://github.com/cloneMe 3 | 4 | function FONCYES () 5 | { 6 | [ "$1" = "y" ] || [ "$1" = "Y" ] 7 | } 8 | 9 | function FONC_EXIT () 10 | { 11 | echo -e "docker not found & you have to install it ! Your linux is : " 12 | cat /etc/*-release 13 | exit 1 14 | } 15 | 16 | function FUNC_INSTALL_DOCKER () 17 | { 18 | curl -sSL https://get.docker.com/ | sh 19 | # now install docker-compose 20 | curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose 21 | chmod +x /usr/local/bin/docker-compose 22 | docker-compose --version 23 | } 24 | 25 | function FONC_INSTALL () 26 | { 27 | if ! hash docker 2>/dev/null; then 28 | apt-get update 29 | if ! hash curl 2>/dev/null; then 30 | echo "Install curl & docker ? [y/n]" 31 | read -r RESPONSE 32 | if FONCYES "$RESPONSE"; then 33 | apt-get install -y curl 34 | else 35 | FONC_EXIT 36 | fi 37 | fi 38 | if FONCYES "$RESPONSE"; then 39 | FUNC_INSTALL_DOCKER 40 | else 41 | echo "Install docker ? [y/n]" 42 | read -r RESPONSE 43 | if FONCYES "$RESPONSE"; then 44 | FUNC_INSTALL_DOCKER 45 | else 46 | FONC_EXIT 47 | fi 48 | fi 49 | 50 | fi 51 | } 52 | 53 | FONC_INSTALL 54 | 55 | -------------------------------------------------------------------------------- /include/letsencrypt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # thanks to https://github.com/aptalca/docker-webserver/blob/master/defaults/letsencrypt.sh 3 | echo "<------------------------------------------------->" 4 | echo 5 | echo "<------------------------------------------------->" 6 | echo "cronjob running at "$(date) 7 | tmpFolder=$1 8 | sslFolder=$2 9 | 10 | . $tmpFolder/letsencrypt/defaults/domains.conf 11 | 12 | echo "URL is" $URL 13 | echo "Subdomains are" $SUBDOMAINS2 14 | echo "deciding whether to renew the cert(s)" 15 | if [ -f "$tmpFolder/letsencrypt/live/$URL/fullchain.pem" ]; then 16 | EXP=$(date -d "`openssl x509 -in $tmpFolder/letsencrypt/live/$URL/fullchain.pem -text -noout|grep "Not After"|cut -c 25-`" +%s) 17 | DATENOW=$(date -d "now" +%s) 18 | DAYS_EXP=$(( ( $EXP - $DATENOW ) / 86400 )) 19 | if [[ $DAYS_EXP -gt 30 ]]; then 20 | echo "Existing certificate is still valid for another $DAYS_EXP day(s); skipping renewal." 21 | exit 0 22 | else 23 | echo "Preparing to renew certificate that is older than 60 days" 24 | fi 25 | else 26 | echo "Preparing to generate server certificate for the first time" 27 | fi 28 | echo "Temporarily stopping Nginx" 29 | docker stop seedboxdocker_front_1 30 | echo "Generating/Renewing certificate" 31 | docker run -i --rm \ 32 | -v $tmpFolder/letsencrypt:/etc/letsencrypt \ 33 | -p 80:80 -p 443:443 \ 34 | certbot/certbot \ 35 | certonly --standalone --server https://acme-v02.api.letsencrypt.org/directory --rsa-key-size 4096 --email $EMAIL --agree-tos -d $URL $SUBDOMAINS2 36 | # ex: $tmpFolder/letsencrypt/live/$URL-001/* 37 | cp $tmpFolder/letsencrypt/live/$URL*/* $sslFolder 38 | echo "Restarting web server" 39 | docker start seedboxdocker_front_1 40 | -------------------------------------------------------------------------------- /include/main.sh: -------------------------------------------------------------------------------- 1 | # MAINTAINER https://github.com/cloneMe 2 | . "$INCLUDE"/install.sh 3 | . "$INCLUDE"/https.sh 4 | . "$INCLUDE"/functions.sh 5 | 6 | ######################################################"" 7 | ############# DO NOT UPDATE 8 | ######################################################"" 9 | users="htpasswd.txt" 10 | 11 | if [ ! -f "$users" ]; then 12 | printf "foo:$(openssl passwd -crypt foo)\n" >> "$users" 13 | printf "bar:$(openssl passwd -crypt foo)\n" >> "$users" 14 | fi 15 | 16 | # for windows users 17 | if [ ${here:0:3} = "/C/" ]; then 18 | here=/c${here:2} 19 | seedboxFiles=/c${seedboxFiles:2} 20 | fi 21 | 22 | echo "New folders will be created in $seedboxFiles" 23 | #echo "$here" 24 | 25 | tmpFolder="$here/$INCLUDE/tmp" 26 | mkdir -p $tmpFolder 27 | 28 | useSSL="false" 29 | if [ "$useHttps" = "self" ]; then 30 | useSSL="true" 31 | if [ ! -f "ssl/nginx.key" ]; then 32 | self 33 | fi 34 | elif [ "$useHttps" = "letsEncrypt" ]; then 35 | letsencrypt 36 | if [ -f "ssl/privkey.pem" ]; then 37 | useSSL="true" 38 | fi 39 | elif [ "$useHttps" = "provided" ]; then 40 | if [[ -f "ssl/nginx.key" || -f "ssl/privkey.pem" ]]; then 41 | useSSL="true" 42 | else 43 | echo "error: ssl/nginx.key or ssl/privkey.pem not found. Provide these files then run this script again." 44 | fi 45 | fi 46 | httpMode="http" 47 | if [ "$useSSL" = "true" ]; then 48 | httpMode="https" 49 | fi 50 | 51 | if [[ "$openvpn" = "true" && ! -d "$seedboxFiles/config/openvpn" ]]; then 52 | OVPN_DATA="$seedboxFiles/config/openvpn:/etc/openvpn" 53 | docker run -v "$OVPN_DATA" --rm kylemanna/openvpn ovpn_genconfig -u udp://"$server_name" 54 | docker run -v "$OVPN_DATA" --rm -it kylemanna/openvpn ovpn_initpki 55 | echo "#!/bin/bash 56 | # Generate a client certificate without a passphrase 57 | docker run -v $OVPN_DATA --rm -it kylemanna/openvpn easyrsa build-client-full \$1 nopass 58 | # Retrieve the client configuration with embedded certificates 59 | docker run -v $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient \$1 > \$1.ovpn 60 | " > createVpnFor.sh 61 | chmod +x createVpnFor.sh 62 | fi 63 | 64 | 65 | sickrage_conf="" 66 | web_port=20001 67 | 68 | cp_dc_conf="" 69 | cp_ng_conf="" 70 | 71 | while IFS='' read -r line || [[ -n "$line" ]]; do 72 | #echo "Text read from file: $line" 73 | IFS=':' read -r userName string <<< "$line" 74 | #sickrage 75 | sickrage_conf=$(addProxy_pass "$sickrage_conf" "seedboxdocker_sickrage" "$web_port" "$userName") 76 | web_port=$[$web_port+1] 77 | #CouchPotato 78 | if [ "$couchpotato" = "true" ]; then 79 | cp_ng_conf=$(addProxy_pass "$cp_ng_conf" "seedboxdocker_couchpotato_$userName" "5050" "$userName") 80 | cp_dc_conf=$(addCouchPotato "$cp_dc_conf" "$userName") 81 | depends_on="$depends_on - couchpotato_$userName\n" 82 | fi 83 | generateHelp "$userName" 84 | done < "$users" 85 | generateURL 86 | 87 | sed -e 's|#sickrage_conf#|'"$sickrage_conf"'|g' -e 's|#couchpotato_conf#|'"$cp_ng_conf"'|g' -e "s|#server_name#|$server_name|g" ./"$INCLUDE"/nginx.conf.tmpl > ./nginx.conf 88 | 89 | sed -e 's|#couckPotato_conf#|'"$cp_dc_conf"'|g' -e "s|#pwd#|$here|g" -e "s|#seedboxFolder#|$seedboxFiles|g" -e "s|#server_name#|$server_name|g" ./"$INCLUDE"/docker-compose.yml.tmpl > ./docker-compose.yml 90 | sed -i 's|#PLEX_USERNAME#|'"$plexUser"'|g' docker-compose.yml 91 | sed -i 's|#PLEX_PASSWORD#|'"$plexPass"'|g' docker-compose.yml 92 | 93 | #Delete undeployed servers 94 | depends_on="$depends_on$(delete "plexpy" $plexpy)" 95 | depends_on="$depends_on$(delete "plex" $plex)" 96 | depends_on="$depends_on$(delete "emby" $emby)" 97 | depends_on="$depends_on$(delete "limbomedia" $limbomedia)" 98 | depends_on="$depends_on$(delete "libresonic" $libresonic)" 99 | depends_on="$depends_on$(delete "ubooquity" $ubooquity)" 100 | depends_on="$depends_on$(delete "sickrage" $sickrage)" 101 | depends_on="$depends_on$(delete "radarr" $radarr)" 102 | depends_on="$depends_on$(delete "mylar" $mylar)" 103 | depends_on="$depends_on$(delete "rtorrent" $rtorrent)" 104 | depends_on="$depends_on$(delete "jackett" $jackett)" 105 | depends_on="$depends_on$(delete "headphones" $headphones)" 106 | delete "couchpotato" $couchpotato > /dev/null 107 | delete "openvpn" $openvpn > /dev/null 108 | delete "teamspeak" $teamspeak > /dev/null 109 | delete "pureftpd" $pureftpd > /dev/null 110 | delete "fail2ban" $fail2ban > /dev/null 111 | delete "subliminal" $subliminal > /dev/null 112 | depends_on="$depends_on$(delete "cloud" $cloud)" 113 | depends_on="$depends_on$(delete "explorer" $explorer)" 114 | depends_on="$depends_on$(delete "filemanager" $filemanager)" 115 | depends_on="$depends_on$(delete "syncthing" $syncthing)" 116 | depends_on="$depends_on$(delete "glances" $glances)" 117 | depends_on="$depends_on$(delete "muximux" $muximux)" 118 | depends_on="$depends_on$(delete "htpcmanager" $htpcmanager)" 119 | depends_on="$depends_on$(delete "portainer" $portainer)" 120 | depends_on="$depends_on$(delete "watchtower" $watchtower)" 121 | depends_on="$depends_on$(delete "elfinder" $elfinder)" 122 | depends_on="$depends_on$(delete "butterfly" $butterfly)" 123 | 124 | if [ "$depends_on" != "" ]; then 125 | depends_on=" depends_on: \n$depends_on" 126 | fi 127 | 128 | sed -i 's|#useSSL#|'"$useSSL"'|g' docker-compose.yml 129 | sed -i 's|#TZ#|'"$TZ"'|g' docker-compose.yml 130 | sed -i 's|#frontend_dependencies#|'"$depends_on"'|g' docker-compose.yml 131 | sed -i "s|#plex_config#|$plex_config|g" docker-compose.yml 132 | sed -i "s|#emby_config#|$emby_config|g" docker-compose.yml 133 | sed -i "s|#headphones_config#|$headphones_config|g" docker-compose.yml 134 | sed -i "s|#mux_config#|$mux_config|g" docker-compose.yml 135 | 136 | if [[ "$headphones" = "true" && ! -f $seedboxFiles/config/headphones/headphones.ini ]]; then 137 | mkdir -p $seedboxFiles/config/headphones 138 | cp $INCLUDE/headphones.ini $seedboxFiles/config/headphones/headphones.ini 139 | fi 140 | #First idea: ln /var/log/auth.log $seedboxFiles/log/ssh/host.log 141 | # will not work because you can have a log rotation. 142 | # Fix : use /var/log in the fail2ban container 143 | if [ ! -f /var/log/auth.log ]; then 144 | # in case: if /var/log/auth.log does not exist, use a fake 145 | touch $tmpFolder/auth.log 146 | sed -i 's|/var/log:/host|'"$tmpFolder"':/host|g' docker-compose.yml 147 | fi 148 | 149 | 150 | -------------------------------------------------------------------------------- /include/nginx.conf.tmpl: -------------------------------------------------------------------------------- 1 | worker_processes auto; 2 | 3 | user root root; 4 | pid /run/nginx.pid; 5 | 6 | events { 7 | worker_connections 4096; 8 | use epoll; 9 | multi_accept on; 10 | } 11 | 12 | http { 13 | sendfile on; 14 | tcp_nopush on; 15 | tcp_nodelay on; 16 | keepalive_timeout 65; 17 | types_hash_max_size 2048; 18 | 19 | include mime.types; 20 | default_type application/octet-stream; 21 | 22 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 23 | ssl_prefer_server_ciphers on; 24 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA'; 25 | 26 | 27 | gzip on; 28 | gzip_disable "msie6"; 29 | 30 | client_max_body_size 8M; 31 | 32 | server { 33 | include common.conf; 34 | auth_basic "Restricted"; 35 | auth_basic_user_file /etc/nginx/.htpasswd; 36 | server_name #server_name#; 37 | 38 | location / { 39 | #start_glances 40 | if ($http_referer ~ "^https?://[^/]+/glances"){ 41 | rewrite ^/(.*) /glances/$1 redirect; 42 | } 43 | #end_glances 44 | #start_cloud 45 | if ($http_referer ~ "^https?://[^/]+/cloud"){ 46 | rewrite ^/(.*) /cloud/$1 redirect; 47 | } 48 | #end_cloud 49 | 50 | 51 | root /var/www; 52 | } 53 | 54 | #start_rtorrent 55 | location /rtorrent/ { 56 | fastcgi_pass_header Authorization; 57 | include fastcgi_params; 58 | include proxy_params; 59 | 60 | rewrite /rtorrent/(.*) /$1 break; 61 | 62 | proxy_pass https://seedboxdocker_rtorrent_1:443; 63 | 64 | } 65 | #end_rtorrent 66 | 67 | #start_sickrage 68 | location /sickrage { 69 | include proxy_params; 70 | #sickrage_conf# 71 | } 72 | #end_sickrage 73 | 74 | 75 | 76 | #start_plex 77 | location /web { 78 | proxy_pass http://seedboxdocker_plex_1:32400; 79 | include proxy_params; 80 | } 81 | 82 | location /plex { 83 | proxy_pass http://seedboxdocker_plex_1:32400/web; 84 | } 85 | #end_plex 86 | 87 | #start_emby 88 | location /emby { 89 | proxy_pass http://emby; 90 | include proxy_params; 91 | } 92 | #end_emby 93 | 94 | #start_limbomedia 95 | location /limbomedia { 96 | include proxy_params; 97 | rewrite /limbomedia/(.*) /$1 break; 98 | proxy_pass http://limbomedia; 99 | } 100 | #end_limbomedia# 101 | 102 | #start_cloud 103 | location /cloud/ { 104 | rewrite /cloud/(.*) /$1 break; 105 | proxy_pass http://seedboxdocker_cloud:8000/; 106 | include proxy_params; 107 | } 108 | #end_cloud 109 | 110 | #start_headphones 111 | location /headphones { 112 | proxy_pass http://headphones; 113 | include proxy_params; 114 | } 115 | #end_headphones 116 | 117 | #start_couchpotato 118 | location /couchpotato { 119 | #couchpotato_conf# 120 | include proxy_params; 121 | } 122 | #end_couchpotato 123 | 124 | #start_muximux 125 | location /muximux/ { 126 | proxy_pass http://seedboxdocker_muximux_1/; 127 | include proxy_params; 128 | } 129 | #end_muximux 130 | 131 | #start_glances 132 | location /glances/ { 133 | rewrite /glances/(.*) /$1 break; 134 | proxy_pass http://seedboxdocker_glances_1:61208/; 135 | include proxy_params; 136 | } 137 | #end_glances 138 | 139 | #start_syncthing 140 | location /syncthing/ { 141 | proxy_pass http://seedboxdocker_syncthing_1:8384/; 142 | include proxy_params; 143 | } 144 | #end_syncthing 145 | 146 | #start_plexpy 147 | location /plexpy { 148 | proxy_pass http://seedboxdocker_plexpy_1:8181; 149 | include proxy_params; 150 | } 151 | #end_plexpy 152 | 153 | #start_jackett 154 | location /jackett { 155 | proxy_pass http://jackett:9117; 156 | include proxy_params; 157 | } 158 | #end_jackett 159 | 160 | #start_htpcmanager 161 | location /htpc { 162 | proxy_pass http://tool_HTPCManager:8085; 163 | include proxy_params; 164 | } 165 | #end_htpcmanager 166 | 167 | #start_mylar 168 | location /mylar { 169 | proxy_pass http://autodl-comics_mylar:8090; 170 | include proxy_params; 171 | } 172 | #end_mylar 173 | 174 | #start_radarr 175 | location /radarr { 176 | proxy_pass http://autodl-movies_radarr:7878; 177 | include proxy_params; 178 | } 179 | #end_radarr 180 | 181 | #start_ubooquity 182 | location /ubooquity { 183 | proxy_pass http://stream-comics_ubooquity:2202; 184 | include proxy_params; 185 | } 186 | #end_ubooquity 187 | 188 | #start_libresonic 189 | location /libresonic { 190 | proxy_pass http://stream-music_libresonic:4040; 191 | include proxy_params; 192 | } 193 | #end_libresonic 194 | 195 | #start_portainer 196 | location /portainer/ { 197 | include proxy_params; 198 | proxy_set_header Connection ""; 199 | proxy_pass http://seedboxdocker_portainer_1:9000/; 200 | 201 | } 202 | location /portainer/api/websocket/ { 203 | include proxy_params; 204 | proxy_set_header Upgrade $http_upgrade; 205 | proxy_set_header Connection "upgrade"; 206 | proxy_pass http://seedboxdocker_portainer_1:9000/api/websocket/; 207 | 208 | } 209 | #end_portainer 210 | 211 | #start_elfinder 212 | location /elfinder/ { 213 | 214 | proxy_pass http://seedboxdocker_elfinder_1/; 215 | include proxy_params; 216 | } 217 | #end_elfinder 218 | 219 | #start_butterfly 220 | location /butterfly { 221 | 222 | rewrite ^/butterfly/?(.*) /$1 break; 223 | proxy_pass http://seedboxdocker_butterfly_1:57575; 224 | 225 | include proxy_params; 226 | 227 | proxy_set_header Upgrade $http_upgrade; 228 | proxy_set_header Connection "upgrade"; 229 | 230 | subs_filter_types text/html text/css text/xml application/javascript; 231 | subs_filter /style.css '/butterfly/style.css'; 232 | subs_filter /static '/butterfly/static'; 233 | subs_filter /ws '/butterfly/ws'; 234 | subs_filter location.pathname '"/"'; 235 | } 236 | #end_butterfly 237 | 238 | location /nginx_status { 239 | stub_status on; 240 | access_log off; 241 | } 242 | } 243 | #start_rtorrent 244 | upstream rtorrent { 245 | server seedboxdocker_rtorrent_1; 246 | } 247 | upstream rS { 248 | server seedboxdocker_rtorrent_1:443; 249 | } 250 | 251 | #end_rtorrent 252 | 253 | 254 | 255 | #start_emby 256 | upstream emby { 257 | server emby:8096; 258 | } 259 | 260 | #end_emby 261 | #start_limbomedia 262 | upstream limbomedia { 263 | server limbomedia:8000; 264 | } 265 | 266 | #end_limbomedia 267 | #start_headphones 268 | upstream headphones { 269 | server seedboxdocker_headphones_1:8181; 270 | } 271 | 272 | #end_headphones 273 | 274 | 275 | 276 | #start_explorer 277 | upstream explorer { 278 | server seedboxdocker_explorer_1:4859; 279 | } 280 | server { 281 | include common.conf; 282 | server_name ~^(explorer)(\.\w+)+$; 283 | 284 | auth_basic "Restricted"; 285 | auth_basic_user_file /etc/nginx/.htpasswd; 286 | location / { 287 | proxy_pass http://explorer; 288 | } 289 | } 290 | #end_explorer 291 | #start_filemanager 292 | upstream filemanager { 293 | server seedboxdocker_filemanager_1; 294 | } 295 | server { 296 | include common.conf; 297 | server_name ~^(files)(\.\w+)+$; 298 | 299 | auth_basic "Restricted"; 300 | auth_basic_user_file /etc/nginx/.htpasswd; 301 | location / { 302 | proxy_pass http://filemanager; 303 | } 304 | } 305 | #end_filemanager 306 | 307 | 308 | } 309 | 310 | # vim: ft=nginx 311 | -------------------------------------------------------------------------------- /include/services.conf.tmpl: -------------------------------------------------------------------------------- 1 | #start_root 2 | location / { 3 | root /var/www; 4 | index index.html index.htm; 5 | 6 | #start_glances 7 | if ($http_referer ~ "^https?://[^/]+/glances"){ 8 | rewrite ^/(.*) /glances/$1 redirect; 9 | } 10 | #end_glances 11 | 12 | #start_rtorrent 13 | if ($http_referer ~ "^https?://[^/]+/rtorrent"){ 14 | rewrite ^/(.*) /rtorrent/$1 redirect; 15 | } 16 | #end_rtorrent 17 | 18 | #start_cloud 19 | if ($http_referer ~ "^https?://[^/]+/cloud"){ 20 | rewrite ^/(.*) /cloud/$1 redirect; 21 | } 22 | #end_cloud 23 | 24 | #start_muximux 25 | include auth-basic.conf; 26 | rewrite ^/(.*) /muximux/$1 redirect; 27 | #end_muximux 28 | } 29 | #end_root 30 | 31 | #start_rtorrent 32 | location /rtorrent/ { 33 | include auth-basic.conf; 34 | fastcgi_pass_header Authorization; 35 | include /etc/nginx/fastcgi_params; 36 | include proxy.conf; 37 | 38 | rewrite /rtorrent/(.*) /$1 break; 39 | proxy_pass http://seedboxdocker_rtorrent_1/; 40 | } 41 | #end_rtorrent 42 | 43 | #start_sickrage 44 | location /sickrage { 45 | include auth-basic.conf; 46 | include proxy.conf; 47 | #sickrage_conf# 48 | } 49 | #end_sickrage 50 | 51 | #start_plex 52 | location /web { 53 | proxy_pass http://seedboxdocker_plex_1:32400; 54 | include proxy.conf; 55 | } 56 | 57 | location /plex { 58 | proxy_pass http://seedboxdocker_plex_1:32400/web; 59 | } 60 | #end_plex 61 | 62 | #start_emby 63 | location /emby { 64 | include auth-basic.conf; 65 | proxy_pass http://emby:8096; 66 | include proxy.conf; 67 | } 68 | #end_emby 69 | 70 | #start_limbomedia 71 | location /limbomedia { 72 | include auth-basic.conf; 73 | proxy_pass http://limbomedia:8000; 74 | include proxy.conf; 75 | } 76 | #end_limbomedia# 77 | 78 | #start_cloud 79 | location /cloud/ { 80 | include auth-basic.conf; 81 | rewrite /cloud/(.*) /$1 break; 82 | proxy_pass http://seedboxdocker_cloud:8000/; 83 | include proxy.conf; 84 | } 85 | #end_cloud 86 | 87 | #start_headphones 88 | location /headphones { 89 | include auth-basic.conf; 90 | proxy_pass http://headphones:8181; 91 | include proxy.conf; 92 | } 93 | #end_headphones 94 | 95 | #start_couchpotato 96 | location /couchpotato { 97 | include auth-basic.conf; 98 | #couchpotato_conf# 99 | include proxy.conf; 100 | } 101 | #end_couchpotato 102 | 103 | #start_muximux 104 | location /muximux/ { 105 | include auth-basic.conf; 106 | rewrite /muximux/(.*) /$1 break; 107 | proxy_pass http://seedboxdocker_muximux_1/; 108 | include proxy.conf; 109 | } 110 | #end_muximux 111 | 112 | #start_glances 113 | location /glances/ { 114 | include auth-basic.conf; 115 | rewrite /glances/(.*) /$1 break; 116 | proxy_pass http://seedboxdocker_glances_1:61208/; 117 | include proxy.conf; 118 | } 119 | #end_glances 120 | 121 | #start_syncthing 122 | location /syncthing/ { 123 | include auth-basic.conf; 124 | proxy_pass http://seedboxdocker_syncthing_1:8384/; 125 | include proxy.conf; 126 | } 127 | #end_syncthing 128 | 129 | #start_plexpy 130 | location /plexpy { 131 | include auth-basic.conf; 132 | proxy_pass http://seedboxdocker_plexpy_1:8181; 133 | include proxy.conf; 134 | } 135 | #end_plexpy 136 | 137 | #start_portainer 138 | location /portainer/ { 139 | include proxy.conf; 140 | proxy_set_header Connection ""; 141 | proxy_pass http://seedboxdocker_portainer_1:9000/; 142 | 143 | } 144 | location /portainer/api/websocket/ { 145 | include proxy.conf; 146 | proxy_set_header Upgrade $http_upgrade; 147 | proxy_set_header Connection "upgrade"; 148 | proxy_pass http://seedboxdocker_portainer_1:9000/api/websocket/; 149 | 150 | } 151 | #end_portainer 152 | 153 | #start_elfinder 154 | location /elfinder/ { 155 | include auth-basic.conf; 156 | proxy_pass http://seedboxdocker_elfinder_1/; 157 | include proxy.conf; 158 | } 159 | #end_elfinder 160 | 161 | #start_butterfly 162 | location /butterfly { 163 | include auth-basic.conf; 164 | rewrite ^/butterfly/?(.*) /$1 break; 165 | proxy_pass http://seedboxdocker_butterfly_1:57575; 166 | 167 | include proxy.conf; 168 | 169 | proxy_set_header Upgrade $http_upgrade; 170 | proxy_set_header Connection "upgrade"; 171 | 172 | subs_filter_types text/html text/css text/xml application/javascript; 173 | subs_filter /style.css '/butterfly/style.css'; 174 | subs_filter /static '/butterfly/static'; 175 | subs_filter /ws '/butterfly/ws'; 176 | subs_filter location.pathname '"/"'; 177 | } 178 | #end_butterfly 179 | 180 | location /nginx_status { 181 | stub_status on; 182 | access_log off; 183 | } 184 | 185 | 186 | # vim: ft=nginx 187 | -------------------------------------------------------------------------------- /include/update.sh: -------------------------------------------------------------------------------- 1 | 2 | function addCustomProviders { 3 | echo "addCustomProviders for $1" 4 | mkdir -p $seedboxFiles/config/couchpotato_$1/custom_plugins/torrent9 5 | #t411 6 | cp -r $tmpFolder/frenchproviders/t411 $seedboxFiles/config/couchpotato_$1/custom_plugins/t411 7 | #torrent9 8 | cp $tmpFolder/torrent9/*.py $seedboxFiles/config/couchpotato_$1/custom_plugins/torrent9 9 | 10 | } 11 | 12 | sleep 5 13 | 14 | if [ "$jackett" = "true" ]; then 15 | url="$(grep BasePathOverride $seedboxFiles/config/jackett/Jackett/ServerConfig.json)" 16 | if [ "$url" != ' "BasePathOverride": "/jackett"' ]; then 17 | sed -i 's|'"$url"'| "BasePathOverride": "/jackett"|g' $seedboxFiles/config/jackett/Jackett/ServerConfig.json 18 | docker restart jackett 19 | fi 20 | fi 21 | if [ "$mylar" = "true" ]; then 22 | url="$(grep http_root $seedboxFiles/config/mylar/mylar/config.ini)" 23 | if [ "$url" != "http_root = /mylar" ]; then 24 | sed -i 's|'"$url"'|http_root = /mylar|g' $seedboxFiles/config/mylar/mylar/config.ini 25 | docker restart autodl-comics_mylar 26 | fi 27 | fi 28 | if [ "$radarr" = "true" ]; then 29 | url="$(grep UrlBase $seedboxFiles/config/radar/config.xml)" 30 | if [ "$url" != " /radarr" ]; then 31 | sed -i 's|'"$url"'| /radarr|g' $seedboxFiles/config/radar/config.xml 32 | docker restart autodl-movies_radarr 33 | fi 34 | fi 35 | if [ "$ubooquity" = "true" ]; then 36 | url="$(grep reverseProxyPrefix $seedboxFiles/config/ubooquity/preference.xml)" 37 | if [ "$url" != " ubooquity" ]; then 38 | sed -i 's|'"$url"'| ubooquity|g' $seedboxFiles/config/ubooquity/preference.xml 39 | docker restart stream-comics_ubooquity 40 | fi 41 | fi 42 | 43 | restartSick="false" 44 | CustomProviders="false" 45 | if [[ "$couchpotato" = "true" && "$CustomProviders" = "true" ]]; then 46 | echo "downloading customn plugins for couchpotato" 47 | git clone --depth=1 https://github.com/djoole/couchpotato.provider.t411.git $tmpFolder/frenchproviders 48 | git clone --depth=1 https://github.com/TimmyOtool/torrent9 $tmpFolder/torrent9 49 | git clone --depth=1 https://github.com/TimmyOtool/namer_check $tmpFolder/namer_check 50 | fi 51 | while IFS='' read -r line || [[ -n "$line" ]]; do 52 | #echo "Text read from file: $line" 53 | IFS=':' read -r userName string <<< "$line" 54 | if [ "$couchpotato" = "true" ]; then 55 | if [ "$CustomProviders" = "true" ]; then 56 | docker cp $tmpFolder/namer_check/namer_check.py seedboxdocker_couchpotato_$userName:/opt/couchpotato/couchpotato/core/helpers/namer_check.py 57 | addCustomProviders $userName 58 | fi 59 | url="$(grep url_base $seedboxFiles/config/couchpotato_$userName/settings.conf)" 60 | if [ "$url" != "url_base = /couchpotato" ]; then 61 | sed -i 's|'"$url"'|url_base = /couchpotato|g' $seedboxFiles/config/couchpotato_$userName/settings.conf 62 | fi 63 | if [[ "$CustomProviders" = "true" || "$url" != "url_base = /couchpotato" ]]; then 64 | echo "restarting $userName's couchpotato" 65 | docker restart seedboxdocker_couchpotato_$userName 66 | fi 67 | fi 68 | if [ "$sickrage" = "true" ]; then 69 | url="$(grep web_root $seedboxFiles/config/sickrage/sickrage/$userName/config.ini)" 70 | if [ "$url" != 'web_root = "/sickrage"' ]; then 71 | docker stop seedboxdocker_sickrage 72 | restartSick="true" 73 | sed -i 's|'"$url"'|web_root = "/sickrage"|g' $seedboxFiles/config/sickrage/sickrage/$userName/config.ini 74 | fi 75 | fi 76 | done < "$users" 77 | if [[ "$couchpotato" = "true" && "$CustomProviders" = "true" ]]; then 78 | rm -rf $tmpFolder/frenchproviders 79 | rm -rf $tmpFolder/torrent9 80 | rm -rf $tmpFolder/namer_check 81 | fi 82 | if [ "$restartSick" = "true" ]; then 83 | echo "restarting sickrage" 84 | docker start seedboxdocker_sickrage 85 | fi 86 | if [ "$muximux" = "true" ]; then 87 | if [ ! -f "$seedboxFiles/config/muximux/www/muximux/settings.ini.php" ]; then 88 | docker stop seedboxdocker_muximux_1 89 | generateMuximuxConf 90 | #cp -f $seedboxFiles/config/muximux/www/muximux/settings.ini.php $seedboxFiles/config/muximux/www/muximux/settings.ini.php.back 91 | cp $tmpFolder/muximux_settings.ini.php $seedboxFiles/config/muximux/www/muximux/settings.ini.php 92 | chmod 777 $seedboxFiles/config/muximux/www/muximux/settings.ini.php 93 | echo "restarting muximux" 94 | docker start seedboxdocker_muximux_1 95 | fi 96 | 97 | fi 98 | 99 | -------------------------------------------------------------------------------- /include/updateContainers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -d "$1" ]; then 4 | echo "[ERROR] Expecting docker-compose.yml location, not: $1 " 5 | exit -1 6 | fi 7 | 8 | 9 | echo "cronjob running at "$(date) 10 | 11 | 12 | cd $1 13 | 14 | # Update all images: 15 | docker-compose pull 16 | # Let compose update all containers as necessary 17 | docker-compose up -d 18 | 19 | # WARNING! This will remove all dangling images. 20 | docker image prune -f 21 | --------------------------------------------------------------------------------