tom472 / mediabox

Container based media tools configuration
MIT License
428 stars 83 forks source link

error on install. several containers not loading #72

Closed Dodgexander closed 5 years ago

Dodgexander commented 5 years ago

Hey thanks for making this project, its brilliant!

First of all received this problem: https://github.com/tom472/mediabox/issues/71 where the script just gets stuck indefinitely.

Rebooted, didn't help.

Tested again after another reboot, this time filing in all options rather than leaving some blank and it worked. I think the problem is caused if you do not enter an option for some of the questions in the script.

But sadly the script still didn't work for me, at the end I received this error: sed: /usr/bin/healthcheck.sh: No such file or directory chmod: cannot access 'content/': No such file or directory Setup Complete - Open a browser and go to:

And I tried launching different apps within mediabox like plex and jellyfin and they don't open.

My .env: LOCALUSER=tim HOSTNAME=basement IP_ADDRESS=192.168.50.149 PUID=1000 PGID=1000 DOCKERGRP=999 PWD=/home/tim/mediabox DLDIR=/mnt/data/downloads TVDIR=/mnt/data/media/tv MOVIEDIR=/mnt/data/media/movies MUSICDIR=/mnt/data/media/music PIAUNAME=tim PIAPASS=fake CIDR_ADDRESS=192.168.50.0/24 TZ=Etc/UTC PMSTAG=public PMSTOKEN= PORTAINERSTYLE=--no-auth VPN_REMOTE=ca.privateinternetaccess.com CPDAEMONUN= CPDAEMONPASS=tim NZBGETUN= NZBGETPASS=tim

Heres docker status: tim@basement:~/mediabox$ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2f5e361302a2 binhex/arch-delugevpn "/usr/bin/tini -- /b…" About an hour ago Up 11 minutes 192.168.50.149:8112->8112/tcp, 192.168.50.149:8118->8118/tcp, 192.168.50.149:58846->58846/tcp, 192.168.50.149:58946->58946/tcp, 58946/udp delugevpn 10280e20c0d3 tautulli/tautulli "/init" 4 hours ago Up 12 minutes (healthy) 192.168.50.149:8181->8181/tcp tautulli d36ec814d775 linuxserver/couchpotato "/init" 4 hours ago Up 12 minutes 192.168.50.149:5050->5050/tcp couchpotato 02b6f9ea174f jellyfin/jellyfin "/bin/sh -c 'dotnet …" 4 hours ago Restarting (134) 37 seconds ago jellyfin d27016aa50e7 linuxserver/sonarr "/init" 4 hours ago Up 11 minutes 192.168.50.149:8989->8989/tcp sonarr 8d1eb9d3bf05 linuxserver/radarr "/init" 4 hours ago Up 11 minutes 192.168.50.149:7878->7878/tcp radarr 22a639e847c7 pyouroboros/ouroboros "ouroboros" 4 hours ago Up 11 minutes ouroboros 208f62538e84 minio/minio "/usr/bin/docker-ent…" 4 hours ago Up 12 minutes (healthy) 192.168.50.149:9009->9000/tcp minio 26d0c7410ef0 linuxserver/ombi "/init" 4 hours ago Up 12 minutes 192.168.50.149:3579->3579/tcp ombi 7e4bee639cb6 linuxserver/muximux "/init" 4 hours ago Up 12 minutes 192.168.50.149:80->80/tcp, 443/tcp muximux 696bb193d45d linuxserver/lidarr "/init" 4 hours ago Up 11 minutes 192.168.50.149:8686->8686/tcp lidarr 9d31571ef2f9 linuxserver/duplicati "/init" 4 hours ago Up 11 minutes 192.168.50.149:8200->8200/tcp duplicati b907a08970e9 plexinc/pms-docker:public "/init" 4 hours ago Up 12 minutes (unhealthy) plex b523d4e80c44 linuxserver/nzbget "/init" 4 hours ago Up 12 minutes 192.168.50.149:6789->6789/tcp nzbget 478adadee6bb netdata/netdata:latest "/usr/sbin/run.sh" 4 hours ago Up 12 minutes 192.168.50.149:19999->19999/tcp netdata 630d32be0303 linuxserver/sickrage "/init" 4 hours ago Up 11 minutes 192.168.50.149:8081->8081/tcp sickchill fcf80e2a17e4 linuxserver/headphones "/init" 4 hours ago Up 11 minutes 192.168.50.149:8282->8181/tcp headphones 689949714d02 linuxserver/jackett "/init" 4 hours ago Up 12 minutes 192.168.50.149:9117->9117/tcp jackett 5377dbd688de portainer/portainer:latest "/portainer --no-aut…" 4 hours ago Up 12 minutes 192.168.50.149:9000->9000/tcp portainer

