From fbbc8992d904a80527fe26237a4a78d3adde603e Mon Sep 17 00:00:00 2001 From: Renan Date: Fri, 8 Apr 2016 14:35:38 +0200 Subject: [PATCH 1/2] Updated Readmy with synology instructions --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index d5451fa6c..21d6a3633 100644 --- a/README.md +++ b/README.md @@ -168,3 +168,44 @@ The container exposes /config as a volume. This is the directory where the suppl If you have transmission authentication enabled and want scripts in another container to access and control the transmission-daemon, this can be a handy way to access the credentials. For example, another container may pause or restrict transmission speeds while the server is streaming video. + +## Make it work an a Synology NAS +Here are the steps to run it on a Synology NAS (Tested on DSM 6) : + +- Connect as _admin_ to your Synology SSH +- Switch to root with command `sudo su -` +- Enter your _admin_ password when prompted +- Create a TUN.sh file anywhere in your synology file system by typing `vim /volume1/foldername/TUN.sh` +replacing _foldername_ with any folder you created on your Synology +- Paste @timkelty 's script : +``` +#!/bin/sh + +# Create the necessary file structure for /dev/net/tun +if ( [ ! -c /dev/net/tun ] ); then + if ( [ ! -d /dev/net ] ); then + mkdir -m 755 /dev/net + fi + mknod /dev/net/tun c 10 200 +fi + +# Load the tun module if not already loaded +if ( !(lsmod | grep -q "^tun\s") ); then + insmod /lib/modules/tun.ko +fi +``` +- Save the file with [escape] + `:wq!` +- Go in the folder containing your script : `cd /volume1/foldername/` +- Check permission with `chmod 0755 TUN.sh` +- Run it with `./TUN.sh` +- Create the DNS config file by typing `vim /volume1/foldername/resolv.conf` +- Paste the following lines : +``` +nameserver 8.8.8.8 +nameserver 8.8.4.4 +``` +- Save the file with [escape] + `:wq!` +- Create your docker container with `docker run --privileged -d -v /volume1/foldername/resolv.conf:/etc/resolv.conf -v /volume1/yourpath/:/data -e "OPENVPN_PROVIDER=PIA" -e "OPENVPN_CONFIG=Netherlands" -e "OPENVPN_USERNAME=XXXXX" -e "OPENVPN_PASSWORD=XXXXX" -p 9092:9091 haugene/transmission-openvpn -name TransmissionVPN` +- If you wish to access WebUI, just run the nginx container as explained in doc on ports 9091:9091 +- To make it work after a nas restart, create an automated task in your synology web interface : go to **Settings Panel > Task Scheduler ** create a new task that run `/volume1/foldername/TUN.sh` as root (select '_root_' in 'user' selectbox). This task will start module that permit the container to run, you can make a task that run on startup. These kind of task doesn't work on my nas so I just made a task that run every minute. +- Enjoy From ebed0717473ff7769758cbc1d7d7b747f0924034 Mon Sep 17 00:00:00 2001 From: Khogniak Date: Fri, 8 Apr 2016 17:02:42 +0200 Subject: [PATCH 2/2] corrected readme --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 21d6a3633..b734affdb 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ If you have transmission authentication enabled and want scripts in another cont control the transmission-daemon, this can be a handy way to access the credentials. For example, another container may pause or restrict transmission speeds while the server is streaming video. -## Make it work an a Synology NAS +## Make it work on Synology NAS Here are the steps to run it on a Synology NAS (Tested on DSM 6) : - Connect as _admin_ to your Synology SSH @@ -205,7 +205,6 @@ nameserver 8.8.8.8 nameserver 8.8.4.4 ``` - Save the file with [escape] + `:wq!` -- Create your docker container with `docker run --privileged -d -v /volume1/foldername/resolv.conf:/etc/resolv.conf -v /volume1/yourpath/:/data -e "OPENVPN_PROVIDER=PIA" -e "OPENVPN_CONFIG=Netherlands" -e "OPENVPN_USERNAME=XXXXX" -e "OPENVPN_PASSWORD=XXXXX" -p 9092:9091 haugene/transmission-openvpn -name TransmissionVPN` -- If you wish to access WebUI, just run the nginx container as explained in doc on ports 9091:9091 +- Create your docker container with a classic command like `docker run --privileged -d -v /volume1/foldername/resolv.conf:/etc/resolv.conf -v /volume1/yourpath/:/data -e "OPENVPN_PROVIDER=PIA" -e "OPENVPN_CONFIG=Netherlands" -e "OPENVPN_USERNAME=XXXXX" -e "OPENVPN_PASSWORD=XXXXX" -p 9091:9091 haugene/transmission-openvpn -name TransmissionVPN` - To make it work after a nas restart, create an automated task in your synology web interface : go to **Settings Panel > Task Scheduler ** create a new task that run `/volume1/foldername/TUN.sh` as root (select '_root_' in 'user' selectbox). This task will start module that permit the container to run, you can make a task that run on startup. These kind of task doesn't work on my nas so I just made a task that run every minute. - Enjoy