Page 1 of 1

Is there a way to change the torrenting port without restarting QBittorrent?

Posted: Sat Mar 30, 2024 4:01 am
by metricspace
This is it, I basically have a script to enable portforwarding.

The function that does it, natpmpc, changes the port randomly so I have to get the new port, close Qbittorrent, and reopen with the new port using
qbittorrent --torrenting-port="$port" &

Is there a way to change the port on the current session of Qbittorrent, similar as if you changed it in preferences?

Re: Is there a way to change the torrenting port without restarting QBittorrent?

Posted: Sun Apr 21, 2024 2:28 pm
by chruez007
Hi i do change the port as follows

curl -i -X POST -d "json={\"listen_port\": $port}" "http://localhost:8080/api/v2/app/setPreferences"
and ensure you have activated
"Bypass authentication for clients on localhost" so your user is permitted to update the port