Any advice how I can get things up and running?

Dodgexander commented 5 years ago

Here's the Plex and jellyfin logs: http://paste.ubuntu.com/p/53VCYM3vfN/ http://paste.ubuntu.com/p/cWwXsCBxBb/

And repeated now: Starting Plex Media Server. terminate called after throwing an instance of 'std::runtime_error' what(): Codecs: Initialize: 'boost::filesystem::create_directories: Permission denied: "/config/Library/Application Support/Plex Media Server/Codecs"' ** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.15.4.993-bb4a2cb6c/PLEX MEDIA SERVER/55fa22c2-cf75-aa9d-06f0a74b-4ed5bfab.dmp Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign Crash Uploader options (all are required): --directory arg Directory to scan for crash reports --serverUuid arg UUID of the server that crashed --userId arg User that owns this product --platform arg Platform string --platformVersion arg Platform version string --vendor arg Vendor string --device arg Device string --model arg Device model string --sentryUrl arg Sentry URL to upload to --sentryKey arg Sentry Key for the project --version arg Version of the product

tom472 commented 5 years ago

@Dodgexander Sorry you're having issues. Do you recall which questions you might have left blank? I'd like to look into that.

I'm looking at the healthcheck error right now - looks like Minio might have adjusted their image a bit.

For the rest of the issues - It might be worth starting everything over from scratch.

Are you running any other containers on your box besides the Mediabox containers?

tom472 commented 5 years ago

OK I found there was a change to the Minio healthcheck and the sed line I was applying is no longer needed, so that error is now fixed and committed.

Let me know if you want to try starting from scratch -- and we'll see if we can get you going.

And thanks for the nice comment and playing with Mediabox, we'll get you up and running.

Dodgexander commented 5 years ago

@tom472 wow what a fast reply. Thanks for getting back to me so quickly.

I have done as you said, started from fresh.

Here's what I answered. The plex release question I left blank, no idea why pu^C is showing there:

tim@basement:~/mediabox$ ./mediabox.sh What is your PIA Username?: tim What is your PIA Password? (Will not be echoed):

Which PLEX release do you want to run? By default 'public' will be used. (latest, public, plexpass): pu^C tim@basement:~/mediabox$ ./mediabox.sh What is your PIA Username?: What is your PIA Password? (Will not be echoed):

Which PLEX release do you want to run? By default 'public' will be used. (latest, public, plexpass): If you have PLEXPASS what is your Claim Token from https://www.plex.tv/claim/ (Optional): Which style of Portainer do you want to use? By default 'No Auth' will be used. (noauth, auth):

If you already have TV - Movie - Music directories you want to use you can enter them next. If you want Mediabox to generate it's own directories just press enter to these questions.

Where do you store your DOWNLOADS? (Please use full path - /path/to/downloads ): /mnt/data/downloads Where do you store your TV media? (Please use full path - /path/to/tv ): /mnt/data/media/tv Where do you store your MOVIE media? (Please use full path - /path/to/movies ): /mnt/data/media/movies Where do you store your MUSIC media? (Please use full path - /path/to/music ): /mnt/data/media/music The following PIA Servers are avialable that support port-forwarding (for DelugeVPN); Please select one: 1) ovpn/CA_Montreal.ovpn 7) ovpn/Israel.ovpn 2) ovpn/CA_Toronto.ovpn 8) ovpn/Netherlands.ovpn 3) ovpn/CA_Vancouver.ovpn 9) ovpn/Romania.ovpn 4) ovpn/Czech Republic.ovpn 10) ovpn/Spain.ovpn 5) ovpn/France.ovpn 11) ovpn/Sweden.ovpn 6) ovpn/Germany.ovpn 12) ovpn/Switzerland.ovpn Use a number to select a Server File or 'c' to cancel: c Creating the .env file with the values we have gathered

