Cant change default port (6881) qBittorrent

Hi there,

I’m on a fresh build of Ubuntu 18.04 and have been playing around with the QB container and I cant for the life of me fix the default torrent port for TCP / UDP. Changing both via Docker create has no effect (local & host set to same), as on log in, the settings always shows 6881. If you change it via the settings panel and Save, the moment you go back into the settings panel again, it just defaults back to 6881. I have cloned from git and altered the EXPOSE port, adjusted the root/default/qB…conf file port so they all match to the same port ( 33233 for example), cleared my cache’s, configs, etc. And when I build and run the damn thing still sits as 6881. Testing it with a torrent shows it trying to connect on 6881. Once you manually add a torrent, then change the port in the settings, it will accept the new port (though it still shows as 6881) and this is confirmed by the tracker. But the next torrent you add will default back to 6881. I know its not qbotorrent as I have a non-conatiner version running on another machine on different ports and it runs fine. Any advice would be greatly appreciated. Cheers, Fox

ps: I should add, I can change the webui port and it is persistent, and working fine from any port number

It’s explained in the ReadMe how to change the webui port.

The webui port isnt the problem, I’ve changed that successfully, its the other ports that dont stick. I just tried a new non container version, and it doesnt work either, so it’s probably a bug in the lastest version of QB.

My other non-container version, was updated from an older build, which is probably why its still working.

Ah apologies, I didn’t fully understand the question. With it running in a container, you can just redirect that when creating the container by doing -p 33233:6881 and that would be a work around.

Thanks for the input. What you suggests does work, but the minute you change any setting and ‘save’ it defaults back to 6881, which I imagine is a bug in QB resetting the port number. I seem to recall something similar a while back before it was fixed.

Essentially if you set (say 44344) on the container, it tries to connect on 6881 on first start up regardless. I can see this when adding a seeding torrent and a certain site tracker reports a 6881 connection (which they block). Change the port in the settings to 44344 and save, and the tracker will then correctly report 44344, even though the settings still show 6881. All well and good. Now if you change any setting, regardless, through the settings panel and save, the port changes back to 6881.

Long story short, you can workaround by always re-inputting the port (if different from 6881), everytime you go into QB settings and make a save. As long as you do this, the new port setting will persist even after bashing the container. The minute you change any setting though and dont re-input the port, it will revert.

I’m leaving my findings here, just because I’ve been banging my head against this problem for a day or so, thinking I must be doing something wrong. Hopefully it might save someone a similar headache, until its fixed in QB. I’ll raise a bug on QB git with this info.

A lot of us have ZERO Linux experience before this. I read the readme but that doesn’t help if you’re just learning. I have a similar issue but don’t understand how to change it.

Post how far you’ve got and I can show you :slightly_smiling_face:

did you ever figure this out? having the same issue rn

this is from august of 2021, start your own thread, share your compose, logs, and state your issue.