binhex / arch-sabnzbdvpn

Docker build script for Arch Linux base with SABnzbd, Privoxy and OpenVPN
GNU General Public License v3.0
49 stars 9 forks source link

Container doesn’t start on Synology #10

Closed Patrick1610 closed 5 years ago

Patrick1610 commented 5 years ago

Hi, when I download the image through docker and try to start the container, it automatically switches the container back off. Am I missing something or do I have to use a specific setting? Regards Patrick

Patrick1610 commented 5 years ago

After further investigating the logs, I am thinking it has something to do with the fact that I have not yet added the OpenVPN files, could that be?

What should be the path to put them? The 'docker' shared folder is empty, but when I SSH into my Synology and get root acces, I can see there is stuf in /volume1/@docker/ but I can't find the correct folder in there..

binhex commented 5 years ago

I am thinking it has something to do with the fact that I have not yet added the OpenVPN files, could that be?

yes, and other settings too, see the 'Newbie VPN Guide' heading from the following link:- https://forums.unraid.net/topic/44108-support-binhex-general/

Patrick1610 commented 5 years ago

Thanks! Good to have that Q&A when setting this up! I may be the worst ever at this, but even after starting (and automatically stopping) the container, I still can't get to see the /config/openvpn/ folder on my NAS? Since that is Q1, I wouldn't know where to start..

Does it work the same on UnRaid as Synology?

binhex commented 5 years ago

i you are struggling even with the basics on synology then i would encourage you to do some reading up on how to use docker containers on synology platform before proceeding further, im not a synology user so i have no idea how docker is implemented on synology.

Patrick1610 commented 5 years ago

Well, I am not struggling with the basics of Synology and do have a fairly advanced setup, I just can't seem to find the files and folders the Docker container is using.

This package looks very promising and is exactly what I have been looking for for a while now ;) Too bad you can't help me out! I'll be looking at some other places to help me out getting this up and running..

binhex commented 5 years ago

sorry but without a knowledge of how synology has implemented docker i would literally be guessing, that folder will be there somewhere on your system, check what the host path is defined as for /config that would be where i would start.

Patrick1610 commented 5 years ago

No problem at all!! I understand u can't know every system Docker works on ;)

I seem to have figured the folder part out!! By just adding a 'Volume' in the Docker settings to the path /config/openvpn/ and pointing that to a Shared folder of my NAS where I put the OpenVPN file, it seemed to find the file on startup!

Now, with all the Environment variables added that I thought were needed, I still get an exciting error..

Patrick1610 commented 5 years ago

Is it okay if I sent you the logs of the Docker Container? Maybe you can see what is going wrong or what I am not seeing ;)

binhex commented 5 years ago

sure

Patrick1610 commented 5 years ago

Great! I have deleted the username/pass of the VPN provider, but they are correct in my real scenario ;)

binhex-arch-sabnzbdvpn1.csv.zip

binhex commented 5 years ago

can't initialize iptables tablefilter': Permission denied (you must be root)`

so this is one problem, looks like you arent running this with the correct flags, note the --cap-add option in the readme:-

https://github.com/binhex/arch-sabnzbdvpn/blob/master/README.md

Patrick1610 commented 5 years ago

Thanks for looking at the logs! 👍

Would you know where to put the --cap-add option? I only have the tabs:

binhex commented 5 years ago

None of those fit, this is an advanced option best asking on the Synology forum for this.

fryfrog commented 5 years ago

So there is a little Synology trick you can use... you can docker run from the CLI and it'll show up in their management UI.

So first, you get your existing docker run command...

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike YOUR-CONTAINER

Once you've used that as the base of your docker run and added the options you need, you stop/remove the old one, use the command you composed to run the new one and... bam, you're using options that Synology doesn't allow. I use this trick to steal port 80/443, but it should work for anything. Might even reveal what the option is called in their UI, if they're exposing it in a hard to understand way.

Source: https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container/32774347