.env file creation complete

The containers will now be pulled and launched This may take a while depending on your download speed Press any key to continue...

Pulling couchpotato (linuxserver/couchpotato:)... latest: Pulling from linuxserver/couchpotato 12dd0566ca20: Pull complete 19fd419d4f80: Pull complete a098696dcd16: Pull complete b09c50f1e7e6: Pull complete cf82f5ac3d3e: Pull complete d1ce5f688ef6: Pull complete Pulling arch-delugevpn (binhex/arch-delugevpn:)... latest: Pulling from binhex/arch-delugevpn 3b4c5248da92: Pull complete 684482506bb1: Pull complete 039d9be946ba: Pull complete f0784c3ceec3: Pull complete be2ac6bab66e: Pull complete bf1d685df641: Pull complete ddddbefb8bc0: Pull complete c129ead45f98: Pull complete 5b190b0f8bab: Pull complete d9a9d0fd5237: Pull complete 26b2c32d1d30: Pull complete 19941226d18e: Pull complete af743dfc3838: Pull complete bda14b7ecb56: Pull complete 2601fe615ec6: Pull complete ee403fc99672: Pull complete Pulling duplicati (linuxserver/duplicati:)... latest: Pulling from linuxserver/duplicati 189ea8f9ac3c: Pull complete 5f023c92132b: Pull complete da02b3f258e2: Pull complete b4054006e35c: Pull complete 279191dec728: Pull complete 3280d9f543c8: Pull complete 187917f59d48: Pull complete Pulling headphones (linuxserver/headphones:)... latest: Pulling from linuxserver/headphones 12dd0566ca20: Already exists 19fd419d4f80: Already exists a098696dcd16: Already exists b09c50f1e7e6: Already exists 6c1063d144ed: Pull complete 9cafd1d18b40: Pull complete 33607343a201: Pull complete Pulling jackett (linuxserver/jackett:)... latest: Pulling from linuxserver/jackett 1a236f381b0e: Pull complete 6249574af51f: Pull complete 27e78648239c: Pull complete 32aa88e3227c: Pull complete 585476952505: Pull complete 2829d818c9ac: Pull complete Pulling jellyfin (jellyfin/jellyfin:)... latest: Pulling from jellyfin/jellyfin 27833a3ba0a5: Pull complete e425c8f949e7: Pull complete 2198a2fb121b: Pull complete b6225f2655ca: Pull complete f0d2e73e2324: Pull complete 3a4a0d6b4b13: Pull complete de5f954e2589: Pull complete d67d515c2dd8: Pull complete Pulling lidarr (linuxserver/lidarr:)... latest: Pulling from linuxserver/lidarr ad87064e32c7: Pull complete 3c3326c59212: Pull complete 2f9e17886cc4: Pull complete b3a26a5a6770: Pull complete 5bf224880856: Pull complete 3bdd40d28064: Pull complete 8db49df60cc6: Pull complete Pulling minio (minio/minio:)... latest: Pulling from minio/minio bdf0201b3a05: Pull complete f4a4d288fa0d: Pull complete f3263dd22803: Pull complete 4b99bcf14cf5: Pull complete Pulling muximux (linuxserver/muximux:)... latest: Pulling from linuxserver/muximux 12dd0566ca20: Already exists 19fd419d4f80: Already exists a098696dcd16: Already exists ac006cfca0a9: Pull complete 7c95b1508c42: Pull complete cc74b6f88402: Pull complete e8102334a5c0: Pull complete Pulling netdata (netdata/netdata:latest)... latest: Pulling from netdata/netdata 51d9ddff5cfa: Pull complete 7ed3e13ee387: Pull complete 1575d2bbd290: Pull complete 91c31518a492: Pull complete 7a6780ab3cf1: Pull complete 6da8812a8bf4: Pull complete Pulling nzbget (linuxserver/nzbget:)... latest: Pulling from linuxserver/nzbget 12dd0566ca20: Already exists 19fd419d4f80: Already exists a098696dcd16: Already exists f57e379abbdb: Pull complete b2f2599fed05: Pull complete 000ec6afefd1: Pull complete Pulling ombi (linuxserver/ombi:)... latest: Pulling from linuxserver/ombi 1a236f381b0e: Already exists 6249574af51f: Already exists 27e78648239c: Already exists 32aa88e3227c: Already exists fcef6f7db68c: Pull complete 9cfa880dd7f9: Pull complete Pulling ouroboros (pyouroboros/ouroboros:)... latest: Pulling from pyouroboros/ouroboros 8e402f1a9c57: Pull complete cda9ba2397ef: Pull complete d7153c29df0e: Pull complete cbbf0d0a5ee3: Pull complete c142a4eca653: Pull complete 8f11de5f5c4c: Pull complete 58ffe92fcc05: Pull complete a0b438d179a0: Pull complete b4495c19f989: Pull complete b8e30541803f: Pull complete Pulling plex (plexinc/pms-docker:public)... public: Pulling from plexinc/pms-docker b849b56b69e7: Pull complete 42986ef25bcd: Pull complete d927c1b717ec: Pull complete 15b86ea20233: Pull complete f39465de3b1a: Pull complete dec716eaf178: Pull complete 541df01f80ce: Pull complete Pulling portainer (portainer/portainer:latest)... latest: Pulling from portainer/portainer d1e017099d17: Pull complete 0b1e707a06d2: Pull complete Pulling radarr (linuxserver/radarr:)... latest: Pulling from linuxserver/radarr 189ea8f9ac3c: Already exists 5f023c92132b: Already exists da02b3f258e2: Already exists b4054006e35c: Already exists 279191dec728: Already exists c5f070a4208d: Pull complete d354f3e41ee7: Pull complete Pulling sickchill (linuxserver/sickrage:)... latest: Pulling from linuxserver/sickrage 3e55140eeb7b: Pull complete 8bcf33c741af: Pull complete a620f040d1c8: Pull complete 3939549c273e: Pull complete 38c815557c48: Pull complete 8faebec541a2: Pull complete Pulling sonarr (linuxserver/sonarr:)... latest: Pulling from linuxserver/sonarr 189ea8f9ac3c: Already exists 5f023c92132b: Already exists da02b3f258e2: Already exists b4054006e35c: Already exists 9811c07b03de: Pull complete 1d38c5710184: Pull complete 7c4413557377: Pull complete Pulling tautulli (tautulli/tautulli:)... latest: Pulling from tautulli/tautulli bdf0201b3a05: Already exists 9d3de21fbe23: Pull complete 94f0a09d9fcc: Pull complete Creating couchpotato ... done Creating portainer ... done Creating jackett ... done Creating sickchill ... done Creating headphones ... done Creating nzbget ... done Creating duplicati ... done Creating netdata ... done Creating minio ... done Creating lidarr ... done Creating jellyfin ... done Creating ombi ... Creating delugevpn ... Creating ouroboros ... Creating muximux ... Creating plex ... done Creating sonarr ... Creating radarr ... Creating tautulli ...

