qBittorrent - is a nice torrent client based on Qt and libtorrent libraries. The Qt library is a cross-platform UI framework, so, qBittorrent is also cross-platform. But there is a special version, called qbittorrent-nox. It doesn’t have UI and the only option to control this client is WebUI. It’s a good option for servers where the torrent client is running on a server and the end user controls it from the browser on a different machine.
To install qBittorrent, you can download the latest release from the official site or install it from any package manager. But I decided to go a different way build it from the source code and pack it into a docker image (I didn’t know about docker-qbittorrent-nox repository or maybe it didn’t exist at that time). To build qBittorrent, you can use the good old ./configure and make approach or use CMake. So, I created a Dockerfile to build libtorrent as a static library, build qbittorrent and link it statically with libtorrent, other dependencies are installed from Alpine’s package manager.
Here is my old Dockerfile:
I knew that the project authors planned to migrate to CMake and remove the old approach in the release qBittorrent 5.0. So, I need to update my scripts. I started to google documentation for it and found this project qbittorrent-nox-static. It’s “a bash script which builds a fully static qbittorent-nox binary with current dependencies to use on any Linux OS”. It required only bash, everything else is installed automatically. So, you just need to run ./qbittorrent-nox-static.sh all (optionally add other options like -o). No more complex scripts, tools, or parameters. Just a single script.
Here is the updated Dockerfile:
In conclusion, building qBittorrent from the source by using qbittorrent-nox-static simplifies this by automating dependency management and building static binaries. The new approach reduces manual steps and makes it a reliable solution for maintaining a headless torrent client.