First Run¶
Scope: from a started server to a
working vault: the two health checks,
then the account flow exactly as a client
performs it — prelogin, verification,
registration, login, an item created and
read back, and sync. The lab performs the
flow with a script standing in for a
client (vaultwarden-lab/lab_api.py), so
that every request can be printed.
Prove it's alive before you prove anything else¶
Two addresses tell you the server is up and who it thinks it is:
$ curl http://127.0.0.1:8222/alive
"2026-10-22T02:42:52.385216Z"
/alive answers with nothing but the
time, in UTC, and a 200 (t02). It is the
address your monitoring should ask about,
because it is the cheapest question the
server can be asked.
$ curl http://127.0.0.1:8222/api/config
{
...
"server": {
"name": "Vaultwarden",
"url": "https://github.com/dani-garcia/vaultwarden"
},
"version": "2026.6.0"
}
/api/config (t03) is what a client asks
first. Note the two different version
numbers in this guide: the server is
1.37.4 (its banner, t04), while the
protocol version it reports to clients
is 2026.6.0 — Bitwarden's numbering, not
Vaultwarden's. Chapter 8 returns to why
both matter.
And the address a human would try first,
/, with the web vault disabled, returns
the server's own 404 page (t03) — the
first boundary of this guide's lab: the
binary alone has no web page to show you.
Ask how this address stretches a key¶
Before an account exists, a client calls prelogin to learn how to turn the master password into keys for this particular address:
$ POST /identity/accounts/prelogin
{
"kdf": 0,
"kdfIterations": 600000,
...
}
For Maren's address: PBKDF2 (kdf 0), 600,000 iterations (t05). For Jae's, a moment later: Argon2id (kdf 1), 6 iterations, 32 MiB of memory, 4 lanes (t07). Two addresses, two different answers — deliberately. For an address with no account, the server answers from a fixed list of plausible settings chosen by hashing the address (the guide read this in the 1.37.4 source, and it is upstream Bitwarden's design): an attacker asking "is this address registered here?" learns nothing, because an unregistered address gets a serious-looking answer too. Once the account exists, prelogin returns its real settings. The lab's first attempt at Jae's account ignored the memory field and the server refused, in so many words (t07a):
POST /identity/accounts/register/finish -> 400
message: Argon2 memory parameter is required.
Check: your client never shows you any of this. It asks, derives, and moves on. The chapter prints it because somebody's client has to get it right, and because chapter 11's strangest symptom lives here.
Register: the verification token first¶
Current clients register in two moves.
First, POST
/identity/accounts/register/send-verification-email
— a name the lab's server makes slightly
funny, because with no mail configured
and verification not required, no email
is sent at all: the registration token
comes straight back in the response
(t06). (With mail configured and
verification on, the same token goes by
email instead, and the response is an
empty 204. Invited addresses are the
other exception — chapter 5.)
Then the client derives the keys (the
arithmetic of chapter 1, performed for
real by the lab driver) and posts
/identity/accounts/register/finish with
the hash, the sealed keys, the KDF
settings it was given, and the token:
POST /identity/accounts/register/finish -> 200
{
"object": "registerFinish"
}
Two warnings belong here. First, the
endpoints moved: the paths older guides
and older clients used —
/api/accounts/prelogin,
/api/accounts/register,
/identity/accounts/register — are
removed in 1.37.4, and the lab's probes
of them returned 404 (t05, t05b). If a
tutorial's registration steps 404 on you,
its age is showing (chapter 11). Second,
the finish response differs by version:
under 1.37.3 the same call answered
{"object": "register"} with a captcha
field (t22). The flow is a living thing;
the clients and server move together.
Login: the token flow¶
Logging in is the identity service's token endpoint, a form post:
$ POST /identity/connect/token -> 200
{
...
"access_token": "eyJ0eXAiOi...<redacted>",
"expires_in": 7200,
"refresh_token": "eyJ0eXAiOi...<redacted>",
"scope": "api offline_access",
"token_type": "Bearer"
}
The full answer (t08) includes the sealed vault key and the account's real KDF settings — everything a client needs to unseal the vault locally and then forget the password was ever typed. The access token lasts two hours; the refresh token quietly trades for new ones. Note what the request contained: the master password hash (chapter 1), never the password.
In a real client, this whole chapter so
far is: choose Log in, and — the step
that matters — set the server address
before logging in. Every Bitwarden app
has a self-hosted option on its login
screen (a server URL field, often behind
a settings gear); enter
https://vault.example.test there once,
and the app remembers it. That sentence
is documented, not lab-proven (no phone
was available to the build), and it is
the single most common first-run failure
in the wild: an account "that doesn't
exist" because the app is asking
Bitwarden's cloud.
An item, and the shape of sync¶
With a token, creating an item is one
post (t09). The lab's stand-in fields are
readable on purpose; a real client's
name, username, and password here
would be ciphertext of exactly the same
shape. One modern field deserves a
mention: encryptedFor, the account's
own ID, required since the 2025.6
clients — omit it and the server answers
422 (t07a). Read back by ID, the item is
byte-for-byte what was sent (t10).
Then sync — the call every client makes after login and after every change (t11): profile, folders, collections, and every cipher, in one answer. It is the whole vault (sealed) each time, which is why a vault of thousands of items is still small talk between a client and a server on a Pi. Your server is now, in every way a client can measure, a vault.