ERROR: for ombi UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for ouroboros UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for radarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for muximux UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for delugevpn UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for sonarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tautulli UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for ombi UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for ouroboros UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for radarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for muximux UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for arch-delugevpn UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for sonarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for tautulli UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60) ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

You need to set a username and password for programs to access The Deluge daemon and NZBGet's API and web interface. What would you like to use as the access username?: tim What would you like to use as the access password?: xxxxxx

Configuring DelugeVPN, NZBGet, Muximux, and Permissions This may take a few minutes...


Its at this point its hanging and there is a lot of process activity still even when I cancelled the script: top usage

Dodgexander commented 5 years ago

I cleaned up mediabox and tried again and the script failed and stopped at the end:

tim@basement:~$ cd mediabox tim@basement:~/mediabox$ ./mediabox.sh What is your PIA Username?: tim What is your PIA Password? (Will not be echoed):

Which PLEX release do you want to run? By default 'public' will be used. (latest, public, plexpass): public If you have PLEXPASS what is your Claim Token from https://www.plex.tv/claim/ (Optional): Which style of Portainer do you want to use? By default 'No Auth' will be used. (noauth, auth):

If you already have TV - Movie - Music directories you want to use you can enter them next. If you want Mediabox to generate it's own directories just press enter to these questions.

