First Start and the Temporary Password
Outcome: a running instance you can
log in to, with a password you chose —
and proof, across a restart, that the
password is yours and the temporary one
is dead. Evidence: transcripts t01,
t01b, t02, t03, t03b.
The first start tells you three things
Start the program against a new, empty profile:
./qbittorrent-nox --profile=/path/to/instance-a \
--webui-port=18088 --torrenting-port=48188
Its complete console output on first
start is kept in t01. Three things in
it deserve a slow read.
First, the legal notice — the
program states, before anything else,
that running a torrent makes its data
available to others by your upload and
that what you share is your sole
responsibility. It is the ethics line of
chapter 1 in the program's own words.
On later starts, --confirm-legal-notice
suppresses the message — the restarted
console appears below, and it is bare.
Second, where the controls live: access the WebUI at http://localhost:18088, username admin.
Third — and the line new users lose — because no password has ever been set, the program invents one for this session only and prints it:
The WebUI administrator password was not set.
A temporary password is provided for this session: qIcNAb7vn
That password dies when the process stops, and a different one is printed next start. It is a bootstrap, not a credential: use it once, immediately, to set your own.
Logging in with curl
The API checks a session cookie, and
login is the call that earns it. The
Referer header is required — without
it the login is refused:
curl -s -c cookies.txt \
-H 'Referer: http://127.0.0.1:18088' \
--data 'username=admin&password=<temporary>' \
http://127.0.0.1:18088/api/v2/auth/login
Success answers HTTP 204 (no body)
and sets the cookie — in this version
the reply is an empty OK, not the
word "Ok." older guides quote. Present
the cookie with -b cookies.txt from
then on. Two refusals frame the system
(t01b, t10): no cookie at all gets
403 Forbidden; a wrong password gets
401 Unauthorized — and the program
counts failures per address, banning
the address after 5 by default for
3600 seconds (both numbers read
from live preferences in t10; the lab
did not trip the ban on purpose).
Set your own password, then prove it
Setting the password is one preference among many (chapter 5 shows the general call); the one that matters now:
curl -s -b cookies.txt --data-urlencode \
'json={"web_ui_password":"fieldnotes-lab-1"}' \
http://127.0.0.1:18088/api/v2/app/setPreferences
The password is never readable back —
it is stored only as a hash — so the
proof is behavioural, and it is worth
doing once properly. The lab shut its
instance down through the API itself
(POST /api/v2/app/shutdown, HTTP
200, process gone), restarted it with
--confirm-legal-notice, and read the
console (t03): no legal notice, and
no temporary password line at all,
because a real password now exists.
Then (t03b):
login with the chosen password: HTTP 204
login with the old temporary one: HTTP 401 Unauthorized
Set, surviving, and exclusive. A forgotten password is recoverable — chapter 14 covers the honest routes — but the time to learn that your login works is now, while the temporary one is still warm.