qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Set listening port via command-line switches or environment variable

Open nrdxp opened this issue 5 years ago • 3 comments
trafficstars

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.

nrdxp avatar Sep 27 '20 00:09 nrdxp

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.

FranciscoPombal avatar Sep 27 '20 15:09 FranciscoPombal

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!

cwm9cwm9 avatar Dec 11 '21 01:12 cwm9cwm9

That would be awesome while using a VPN with port forwarding

  1. start VPN
  2. check port
  3. launch qbt from command line with correct port, without having to open the settings

mistic100 avatar Sep 21 '22 20:09 mistic100

@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.

fice-t avatar Apr 23 '24 04:04 fice-t