Where do you store your DOWNLOADS? (Please use full path - /path/to/downloads ): /mnt/data/downloads Where do you store your TV media? (Please use full path - /path/to/tv ): /mnt/data/media/tv Where do you store your MOVIE media? (Please use full path - /path/to/movies ): /mnt/data/media/movies Where do you store your MUSIC media? (Please use full path - /path/to/music ): /mnt/data/media/music mkdir: cannot create directory ‘couchpotato’: Permission denied mkdir: cannot create directory ‘duplicati’: Permission denied mkdir: cannot create directory ‘duplicati’: Permission denied mkdir: cannot create directory ‘headphones’: Permission denied mkdir: cannot create directory ‘historical’: Permission denied mkdir: cannot create directory ‘jackett’: Permission denied mkdir: cannot create directory ‘lidarr’: Permission denied mkdir: cannot create directory ‘muximux’: Permission denied mkdir: cannot create directory ‘nzbget’: Permission denied mkdir: cannot create directory ‘ombi’: Permission denied mkdir: cannot create directory ‘plex’: Permission denied mkdir: cannot create directory ‘portainer’: Permission denied mkdir: cannot create directory ‘radarr’: Permission denied mkdir: cannot create directory ‘sickchill’: Permission denied mkdir: cannot create directory ‘sonarr’: Permission denied mkdir: cannot create directory ‘tautulli’: Permission denied The following PIA Servers are avialable that support port-forwarding (for DelugeVPN); Please select one: 1) ovpn/CA_Montreal.ovpn 7) ovpn/Israel.ovpn 2) ovpn/CA_Toronto.ovpn 8) ovpn/Netherlands.ovpn 3) ovpn/CA_Vancouver.ovpn 9) ovpn/Romania.ovpn 4) ovpn/Czech Republic.ovpn 10) ovpn/Spain.ovpn 5) ovpn/France.ovpn 11) ovpn/Sweden.ovpn 6) ovpn/Germany.ovpn 12) ovpn/Switzerland.ovpn Use a number to select a Server File or 'c' to cancel: 1 ovpn/CA_Montreal.ovpn selected Creating the .env file with the values we have gathered

./mediabox.sh: line 193: .env: Permission denied ./mediabox.sh: line 224: .env: Permission denied .env file creation complete

Strange how I didn't get this before but my guess is my issue is a permission one? What permissions do I need to set?

Heres my permissions in my media folders:

drwxrwxr-x 5 tim tim 5 Apr 30 23:13 downloads drwxr-xr-x 5 root root 5 Apr 30 22:05 media tim@basement:/mnt/data$ ls -l /mnt/ total 1 drwxr-xr-x 4 root root 4 Apr 30 22:05 data

My guess is the reasons its failing is because the folder structure for media locations have to already be created by my user before I run the script?

Dodgexander commented 5 years ago

Okay further investigation:

I chown -R /mnt/data to my $USER & $GROUP I chmod -R /mnt/data to 755 to test.

Ran script again, much like with the first, left most options blank:

tim@basement:~/mediabox$ ls docker-compose.yml License.txt mediaboxconfig.php mediabox.sh ovpn README.md settings.ini.php tim@basement:~/mediabox$ ./mediabox.sh What is your PIA Username?: What is your PIA Password? (Will not be echoed):

Which PLEX release do you want to run? By default 'public' will be used. (latest, public, plexpass): If you have PLEXPASS what is your Claim Token from https://www.plex.tv/claim/ (Optional): Which style of Portainer do you want to use? By default 'No Auth' will be used. (noauth, auth):

If you already have TV - Movie - Music directories you want to use you can enter them next. If you want Mediabox to generate it's own directories just press enter to these questions.

