Last active
March 29, 2024 18:37
-
-
Save rhemz/132ac99292a0fbd3a987e3eb756b13f1 to your computer and use it in GitHub Desktop.
Install qbittorrent on Synology NAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first, install docker if it's not already w/ Synology Package Center, ensure SSH is enabled. | |
# it probably installed to /volume1/ but make sure. if it didn't, note the path. | |
# ssh in as user you want to run docker as and get the id/gid. should be a user that has R/W | |
# to the download location. don't run this as root (duh) | |
russ@russ-nas1:/$ id | |
uid=1026(russ) gid=100(users) groups=100(users),101(administrators) | |
# make qbittorrent dir | |
russ@russ-nas1:/$ sudo mkdir /volume1/docker/qbittorrent | |
Password: | |
russ@russ-nas1:/$ ls -latrh /volume1/docker/ | |
total 0 | |
drwxrwxrwx+ 1 root root 8 Oct 31 12:11 @eaDir | |
drwxr-xr-x 1 root root 402 Oct 31 12:11 .. | |
drwxrwxrwx+ 1 root root 0 Oct 31 20:52 qbittorrent | |
drwxrwxrwx+ 1 root root 34 Oct 31 20:52 . | |
# fill in IDs, map dir to /downloads and the dir we just made to /config . | |
# optionally pin the image to a tag https://hub.docker.com/r/linuxserver/qbittorrent/tags | |
# 6881 is default torrent port but many trackers block it. Whatever you choose, port-map it. | |
# i'm choosing 52914 for this | |
sudo docker run -d --name=qbittorrent \ | |
-p 52914:52914 \ | |
-p 52914:52914/udp \ | |
-p 8097:8097 \ | |
-e WEBUI_PORT=8097 \ | |
-e PUID=1026 \ | |
-e PGID=100 \ | |
-e TZ=America/New_York \ | |
-v /volume1/docker/qbittorrent:/config \ | |
-v /volume1/Media:/downloads \ | |
--restart always \ | |
ghcr.io/linuxserver/qbittorrent | |
# check that it started | |
russ@russ-nas1:/$ sudo docker container ls | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
5f4ffc4f78c0 ghcr.io/linuxserver/qbittorrent "/init" 40 seconds ago Up 35 seconds 0.0.0.0:6881->6881/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:6881->6881/udp qbittorrent | |
# dir should have stuff in it now | |
russ@russ-nas1:/volume1/docker/qbittorrent$ ls -latrh | |
total 0 | |
drwxrwxrwx+ 1 root root 34 Oct 31 20:52 .. | |
drwxrwxrwx+ 1 root root 0 Oct 31 20:57 custom-services.d | |
drwxrwxrwx+ 1 root root 0 Oct 31 20:57 custom-cont-init.d | |
drwxrwxrwx+ 1 russ users 22 Oct 31 20:57 .cache | |
drwxrwxrwx+ 1 russ users 104 Oct 31 20:57 . | |
drwxrwxrwx+ 1 russ users 146 Oct 31 20:58 qBittorrent | |
# optionally restrict web UI in qBittorrent/qBittorrent.conf to your LAN | |
# by updateing WebUI\Address to your NAS IP:WEBUI_PORT | |
# update paths, ports, etc before launching webUI. | |
russ@russ-nas1:/volume1/docker/qbittorrent$ vim qBittorrent/qBittorrent.conf | |
[AutoRun] | |
enabled=false | |
program= | |
[LegalNotice] | |
Accepted=true | |
[Preferences] | |
Connection\PortRangeMin=52914 | |
Connection\UPnP=false | |
Downloads\SavePath=/downloads/ | |
Downloads\TempPath=/downloads/_TorrentTemp/ | |
Queueing\QueueingEnabled=true | |
WebUI\Address=192.168.1.100:8097 | |
WebUI\Port=8097 | |
WebUI\ServerDomains=* | |
# sign in in browser. default login is admin/adminadmin | |
# change admin pw under Tools->Options. Update torrent port if you exposed something different via docker. | |
# ensure the uid that qbittorrent runs as has r/w to the download location. Explicitly add it w/ Synology File | |
# Station. Groups do not apply, need to explicitly give that user permission, FileStation will say the user | |
# is already covered but create the rule anyway and apply to all subfolders. | |
# optionally install Flood, swanky UI that talks to qbittorrent webui | |
sudo docker run -d --name=flood \ | |
-p 8098:3000 \ | |
-v /volume1/Media:/downloads \ | |
-u 1026:100 \ | |
--restart always \ | |
jesec/flood:master \ | |
--allowedpath /downloads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment