I was following the setup docs and I set a permanent username and password in Qbittorrent under the Tools Options Web UI but now when I try to login with those credentials it says invalid username or password. Is there a way to view what Qbittorrent thinks is the user/pass and or reset the credentials back to the sparkbox default?
13 replies
tomspark wrote:
Good news — nothing's broken and this is easy to undo. qBittorrent can't show a password back to you (it's scrambled for safety), so the move is to set it back to the SparkBox default. First try the easy thing: open your dashboard, find Service Passwords, and log in with the username admin and the qBittorrent password listed there. If your change didn't actually save, that'll just log you right in. If it still says invalid, reset qBittorrent back to factory with this one line, then wait a minute and log in with admin + that dashboard password: sudo docker stop sb-qbittorrent && sudo mv /opt/sparkbox/modules/media/config/qbittorrent /opt/sparkbox/modules/media/config/qbittorrent.bak && sudo sparkbox up
gdavidson26 wrote:
I tried that and it is saying "mv: cannot stat '/opt/sparkbox/modules/media/config/qbittorrent': No such file or directory"
tomspark wrote:
No worries — that error just means qBittorrent's settings folder is somewhere other than where I guessed (your SparkBox may be installed outside /opt/sparkbox). Let's find it — this only looks, it changes nothing: sudo find / -type d -name qbittorrent 2/dev/null It'll print a path ending in /qbittorrent. Paste that back and I'll give you the exact reset line for your box. Meanwhile, the quickest fix of all is just logging in with the username admin and the qBittorrent password from your dashboard's Service Passwords — worth a shot if you haven't tried it.
gdavidson26 wrote:
I tried the username and password from the dashboards services and it unfortunately didn't work. I also did some digging into the files earlier and i noticed that the qbittorrent file wasn't there under /opt/sparkbox/modules/media/config and only qbittorrent.bak was there. When I ran the sudo find command it found the file in the correct place. I then ran the original command given in the first reply and it worked. Unfortunately when i open qbittorrent to login now I get a blank screen and it just says "Unauthorized."
gdavidson26 wrote:
find: ‘/opt/sparkbox/modules/tailscale/config/tailscale/files’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/compose’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/certs’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/bin’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/chisel’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/tls’: Permission denied find: ‘/opt/sparkbox/modules/core/config/portainer/dockerconfig’: Permission denied /opt/sparkbox/modules/media/config/qbittorrent.bak/qbittorrent /opt/sparkbox/modules/media/config/qbittorrent find: ‘/opt/sparkbox/scripts/.autoseed-cache’: Permission denied
tomspark wrote:
Nice work — the reset itself worked. That "Unauthorized" just means the fresh qBittorrent started up with its own temporary password (which is why the dashboard one didn't take). Grab the temporary one from its log: sudo docker logs sb-qbittorrent | grep -i password Look for a line like "A temporary password is provided for this session: ..." — log in with the username admin and that password, then set your own under Tools Options Web UI and click Save at the bottom. If grep prints nothing, paste me the last few lines of sudo docker logs sb-qbittorrent --tail 20 and I'll point you right at it.
gdavidson26 wrote:
I saw that an update was pushed regarding this issue which did reset my credentials and let me login with the generated ones. But once I adjusted my username and password in qbit and tried to login with that it no longer lets me in again and the new reset password command for qbit does not work.
tomspark wrote:
First off — glad the update got you back in. You've hit a real one though, and it's on us: the reset-password command for qBittorrent has a bug (it sets a new password but qBittorrent ignores it when one already exists), and changing the password inside qBittorrent's own settings trips the same thing. I'm fixing it right now and I've flagged it to Tom Spark. To get you logged in immediately with a password that'll stick, paste this: sudo docker stop sb-qbittorrent && sudo mv /opt/sparkbox/modules/media/config/qbittorrent /opt/sparkbox/modules/media/config/qbittorrent.bak2 && sudo sparkbox up Give it a minute, then run sudo sparkbox passwords and log in with admin + the qBittorrent password it shows. Leave that one as-is for now — I'll ping you the moment the fix is live so changing it sticks too.
tomspark wrote:
Fix is live — thanks for catching that one. Run sudo sparkbox update, then sudo sparkbox reset-password qbit will now actually set a fresh password that sticks (before, it printed a new password but qBittorrent ignored it if one was already set — that's fixed). It'll show you the new admin password to log in with. You're all set after that.
gdavidson26 wrote:
Perfect, the password reset works. Will I be good to change the user and password now or should I hold off for now?
tomspark wrote:
Go for it — you're safe to change them now. That earlier lockout was tangled up with the reset bug we just fixed, so a change in qBittorrent's own settings should hold this time. And here's the real safety net: if it ever bounces you again, sudo sparkbox reset-password qbit puts you straight back in with a fresh admin password in seconds — so you genuinely can't lock yourself out anymore. Change away, and shout if anything acts up.
gdavidson26 wrote:
I did some more testing and if you change just your password in qbit it works just fine but if you change the username from "admin" and the password then the system will not let you log back in until you use the reset command.
tomspark wrote:
Following up on your testing, gdavidson26 — you nailed it: changing just the password is the safe move and it sticks fine. Renaming the account away from "admin" is the one thing that trips it up right now, and that's on us, not you — I've flagged it to Tom Spark to smooth out. So for now the easy path is to leave the username as admin and set whatever password you like. And if anything ever locks you out again, sudo sparkbox reset-password qbit puts you right back in within seconds. You're all set.