Where do you store your DOWNLOADS? (Please use full path - /path/to/downloads ): /mnt/data/downloads Where do you store your TV media? (Please use full path - /path/to/tv ): /mnt/data/media/tv Where do you store your MOVIE media? (Please use full path - /path/to/movies ): /mnt/data/media/movies Where do you store your MUSIC media? (Please use full path - /path/to/music ): /mnt/data/media/music The following PIA Servers are avialable that support port-forwarding (for DelugeVPN); Please select one: 1) ovpn/CA_Montreal.ovpn 7) ovpn/Israel.ovpn 2) ovpn/CA_Toronto.ovpn 8) ovpn/Netherlands.ovpn 3) ovpn/CA_Vancouver.ovpn 9) ovpn/Romania.ovpn 4) ovpn/Czech Republic.ovpn 10) ovpn/Spain.ovpn 5) ovpn/France.ovpn 11) ovpn/Sweden.ovpn 6) ovpn/Germany.ovpn 12) ovpn/Switzerland.ovpn Use a number to select a Server File or 'c' to cancel: 1) ovpn/CA_Montreal.ovpn 7) ovpn/Israel.ovpn 2) ovpn/CA_Toronto.ovpn 8) ovpn/Netherlands.ovpn 3) ovpn/CA_Vancouver.ovpn 9) ovpn/Romania.ovpn 4) ovpn/Czech Republic.ovpn 10) ovpn/Spain.ovpn 5) ovpn/France.ovpn 11) ovpn/Sweden.ovpn 6) ovpn/Germany.ovpn 12) ovpn/Switzerland.ovpn Use a number to select a Server File or 'c' to cancel: c Creating the .env file with the values we have gathered

.env file creation complete

The containers will now be pulled and launched This may take a while depending on your download speed Press any key to continue...

jackett is up-to-date portainer is up-to-date couchpotato is up-to-date headphones is up-to-date sickchill is up-to-date nzbget is up-to-date duplicati is up-to-date netdata is up-to-date minio is up-to-date lidarr is up-to-date Starting jellyfin ... ombi is up-to-date delugevpn is up-to-date muximux is up-to-date ouroboros is up-to-date plex is up-to-date sonarr is up-to-date radarr is up-to-date Starting jellyfin ... done

You need to set a username and password for programs to access The Deluge daemon and NZBGet's API and web interface. What would you like to use as the access username?: tim What would you like to use as the access password?: xxxxxx

Configuring DelugeVPN, NZBGet, Muximux, and Permissions This may take a few minutes...


Of course its stuck again. Going to reboot and try again but this time enter info instead.

For the record I don't have a PIA account, in case that is an issue? I also don't have plex-pass so I leave the answer to that blank.

Dodgexander commented 5 years ago

It got stuck again, this when I did answer questions https://pastebin.com/MjrdRcSq

It also failed making a deluge permission. I don't get it because in my .env file my PUID and PGID are correct:

LOCALUSER=tim HOSTNAME=basement IP_ADDRESS=192.168.50.149 PUID=1000 PGID=1000 DOCKERGRP=999 PWD=xxxx DLDIR=/mnt/data/downloads TVDIR=/mnt/data/media/tv MOVIEDIR=/mnt/data/media/movies MUSICDIR=/mnt/data/nedia/music PIAUNAME=tim PIAPASS=lookatme CIDR_ADDRESS=192.168.50.0/24 TZ=Etc/UTC PMSTAG=public PMSTOKEN= PORTAINERSTYLE=--no-auth VPN_REMOTE=ca.privateinternetaccess.com

This is all on Ubuntu Server 18.04 LTS.

tom472 commented 5 years ago

So yes you have noticed a few things - The directories that you are using for the data need to be owned by your account. There are some questions that can be left blank and "defaults" will be selected for them.

But Sorry - Yes you have to have a PIA account. Mediabox is built around the use of PIA as the VPN service in place. (I hope to be configuring it for more VPNs soon.)

So the script is getting stuck for you because the next step after:

Configuring DelugeVPN, NZBGet, Muximux, and Permissions This may take a few minutes...

Deals with configuring parts of the Deluge Container which is likely not getting to full/expected completion for you because there is no PIA active.

From: mediabox.sh at this line

# Configure DelugeVPN: Set Daemon access on, delete the core.conf~ file The line below is likely the issue: This is a sleep loop until a conf file gets created inside the Deluge container while [ ! -f delugevpn/config/core.conf ]; do sleep 1; done docker stop delugevpn > /dev/null 2>&1 rm delugevpn/config/core.conf~ > /dev/null 2>&1

If you are interested - I can see if I can get you some type of coupon/code etc. for PIA if that helps. They do have (I believe) a monthly plan if you wanted to buy one month and see if Mediabox fits your needs.

