qBittorrent
qBittorrent copied to clipboard
Set listening port via command-line switches or environment variable
If I run qbittorrent-nox --help, it says I can set options via environmental variables following the semantic QBT_PARAMETER_NAME. My question is, where can I find the parameter name for each specific option.
In particular, I'd like to set the listening port via the environment for use in a systemd service. I checked the docs and couldn't find it anywhere so perhaps this information could be made more explicit in the wiki as well.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Currently, setting the listening port can't be done with command line options or environment variables.
There is an ongoing effort to improve the man pages, that I have left on hold while I was busy with other things: https://github.com/qbittorrent/qBittorrent/pull/12205. I'll try to wrap it up soon.
From there:
ENVIRONMENT variables and command-line OPTIONS can currently only override a small subset of all the available settings that can be configured in the main configuration file.
I'll consider this a feature request for the ability to set this option via command-line switches/environment variables.
I'd like to bump this request and add that the software should repeatedly check the environment variable for changes so it can be changed on-the-fly.
Thanks!
That would be awesome while using a VPN with port forwarding
- start VPN
- check port
- launch qbt from command line with correct port, without having to open the settings
@Chocobo1 I believe this can be closed as resolved by #17862. One can now use --torrenting-port=<port> or QBT_TORRENTING_PORT=<port> to set the port.