Weilong 464c2 Docker Thunder Download Path Configuration

Hardware: Weilong Unicom 464c2

Software: Docker cnk3x/xunlei image

Background: Thunder service has been installed through Docker, but the default download path is in the Container path, which is inconvenient to access;

Purpose: Transfer the download path to a shared folder for easy access using File Station;

Attention: The graphical addition method has failed. If you don’t care, you can start looking at it directly from the command line settings!!!

Firstly, we will attempt to solve the issue through a graphical interface.

Prepare the shared folder path through File Station first. The author added it in the same path as the container folder in Volume 4.

Then add containers through the Container Station application.

In the advanced settings for creating containers, try using storage mapping to solve the problem. However, it cannot be solved by adding volumes or binding the mount host path, for the reasons mentioned above; By adding volumes, it did not actually take effect in the end. By binding the loading host path, it is not possible to add the actual created path (which cannot be locked to the root directory/share), so we finally solved the problem through the command line.

First, run an SSH connection in VNet Qfinder, and then connect to Weilong in a tool (such as Putty).

ssh 你的用户名@威联通局域网ip
docker image 

Confirm that there is already a Thunder mirror. (Because the author has installed it before, there is no need to manually download and load it with Docker)

Run the following command to start the Thunder Mirror service.

docker run -d \

  --name xunlei \

  --privileged \

  -v /share/CACHEDEV4_DATA/xunlei/downloads:/xunlei/downloads \

  -v /share/CACHEDEV4_DATA/xunlei/data: /xunlei /data \

  -e TZ="Asia/Shanghai" \

  -p 2345:2345 \

  --restart unless-stopped \

  cnk3x/xunlei:latest

Command Explanation

1. docker run

  • Used to create and run a container.

2. -d

  • Detached mode
  • After the container is started, it will not bind to your terminal. The command will immediately return and your container will run in the background.
  • Benefit: Restarting or shutting down the terminal on NAS will not affect container operation.
  • If you use – it instead of – d, it is called “interactive terminal mode”. The container will bind to your terminal, and the terminal will stop when the container is closed.

3. – name xunlei

  • Name the container xunlei for easy management, such as:
    • docker stop xunlei
    • docker logs xunlei
  • If no name is specified, Docker will randomly generate a name.

4. – privileged

  • Privilege Mode
  • Containers have almost all the permissions of the host computer, allowing them to access all devices, perform mounting operations, and more.
  • The main purpose here is to solve the permission issues when mounting/downloads and/data on Thunder containers (to avoid the “operation not permitted” error).
  • Risk: The container has very high permissions and it is not recommended to run untrusted images.

5. -v /share/CACHEDEV4_DATA/xunlei/downloads:/downloads

6. -v /share/CACHEDEV4_DATA/xunlei/data:/xunlei/data

  • Mount Volume
  • Map the directories on NAS to the inside of the container:
    • /Share/ACHEDEV4DATA/xunlei/downloads → Container/xunlei/downloads (where downloaded files are stored)
    • /Share/ACHEDEV4DATA/xunlei/data → Container/xunlei/data (program data, configuration, historical tasks, etc.)
  • Benefit: After deleting and rebuilding the container, the data is still retained.

7. -e TZ=” Asia/Shanghai”

  • Set time zone environment variables
  • The time inside the container will be in Beijing time.
  • If not set, the default is UTC, and the log time may not match.

8. -p 2345:2345

  • Port Mapping
  • Map the 2345 port of the host computer to the 2345 port of the container for accessing the Thunder Web interface.
  • Format: Host Port: Container Port
  • Example: Browser Access http://NAS_IP:2345 You can open the Thunder management interface.

9. – restart unless-stopped

  • Automatic restart strategy
  • Automatically start when container crashes or NAS restarts
  • Never stopped: will always restart unless manually stopped
  • Other strategies:
    • No: Do not automatically restart
    • Always: Always restart (manual stop will also restart)
    • On failure: Restart only when an error exits

10. cnk3x/xunlei:latest

  • Mirror name+label
  • Cnk3x/xunlei is a Thunder image on Docker Hub
  • Latest is a label (usually referring to the latest version)

Summary: This command will make the Thunder container run in the background, automatically restart, use Beijing time, and mount the downloaded files and configuration data to the specified path, while also having privileged mode to avoid mounting errors. Attention

/share/ACHEDEV4DATA/xunlei/downloadsis the actual system path of the shared folder xunlei in DataVol4!!!!!! Remember.

After running successfully, you can see Thunder containers appearing in Containers Station.

Click on the operation, edit, and add a LAN IP address to the container for easy management.

You can modify the default port, which is 2345 by default.

The default NAT interface can be accessed using browsers in Weilong, but it is not convenient.

Click on ‘Add’, select ‘Add Bridge Interface’, and choose your own local area network IP interface for Weilong Unicom. This will default to using DHCP, and the IP address used to access the Thunder management interface will change. You can use a static IP address to fix it, mainly not to conflict with the IP addresses of other devices in the local area network.

After adding, it can be accessed through a browser

LAN IP address: 2345

Visit the Thunder management interface and log in with your phone Thunder.

The Thunder container running in this way, unlike the container configured directly using a graphical interface, can directly connect to the terminal.

If you want to enter the container terminal for debugging, you can use:

docker exec -it xunlei /bin/bash

Reference link

https://hub.docker.com/r/cnk3x/xunlei

https://www.qnap.com.cn/zh-cn/how-to/faq/article/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8 -ssh-%E8%AE%BF%E9%97%AE-qnap-nas

Leave a Reply