Or, is there a VPN provider that you are already using? If yes I can try and see if I can get Mediabox configured for that service. Let me know.

Dodgexander commented 5 years ago

thanks Tom and sorry if I have been wasting your time.

Does port forwarding work with your setup and PIA? I mean port forwarding to the torrent client, not between container/host.

I have be deliberating over a VPN for some time but I think I might give PIA a try, if you do have a coupon I'd love it!

I've used PIA in the past but they don't have geo-unblocking which is a bit of a negative to me.

If I get another provider later on, is it possible to ignore/replace that part of the script and just edit the docker-compose.yml file to include another VPN? I saw in the example you mentioned in the readme here: https://github.com/binhex/arch-delugevpn

tom472 commented 5 years ago

No problem - not a waste of time at all.

Yes there is port-forwarding available for Deluge - that is why there are only 12 PIA endpoints to select from when the script get to this line.

The following PIA Servers are available that support port-forwarding (for DelugeVPN); Please select one:

I will see if I can get something from PIA - not sure if I will but I'll take a shot. And yes if you would like to use a different VPN provider - try and run it by here first and I'll see if we can get that configured.

Dodgexander commented 5 years ago

Hi Tom. I decided to sign up with purevpn, they offer the geo-unblocking I need together with port forwarding.

How can I get this all setup with mediabox?

tom472 commented 5 years ago

Incorporating PureVPN into Mediabox might be hard to do. It looks like there is only one Docker Container out there currently that has support for PureVPN, and that container has Transmission as the torrent client.

This would take a while to get worked into Mediabox.

Let me give it an initial shot and see how involved it becomes. I'll touch base back here this weekend.

Dodgexander commented 5 years ago

Incorporating PureVPN into Mediabox might be hard to do. It looks like there is only one Docker Container out there currently that has support for PureVPN, and that container has Transmission as the torrent client.

This would take a while to get worked into Mediabox.

Let me give it an initial shot and see how involved it becomes. I'll touch base back here this weekend.

thanks, it would be great to have it working.

Is it not possible to adapt it to work with https://github.com/binhex/arch-delugevpn as you mentioned in the readme?

They have .opvn config files just the same as other providers.

https://support.purevpn.com/openvpn-files

I guess I'll give it a shot to test.

Dodgexander commented 5 years ago

@tom472

I got it working with this config using https://github.com/binhex/arch-delugevpn

http://paste.ubuntu.com/p/mQ39mkGp9N/

Just need to convert it to docker-compose.yml format.

Do you think there could be a way you could implement the option for a custom VPN? The only thing that changes from using PIA is:

-e VPN_USER=xxxxxx \
-e VPN_PASS=xxxxxx \
-e VPN_PROV=purevpn \

And also specifying your custom port which is the 4th port in this list: -p 8112:8112 \ -p 8118:8118 \ -p 78678:78678\ -p 99999:99999\

Failing that, a possible way to bypass and edit the docker-compose.yml manually afterwards so the script still succeeds without VPN details.

tom472 commented 5 years ago

Awesome - thanks for giving it some testing - and coming back with the details.

OK - so you didn't have to create any custom OpenVPN files?

However it looks like the last 2 port mappings are different: The PIA config has: -p 8112:8112 -p 8118:8118 -p 58846:58846 -p 58946:58946

You're config has: -p 8112:8112 -p 8118:8118 -p 78678:78678 -p 99999:99999 Both 78678 and 99999 are different from PIA. (Not necessarily a deal-breaker just clarifying the differences.)

Just confirm for me again that both: 78678 and 99999/ the user specified custom port are needed and with that as the configuration Deluge works as expected.

If that config works - then there is a pretty good chance I can get this added right into Mediabox. And if I were to be unable to get worked directly into Mediabox proper, I'd likely be able to make you/others a separate branch for use with PureVPN.

I am busy the next two days but already have time set aside for some Mediabox work on Saturday - so hang tight.

Thanks again

Dodgexander commented 5 years ago

OK - so you didn't have to create any custom OpenVPN files?

I had some trouble using them because they had been signing them with out of date certificates using md5 but after contact with their support they provided updated ones. Then I just placed the .ovpn file that included them into my config/openvpn directory.

