Original link: https://www.aemon.top/2022/08/09/%E6%A6%A8%E5%B9%B2%E8%BF%99%E5%8F%B0NAS%E7%AC%AC002% E8%AF%9D-%E4%B8%8B%E8%BD%BD%E5%B7%A5%E5%85%B7/
This is a series of articles about NAS. You have also seen the name of the series: ” Drain this NAS “. I will introduce the knowledge related to NAS in as much detail as possible to help you maximize the power of your NAS!
I just came home after playing basketball, took a shower, and drank a little wine. I saw that a friend urged me to update in the first two articles, so I would write another article while drinking.
Earlier we introduced the directory structure and file browsing tools, so where do the files come from? The most common way is to download. Think about it, how do we download files on our PC? It can be downloaded directly through the browser or through various download software. So what tools should I use on my NAS? Next, I will introduce the download tools commonly used on the NAS.
PS: I’m drunk, please forgive me if I wrote something wrong.
qBittorrent
Speaking of BT download, everyone in China should think of Xunlei for the first time, but Xunlei is not a good BT download software. The software commonly used is qBittorrent .
search
Still the same, go to the “Apps” page, search for “qBittorrent”, and select the app shown below:
Be careful not to choose the wrong one.
Click “Install”.
configure
You can see that this container needs to be configured with three ports, a path and an environment variable.
-
Map the
8080
port of the host to the8080
port of the container, which is the WebUI port of the container, and then you can access the WebUI interface through this port (note, please make sure that the8222
port of the host is not occupied by other programs, otherwise it will not be able to start container, if it is occupied, you can replace the port yourself); -
Map the host’s port
6881
to the container’s port6881
, which is the port for TCP connections, and6881
is the default port for incoming connections; -
Map the host’s port
6881
to the container’s port6881
, which is the port for UDP connections, and6881
is the default port for incoming connections; -
Map the
/mnt/user/UNRAID/downloads/qBittorrentDownloads
path of the host to the/downloads
path of the container, which is the path where qBittorrent stores downloaded files; -
Set
WEBUI_PORT
environment variable with a value of8080
The function of this environment variable is to set the port of the WebUI in the container. You don’t need to change it. If it is changed here, then in the first port mapping configuration, you must also change the port in the container. is the changed value, otherwise the WebUI page will not be accessible after starting the container.
The above are all default configurations except the download path. We need to modify them on the basis of the default configuration:
-
Add two new port mappings, the port value can be larger, I use:
41638
, one is TCP port, one is UDP port, after completion, you can remove the two default6881
port mappings above; -
Click “Show More Settings” below, and modify the Appdata path to
/mnt/user/appdata/qBittorrent
, which is the path where qBittorrent’s configuration information is stored; -
Or in “Show More Settings”, modify the value of the
PUID
environment variable to0
, and modify the value of thePGID
environment variable to0
, so that the container can be started as the root user; -
Add
UMASK
environment variable with a value of000
.
After confirmation, click “Apply” to start the container.
Attach the startup command under unRAID:
1 |
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='qBittorrent' --net='bridge' -e TZ="Asia/Shanghai" -e HOST_OS="Unraid " -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="qBittorrent" -e 'WEBUI_PORT'='8080' -e 'PUID'='0' -e 'PGID'='0' -e 'UMASK'='000 ' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https: //raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/qbittorrent-logo.png' -p '8080:8080/tcp' -p '41638:41638/tcp' -p '41638 :41638/udp' -v '/mnt/user/UNRAID/downloads/qBittorrentDownloads':'/downloads':'rw' -v '/mnt/user/appdata/qbittorrent':'/config':'rw' ' linuxserver/qbittorrent' |
use
Open a browser and visit http://192.168.1.223:8080 (note that if you have modified the port in the above configuration, please visit the corresponding port, and the IP address is the IP address of your NAS), you can go to qBittorrent operation page.
The default username is: admin
, and the default password is: adminadmin
.
change Password
The first thing after logging in, go to “Tools” – “Options” – “Web UI” – “Authentication” to change your password.
some configuration to make it better to use
-
“Tools” – “Options” – “Web UI” – “Language” to change the language to Simplified Chinese;
-
“Tools” – “Options” – “Connection” – “Listening Port” set it to the incoming connection port configured when the container was started, that is,
41638
just set. It is strongly recommended to choose a random port , not the same as mine, The reason for this is that first some PT stations will disable the default ports6881
~6999
. So try not to select ports within these ranges; secondly, some operators will block BT traffic, if many people use the same port, it will increase the probability of being discovered by the operator; -
“Tools” – “Options” – “Download” check “Add extension .!qB to incomplete files”, which can facilitate setting hard links later;
-
“Tools” – “Options” – “Advanced” – “libtorrent Related”, change the “Amount of memory usage expansion during verification” to a larger size, I set it to
512
, which can improve the verification speed and improve the efficiency of auxiliary seeding; -
“Tools” – “Options” – “BitTorrent” check “Automatically add the following trackers to new torrents”, and fill in https://cdn.jsdelivr.net/gh/ngosang/trackerslist@master/ in the input box below The content in trackers_all.txt is set here to get more seeders, which can effectively improve the download speed. It is recommended to update the tracker list every once in a while. For more tracker lists, you can check https: //github.com/ngosang/trackerslist and https://github.com/XIU2/TrackersListCollection .
-
“Tools” – “Options” – “BitTorrent” uncheck “Torrent Queue”, this step is to download and upload multiple tasks at the same time, the essence of BT is that I am for everyone, everyone is for me, and your download is someone else’s so please don’t limit your uploads and provide the most uploads without affecting usage;
-
For more detailed configuration, you can check https://www.jianshu.com/p/ac70172767ed , which is very detailed in this article.
Classification
One of the advantages of qBittorrent compared to other download tools is that it has a strong classification and tagging mechanism. In the left sidebar, you can see the classification and note management modules.
We can add new categories by right-clicking any category:
Then fill in the category name and save path, you can set different paths for different categories, such as Moive category, save path /downloads/Media/Moive
, TV series category, save path /downloads/Media/TV series
, you can follow me Configure the Media directory in Chapter 000 to create the relevant categories. This will provide great convenience for subsequent hard links.
Finally, when creating a new task, you can choose the category that has been set. Of course, for existing tasks, right-click one or more tasks to select the corresponding category in the “Category” column.
Label
In fact, it is enough to have a classification. The difference between labels and classifications is:
-
The label cannot set the save path;
-
A task can have multiple labels, but only one category.
You can use it according to your actual needs. For example, some tasks have strange names and are not easy to identify at the first time, so you can use tags to mark them. Or you can set tags according to the country of the movie or TV series and the year it was released.
Installation under Linux
The following operations are based on the fact that Docker has been installed in the system.
-
Pull the Docker image
1
docker pull linuxserver/qbittorrent:latest
-
start the container
1
2
3
4
5
6
7
8
9
10
11docker run \
-v '/mnt/user/UNRAID/downloads/qBittorrentDownloads':'/downloads' \
-v '/mnt/user/appdata/qbittorrent':'/config' \
-p '8080:8080/tcp' \
-p '41638:41638/tcp' \
-p '41638:41638/udp' \
-e 'WEBUI_PORT'='8080' \
-e 'PUID'='0' \
-e 'PGID'='0' \
-e 'UMASK'='000' \
linuxserver/qbittorrent:latest
Aria2
In addition to the software specially used for BT download, the tool Aria2 is also recommended. It is considered to be one of the best download managers for Linux in terms of download efficiency and usability of the software. Not only does Aria2 support BitTorrent, it is also capable of multiplexing requested files from various sources. Includes HTTP, HTTPS, FTP and BitTorrent protocols.
search
Go to the “Apps” page, search for “aria2”, and select the app shown below:
Click “Install”.
configure
The configuration of Aira2 seems to be more, but most of them can use the default configuration. I will talk about a few key configurations:
-
RPC_SECRET
environment variable, this value is the password for managing Aira2 later, just set a less simple password; -
Map the
/mnt/user/UNRAID/downloads/aria2Download
path of the host to the/downloads
path of the container, which is the path where Aria2 stores the downloaded files; -
Map the
/mnt/user/appdata/aria2-pro
path of the host to the/config
path of the container, which is the path where Aria2 stores the downloaded file; -
RPC_PORT
is the port for managing Aira2 , which is the default; -
The remaining ports can use the default configuration. The function of
Listen Port
here is the same as that of the incoming connection port of qBittorrent above. However, in the case of qBittorrent , Aria2 is generally not used for BT download, so there is no need to change it here, just use the default;
After confirmation, click “Apply” to start the container.
Attach the startup command under unRAID:
1 |
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='Aria2-Pro' --net='bridge' -e TZ="Asia/Shanghai" -e HOST_OS= "Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="Aria2-Pro" -e 'RPC_SECRET'='fill in your password here' -e 'IPV6_MODE'='true' -e 'RPC_PORT'='6800' -e 'LISTEN_PORT'='6888' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://ariang.mayswind.net/latest/' -l net.unraid. docker.icon='https://raw.githubusercontent.com/justin-himself/unraid-templates/master/icons/AriaNg.ico' -p '6800:6800/tcp' -p '6888:6888/tcp' - p '6888:6888/udp' -v '/mnt/user/UNRAID/downloads/aria2Download':'/downloads':'rw' -v '/mnt/user/appdata/aria2-pro':'/config' :'rw' 'p3terx/aria2-pro' |
use
Unlike qBittorrent , the Aria2 container itself does not provide a WebUI. We need to manage Aria2 through AriaNg .
-
Open the browser and visit http://ariang.mayswind.net/latest ;
-
Click “AriaNg Settings” in the left sidebar;
-
Select the second tab “RPC (ariang.mayswind.net)”;
-
Enter the Aria2 RPC alias to distinguish multiple RPCs, such as “Home NAS”, “Company Server”;
-
Enter the Aria2 RPC address , and change the default one to the IP address of your NAS. The port number is the default
6800
If you have modified theRPC_PORT
when configuring the container, you need to change the modified port number here; -
Select “Http” for Aria2 RPC protocol ;
-
Aria2 RPC Http request method select “POST”;
-
The Aria2 RPC key is the value of
RPC_SECRET
filled in during container configuration; -
After confirming that it is correct, refresh this page again.
If there is no problem with the configuration, the Aria2 status in the left sidebar will display green connected, which means it has successfully connected to your Aria2 service. Then you can add a download task on this page and download it.
refer to
This article is reprinted from: https://www.aemon.top/2022/08/09/%E6%A6%A8%E5%B9%B2%E8%BF%99%E5%8F%B0NAS%E7%AC%AC002% E8%AF%9D-%E4%B8%8B%E8%BD%BD%E5%B7%A5%E5%85%B7/
This site is for inclusion only, and the copyright belongs to the original author.