Hardware: QNAP 464c2;
Software: the docker cnk3x/xunlei image
Background: the Thunder service is already installed through docker, but the default download path sits inside the Container path, which is inconvenient to access;
Goal: move the download path over to a shared folder so I can reach it directly from File Station;
Heads up: the graphical way of adding it failed. Don’t care about that part? Just start from the command line setup!!!

First I tried sorting this out through the graphical interface.
Get the shared folder path ready in File Station first. I added mine in Volume 4, at the same path as the container folder.

Then add the container through the Container Station app.




In the advanced settings while creating the container I tried fixing it with storage mapping. Neither adding a volume nor bind-mounting a host path worked, for the reason above. Adding a volume didn’t actually take effect in the end. Bind-mounting a host path wouldn’t let me pick the path I had actually created (it couldn’t be pinned under the root /share directory), so in the end I solved it from the command line.
First run the ssh connection in QNAP Qfinder, then connect to the QNAP from a tool like putty.
ssh 你的用户名@威联通局域网ip

docker image
Check that the Thunder image is already there. (I had installed it before, so mine was already there; if you don’t have it, download it manually and docker load it)

Run the command below to bring up the Thunder image 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 breakdown
1. docker run
- Creates and runs a container.
2. -d
- Background mode (detached mode)
- Once the container starts it doesn’t bind to your terminal; the command returns right away and your container keeps running in the background.
- Perk: a NAS reboot or a closed terminal won’t affect the container.
- If you use -it instead of -d you get “interactive terminal mode”: the container binds to your terminal, and when the terminal closes the container stops.
3. –name xunlei
- Names the container xunlei so it’s easier to manage, for example:
- docker stop xunlei
- docker logs xunlei
- If you don’t give it a name, Docker makes up a random one.
4. –privileged
- Privileged mode
- The container gets almost all the host’s permissions: it can reach every device, run mount operations, and so on.
- Here it mainly fixes the permission problem when the Thunder container mounts /downloads and /data (avoiding the “operation not permitted” error).
- Risk: the container ends up with very high privileges, so don’t run untrusted images on it.
5. -v /share/CACHEDEV4_DATA/xunlei/downloads:/downloads
6. -v /share/CACHEDEV4_DATA/xunlei/data:/xunlei/data
- Mount volume (volume)
- Maps a folder on the NAS into the inside of the container:
- /share/CACHEDEV4_DATA/xunlei/downloads → container /xunlei/downloads (where the downloads are stored)
- /share/CACHEDEV4_DATA/xunlei/data → container /xunlei/data (program data, config, task history, etc.)
- Perk: delete and rebuild the container and your data is still there.
7. -e TZ=”Asia/Shanghai”
- Sets the timezone environment variable
- Time inside the container uses Beijing time.
- Skip it and the default is UTC, so log times may not line up.
8. -p 2345:2345
- Port mapping
- Maps the host’s 2345 port to the container’s 2345 port, for reaching the Thunder web interface.
- Format: host port:container port
- Example: open http://NAS_IP:2345 in your browser and the Thunder admin interface comes up.
9. –restart unless-stopped
- Auto-restart policy
- Starts automatically when the container crashes or the NAS reboots
- unless-stopped: always restarts unless you stop it manually
- Other policies:
- no: no automatic restart
- always: always restarts (even after a manual stop)
- on-failure: only restarts when it exits with an error
10. cnk3x/xunlei:latest
- Image name + tag
- cnk3x/xunlei is the Thunder image on Docker Hub
- latest is the tag (normally the newest version)
Bottom line: this command runs the Thunder container in the background, restarts it automatically, uses Beijing time, and mounts the downloaded files and config data at the paths above, while privileged mode keeps mount errors away. Watch out:
/share/CACHEDEV4_DATA/xunlei/downloads is the actual system path of the xunlei shared folder in DataVol4!!!!!! Keep that in mind.
Once it’s running, you’ll see the Thunder container show up in Containers Station (likely a typo for Container Station).

Click Operations, then Edit, and give the container a LAN IP address so it’s easier to manage.
You can change the default port too; it uses 2345 out of the box.

The default NAT interface can be opened with the browser inside QNAP, but it isn’t convenient.

Click Add, choose to add a bridge interface, and pick your own QNAP LAN IP interface. It defaults to dhcp, so the IP address you use to reach the Thunder admin interface will change; a static IP pins it down, just make sure it doesn’t clash with other devices on the LAN.

Once it’s added you can visit it from your browser
LAN IP address: 2345
Open the Thunder admin interface and log in with the Thunder app on your phone.

A Thunder container started this way, unlike one configured straight through the graphical interface, lets you connect to a terminal directly.

If you want to drop into the container’s terminal to debug, use:
docker exec -it xunlei /bin/bash
References
https://hub.docker.com/r/cnk3x/xunlei