Just confirm for me again that both: 78678 and 99999/ the user specified custom port are needed and with that as the configuration Deluge works as expected.

These were different ports I altered myself, the default port that is used in bithex's script is indeed different. You probably already know but the ports in his script are in this order:

line 1 ports = webui port for deluge line 2 ports = webui port for privoxy line 3 ports = port deluge uses if no VPN line 4 ports = port used in deluge for the magic "forwarding".

PIA are different in the sense they change ports every so often which makes it harder to work (bithex's script does all the magic in the background) but with other providers with static port forwarding like purevpn it should just be a case of placing your .ovpn file in the correct place together with not specifying provider as PIA in the script together with the usual username and pass. I could have just used the default port in the script as my port forward with purevpn but I chose a different one for security. The line 1-3 ports really can stay the same no matter what and you can always direct people choose on their VPN side to opt to forward that default port if you want, but its less secure.

If that config works - then there is a pretty good chance I can get this added right into Mediabox. And if I were to be unable to get worked directly into Mediabox proper, I'd likely be able to make you/others a separate branch for use with PureVPN.

that would be fantastic, I have been trying to Frankensteining it myself by commenting out the line where the script gets stuck and altering the docker-compose.yml your script generates. I was having big issues with the docker-compose.yml not working though with errors like this:

ERROR: for sickchill UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

My machine is quite old though, I think its a performance problem when composing so many containers at once.

I am busy the next two days but already have time set aside for some Mediabox work on Saturday - so hang tight.

Thanks again

No, thank you! I have no idea what I'm doing. If there is a way for you to work your magic and integrate it into the script then it should be possible for any provider to use mediabox.

In an ideal world mediabox would be able to cope with the following:

This should be all thats provided, the openvpn client will deal with certificates itself, if there is a problem with that side its purely an OPENVPN issue.

Dodgexander commented 5 years ago

I managed to get mediabox working with deluge just by copying my custom compose section into your dokcer-compose.yml.

I can't compose it anymore though due to a bunch of errors. Some containers won't start:

ERROR: for nzbget UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for lidarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60) Creating mediabox_deluge-openvpn_1 ... done ERROR: for sickchill UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for portainer UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for sonarr UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for jackett UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for duplicati UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for couchpotato UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

EDIT# I passed the command to increase the timeout and its now working fine.

tom472 commented 5 years ago

OK 2 things -- Is there a link / site where I can get the correct OVPN file(s) that their support pointed you to?

And when you say:

Then I just placed the .ovpn file that included them into my config/openvpn directory.

You are referring to the delugevpn/config/openvpn/ directory right? i.e. the same location I'm dropping the PIA OVPN file to.

Dodgexander commented 5 years ago

Is there a link / site where I can get the correct OVPN file(s) that their support pointed you to?

They have out of date files in their support articles that are signed with certificates that are no longer accepted by Openvpn. I have obtained a .ovpn file from their support which I can edit to connect to several different servers and I also received a working certificate and key that I should be able to place in the same directory as all of their servers but I am currently testing which server is best for me.

You are referring to the delugevpn/config/openvpn/ directory right?

Yes, since that is the config directory you pointed to in the binhex portion of mediabox.sh. eg thats where you copy the chosen PIA opvn files too also.

Dodgexander commented 5 years ago

I'm trying to experiment with the different open VPN config files to see if I can get a working pattern. Then I can share them with you.

The only difference between the configs I have is the VPN server address but they have many other servers which still use the old config and don't work.. At least with my tests

tom472 commented 5 years ago

So I can't make this automatic without having the ovpn file(s) included. To add PureVPN into Mediabox proper I would need those file(s). If they are unavailable or the ones that are available don't work that really makes this much more difficult.

The main focus around Mediabox is that users just need to answer a few questions and everything works, the parts needed for configuration need to be available as part of the project, not something that users need to configure and/or place in a folder manually.

I'm starting to feel less hopeful about getting this added directly into Mediabox. However, if you can provide a config that does in fact work for you - I still might be able to create a set-up that will work for you.

--Tom

tom472 commented 5 years ago

This turned out to be more of a "Feature Request" to add support for PureVPN

However it appears that they do not provide readily available "good / working" OVPN files so unfortunately without them available - it is hard to get this added directly into Mediabox proper.

--Tom