- Tranmission OpenVPN has a funny setup - requires a
TUN.sh
to be setup to enable the VPN tunnel - If ports become unmappable in the silly Docker UI on Synology, refer to this note about
/user/local/etc/services.d
files - https://forum.synology.com/enu/viewtopic.php?t=86531#p326803
Last active
February 28, 2019 21:56
-
-
Save Iristyle/0de6b9f7e8534366a28f2768eb94aa21 to your computer and use it in GitHub Desktop.
Migrating Emby from Diskstation package to Docker Container
- Getting Sonarr running - https://www.naschenweng.info/2016/11/04/synology-docker-sonarr/
- Getting Radarr running - https://drfrankenstein.co.uk/2017/03/28/setting-up-radarr-in-docker-on-a-synology-nas/
There are some docs in Emby about a couple of approaches at https://github.com/MediaBrowser/Wiki/wiki/Backup
However, you can also do things the hard way! (Some info at https://emby.media/community/index.php?/topic/60079-relocate-media-library-metadata/)
- Update the optional path in Emby itself from
\\serverfoo\path\to\files
to\\serverbar\path\to\files
to make sure native paths still work in Emby
Use a tool like SQLite Web container at https://hub.docker.com/r/coleifer/sqlite-web/ to mount library.db
and run a query like
UPDATE "TypedBaseItems"
SET Path = replace(Path, '/var/packages/EmbyServer/target/var', '/config')
WHERE Path is not null
AND PATH LIKE '%/var/packages/EmbyServer/target/var/%'
- Requires a TUN script to be setup (and run as a task every 5 minutes)
#!/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
chmod 0755 /dev/net/tun
fi
# Load the tun module if not already loaded
if ( !(lsmod | grep -q "^tun\s") ); then
insmod /lib/modules/tun.ko
fi
- Requires the
root@Molokai:/volume1/docker/transmissiondata# ./docker-run.sh
command to be run that consists of:
#!/bin/sh
docker run \
--cap-add=NET_ADMIN \
--device=/dev/net/tun \
-d \
-v /volume1/docker/transmissiondata/resolv.conf:/etc/resolv.conf \
-v /volume1/docker/transmissiondata/AirVPN_America_UDP-443.ovpn:/etc/openvpn/custom/default.ovpn \
-v /volume1/Media/Downloads/Transmission:/volume1/Media/Downloads/Transmission \
--env-file /volume1/docker/transmissiondata/DockerEnv \
-p 8888:8888 \
-p 9091:9091 \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--name "transmission-openvpn-syno" \
haugene/transmission-openvpn:latest
Keep in mind there is a DockerEnv
file at /volume1/docker/transmissiondata/DockerEnv
based on https://github.com/haugene/docker-transmission-openvpn/blob/master/DockerEnv
- create all relevant users (old packages use these scripts -> https://github.com/SynoCommunity/spksrc/blob/51979b1296561d40127db313873bfaf46bec200d/mk/spksrc.service.installer)
Enumerate with synouser --enum all
:
admin
calibre-web
embysvr
guest
jackett
kodi
lazylibrarian
nzbhydra
Parity
radarr
sabnzbd
sonarr
transmission
Create users
synouser --add "calibre-web" "" "Calibre Web" 0 "" 0
synouser --add "embysvr" "" "Emby Server" 0 "" 0
synouser --add "jackett" "" "Jackett" 0 "" 0
synouser --add "lazylibrarian" "" "Lazy Librarian" 0 "" 0
synouser --add "nzbhydra" "" "nzbHydra2" 0 "" 0
synouser --add "radarr" "" "Radarr" 0 "" 0
synouser --add "sabnzbd" "" "Sabnzbd+" 0 "" 0
synouser --add "sonarr" "" "Sonarr" 0 "" 0
synouser --add "transmission" "" "Transmission" 0 "" 0
Or synogroup --enum all
administrators
download
http
media
users
Create groups
synogroup --add download lazylibrarian nzbhydra radarr sonarr transmission sabnzbd jackett
synogroup --add media embysvr lazylibrarian radarr sonarr calibre-web
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment