Documentation

Everything you need to install Keywarden, move your passwords in and use it every day.

Overview

Keywarden has four parts that you install together:

All clients talk to the daemon over a local socket (Linux, macOS) or a named pipe (Windows). The daemon accepts only processes of your own user. If the daemon is not running, the window starts it for you.

Install

Download the archive for your system from the latest release. Check it against SHA256SUMS if you like. All options, including the browser extension and what is coming, are on the install page.

curl -fsSL https://onokashino.github.io/keywarden/install.sh | sh

The command downloads the latest release archive, checks it against SHA256SUMS and runs the installer from the archive. A specific version: ... | KEYWARDEN_VERSION=v0.1.0 sh. You can read the script first. The same by hand:

tar xzf keywarden-*-linux-x86_64.tar.gz
cd keywarden-*-linux-x86_64
./install.sh

The script needs no root. It puts the binaries in ~/.local/bin, installs a systemd user service for the daemon and starts it, adds a desktop entry and registers the browser host for Firefox. Chromium-based browsers need the extension id, see Browser extension.

Optional packages: wtype (autotype on Wayland) or xdotool (autotype on X11).

From source

Rust 1.92 or newer. On Linux you also need the GPUI libraries (libxkbcommon, wayland, vulkan, fontconfig).

git clone https://github.com/onokashino/keywarden
cd keywarden
cargo build --release -p keywarden-daemon -p keywarden-cli -p keywarden-host -p keywarden-ui

When the system is unusual

The installer changes nothing until the downloaded programs have started once on your system, and it says in plain words why it stopped.

Updates

The browser extension from a store updates itself.

Your first vault

Start keywarden-ui. The first screen offers two paths:

The same from the terminal:

kw new ~/Sync/passwords.kdbx          # create
kw unlock --db ~/Sync/passwords.kdbx  # open; the path is remembered

Coming from another manager? See Import: Bitwarden, 1Password, Proton Pass, Chrome, Firefox and others.

Unlocking

Unlock screen with master password field

A vault can be protected by a master password, a key file, a YubiKey (HMAC challenge-response, the same slots as KeePassXC) or any combination. All of them are set in Settings, Security, where you can also change them later. Key files are created in the KeePassXC format.

The vault locks itself after a period of inactivity, when the screen locks and before the computer sleeps. Lock it by hand with Ctrl+L in the window or kw lock.

YubiKey support is Linux-only for now.

Main window

Main window: sidebar, entry list, entry details

The sidebar has the vault sections (all entries, 2FA codes, password health, recycle bin), types, folders and tags. Drag entries onto a folder or a tag to move or tag them; the "+" next to Folders and Tags creates a new one.

Entry types: login, card, identity, note, SSH key, passkey and crypto wallet. Each type shows its own fields, but underneath it is a normal KeePass entry, so other KeePass apps still see every field. You can add your own fields, hidden fields, attachments and an expiry date to any entry; every change goes to the entry history, and any old version can be restored.

Editing a card entry
Editing an entry. The type can be changed with the picker next to the title.

The search box understands a small query language. Words are matched fuzzily against title, username, URL and tags.

QueryFinds
githubentries matching "github" anywhere
#work or tag:workentries with the tag
user:octo url:gitlab title:bank notes:pin group:Financea match in one field
pass:1234entries whose password contains the text
is:expired is:otpexpired entries, entries with 2FA
-oldexcludes entries matching "old"
"exact phrase" /regex/a phrase, a regular expression

Keyboard shortcuts

KeysAction
Ctrl+Fsearch
Ctrl+Nnew entry
Ctrl+E · Ctrl+S · Escedit · save · cancel
Ctrl+D · Shift+Delduplicate · delete
Ctrl+Shift+C · Ctrl+U · Ctrl+Tcopy password · username · 2FA code
Ctrl+J / Ctrl+Knext / previous entry
Alt+↑ / Alt+↓previous / next sidebar section
Ctrl+Gpassword generator
Ctrl+Tabswitch to the next open vault
Ctrl+,settings (Alt+1..Alt+6 switch tabs)
Ctrl+Llock

Launcher

Launcher with recent entries from all open vaults

The launcher is a search box over all windows. Type a few letters, then:

The copied value is hidden from clipboard history and cloud clipboard and is cleared after 30 seconds, but only if the clipboard still holds it. With several vaults open, the launcher searches all of them.

Binding a hotkey

The launcher is the command keywarden-ui --launcher. Bind it to a key in your system:

Copy dist/niri/keywarden.kdl next to your niri config and add include "keywarden.kdl". It binds:

Mod+Shift+P { spawn "keywarden-ui" "--launcher"; }   // launcher
Mod+Shift+A { spawn "kw" "autotype"; }               // autotype
Mod+Shift+Alt+L { spawn "kw" "lock"; }               // lock

Settings, This computer, shows the exact instructions for the system you are on.

Browser extension

The extension fills logins, picks an account when there are several, fills 2FA codes, offers to save new and changed passwords and suggests a generated password on sign-up forms. It never fills invisible fields. A form inside a frame is filled only when the frame comes from the same address as the page itself; frames from other addresses are ignored.

Install

  1. Install the extension: Firefox from Firefox Add-ons. For Chromium-based browsers it is not in the store yet: unpack the zip from the release, open chrome://extensions, turn on Developer mode and load the unpacked folder.
  2. Register the host so the browser can reach Keywarden. The Linux installer does it; otherwise run kw browser-setup. For Chromium-based browsers pass the extension id shown on chrome://extensions: kw browser-setup --chrome-id <id>.
  3. Click the Keywarden icon in the toolbar and press Connect. Confirm in the Keywarden window.

If the browser does not connect

Run kw browser-setup --check. It checks each step (the host program, the background service, the link file of every browser it finds) and names the one that is broken. kw browser-setup repairs the link files; restart the browser afterwards.

Confirmations

Confirmation window asking to fill a login on github.com

The first time a site asks for a login, Keywarden shows a confirmation over all windows: Enter allows once, Ctrl+Enter always for this site, Esc denies. Sites are matched by registrable domain using the Public Suffix List, so login.example.com and example.com share logins but example.co.uk and other.co.uk do not.

The browser and Keywarden use an encrypted channel (the same crypto_box scheme as KeePassXC-Browser); the host in between only forwards opaque messages. Every automatic behavior can be turned off in the extension settings.

Shortcut in the browser: Ctrl+Shift+L fills the login on the current page.

Sign-in in the browser dialog

Some sites ask for a login and password in the browser's own dialog (HTTP Basic). Turn on Sign-in in the browser dialog in the extension settings and Keywarden answers it with the entry for that site. The browser asks for an extra permission at that moment; nobody who leaves the switch off is asked. Only the page itself is answered, never an image or a frame from another site.

A third field in the sign-in form

Some sites ask for more than a login and password: a last name, a client number, a contract number. Add a field to the entry named KPH: plus the name of the box (for example KPH: Last Name for a box labelled or named last_name) and it is filled together with the login. The prefix is the one KeePassXC uses, so such entries work in both. The part after it is compared without case, spaces and punctuation. Fields without the prefix are never given to a page. Hidden (protected) fields are never sent this way, and it works when you pick the account in the menu under the field.

Cards and personal details

On payment and address forms a menu under the field lists your Card or Identity entries. The chosen entry fills the whole group of fields: number, cardholder, expiry in the format the form expects, CVC, name, address. It works on https pages only and only after you confirm it for the site in the Keywarden window. Payment forms embedded as a third-party frame are left alone.

Right-click menu

The Keywarden item in the page menu: fill login and password (even where the form was not recognised), copy the username, password or 2FA code, fill a card or personal details, generate a password into the field under the cursor.

When the vault is locked

A sign-in is not lost: instead of "Save password?" you get "Unlock Keywarden to save this password", and the usual offer after unlocking. Passkeys work the same way: the site asks for a passkey, the extension offers to unlock and then continues the sign-in.

Which pages an entry is offered on

The login editor has an "In the browser" list: whole site with subdomains (default), this site address only, address starts the same, exactly this page, do not offer in the browser. The rule is stored in the entry as a plain URL Match field and travels with the vault.

Fill when the page opens

Off by default, turned on in the extension settings. It fills without a click on https only, only for sites you already allowed for the entry, and only when the site has a single entry. The risk: a compromised site could read the password without any action from you.

Passkeys

When a site offers to create a passkey, the extension handles it and stores the key in your vault in the KeePassXC format (KPEX_PASSKEY_* fields), so KeePassXC can use the same passkeys. Signing in with a passkey asks for your confirmation like any other login. Keys use ES256, which nearly every site requires; for anything else the browser's own WebAuthn takes over.

2FA codes

2FA codes page

The 2FA codes section works like an authenticator app: live codes with a countdown, the next code shown near the end of a period, click to copy.

kw totp github -c     # copy the current code
kw otp qr github      # show the QR in the terminal

Autotype

Autotype types into the active window: by default username, Tab, password, Enter. An entry can have its own sequence in KeePass syntax, like {USERNAME}{TAB}{TAB}{PASSWORD}{ENTER}, and window associations that pick the right entry by window title. Into a window listed in the entry Keywarden types straight away. When the entry is found only by its name or site in the window title, it asks you to confirm first: any web page can put a familiar word into its title. Keywarden checks that the focused window has not changed before typing.

kw autotype           # entry for the active window
kw autotype github    # a specific entry
SystemHow it types
niriwtype, the active window comes from niri
Sway, other wlrootswtype; pick the entry in the launcher
X11xdotool
GNOME on Waylandnot possible: GNOME does not let apps type into other windows
WindowsSendInput
macOSneeds the Accessibility permission, and Screen Recording to read window titles

SSH agent

Keywarden is an SSH agent: keys live in entries of type SSH key, the agent offers them while the vault is unlocked and forgets them when it locks. The private key never touches the disk. Everything lives on the Settings, SSH tab: agent status and a Connect to all programs button on top, keys still sitting on disk below, then behavior. Every part can be turned off there.

Get a key in

Works for every app

Press Connect to all programs (or run kw ssh-setup): Keywarden puts SSH_AUTH_SOCK into the session environment, so ssh, git, IDEs and git clients see the agent after the next login. On Linux this is ~/.config/environment.d, on macOS a LaunchAgent, on Windows the user environment. Settings shows whether it is active or another agent (like GNOME's gcr-ssh-agent) holds the variable. In terminals that are already open:

# bash, zsh
eval "$(kw ssh-env)"
# fish
kw ssh-env | source
# PowerShell
kw ssh-env | Invoke-Expression

The right key for each server

Put the server into the key's Host field (github.com, git@host, ssh://user@host:2222, several separated by commas) and turn on Servers in ssh (kw ssh-setup --hosts). Keywarden keeps ~/.ssh/keywarden/config with IdentitiesOnly yes for each host and includes it from ~/.ssh/config with one line. ssh then offers exactly one key instead of trying them all, so "Too many authentication failures" goes away.

SSH servers in the vault: settings travel to every computer

An SSH server entry holds what usually lives in ~/.ssh/config: the address (user@host:port), which vault key to log in with, ProxyJump, port forwarding (8080, 5432:db:5432), any other ssh_config lines separated by ;, and a port knocking sequence. The entries sync with the vault, and with Servers in ssh on, Keywarden writes them as Host blocks into ~/.ssh/keywarden/config, so ssh prod, scp, rsync, git and IDEs see them as ordinary hosts. Your ~/.ssh/config stays as it is (apart from one Include line), and when a name exists in both, the vault entry wins.

To move what you already have: the Servers from ~/.ssh/config card on the SSH tab (the window shows which folder and key each host gets; untick what you do not need), or kw ssh-import-config. Every Host without wildcards becomes an entry in the "SSH" folder; sort them into your own subfolders afterwards. An IdentityFile that is already in the vault (matched by public key) becomes a link to that entry; otherwise the IdentityFile line stays among the other lines. Hosts imported earlier are skipped.

Port knocking. Put the ports into the Port knocking field: 7000 8000:udp 9000 (tcp unless :udp). Keywarden adds Match originalhost prod exec "kw knock prod" to the config, so ssh knocks by itself before connecting, for scp and rsync too. The sequence stays encrypted in the vault and is never written to files; while the vault is locked, no knock happens. You can run kw knock prod by hand, and kw ssh knocks by itself even with Servers in ssh off.

Locked vault

When ssh needs a key and the vault is locked, Keywarden shows its unlock window; after you unlock, git push continues by itself.

Confirmations

A key can ask before every use. The window says where you are signing in, for example "Signing in to github.com with GitHub" (OpenSSH 8.9+), warns when the request came through agent forwarding, and offers Allow for 15 min so a series of git fetch does not ask each time. Locking the vault cancels that.

Sign git commits

The Sign git commits and tags with this key switch on an SSH key entry (or kw ssh-git-sign GitHub) sets up git to sign with SSH through the agent; GitHub and GitLab show the commits as Verified. Turning it off removes the settings again.

Pick a server in the terminal: kw ssh

kw ssh opens two panes in the terminal: folders on the left, hosts on the right, details of the selected one below (key, ProxyJump, command). Vault folders are used as they are; hosts from ~/.ssh/config share one folder; servers that sit right in the vault's "SSH" folder are listed without a folder row. Space folds a folder. kw ssh never reads private keys. Keys: Enter connect in this terminal, o open in a new window, s sftp, f port forward, c copy the command, e and n edit or add an address of a vault key, / search all folders, ? all keys. kw ssh prod connects straight away when there is one match; kw ssh --list prints the list for scripts. If the vault is locked, kw ssh asks for the master password.

 Keywarden SSH   / search
╭ Folders ─────────────────╮╭ prod ───────────────────────────────╮
│◆ All hosts            9  ││› prod-api   deploy@10.0.1.5        │
│• Work                 2  ││  prod-db    root@10.0.1.9:2222     │
│▾ ~/.ssh/config        7  ││                                    │
│    prod               2  ││                                    │
│    web                3  ││                                    │
╰──────────────────────────╯╰────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────╮
│prod-api  deploy@10.0.1.5                                       │
│key: id_work  •  via bastion                                    │
│~/.ssh/config / prod, read only  •  ssh prod-api                │
╰────────────────────────────────────────────────────────────────╯
 Enter connect  o new window  c command  / search  ? all keys

Connect from the launcher

Search for an SSH key with a host and press Enter: a terminal opens with ssh to that server. Keywarden finds ghostty, kitty, foot, alacritty, WezTerm, GNOME Terminal, Konsole or xterm (Terminal on macOS, Windows Terminal on Windows); pick another one on the SSH tab, Terminal row.

ed25519, ECDSA and RSA keys are supported; entries keep KeeAgent settings, so KeePassXC sees the same keys.

Sync

Sync settings

Keywarden syncs through files. Put the vault into a folder synced by Syncthing, Nextcloud, Dropbox or anything else, and open the same file on your phone with KeePassDX (Android) or KeePassium (iOS).

When the file changes on disk while the vault is open, Keywarden merges it entry by entry: newer edits win, deletions are respected, nothing is silently lost. Syncthing conflict copies are merged and moved to backups automatically, and you get a notification. If a merge would delete many entries at once, Keywarden asks first. Step by step, with every option: sync page.

WebDAV. Without a sync app: Settings, Sync, WebDAV. Enter the file or folder address on your server (Nextcloud, Synology, any WebDAV), the username and the password; Keywarden checks them and then downloads and uploads the vault about once a minute and after each save. The setting is stored inside the vault, so another computer that opens it connects by itself. From the terminal: kw sync webdav https://cloud.example.com/remote.php/dav/files/anna/ -u anna.

A new computer. You do not have to carry the vault file by hand. On the computer that has the vault open Settings, Sync and click Show code (or kw sync offer). On the new one choose Get from another computer and enter the code (or kw sync receive CODE). The code is one-time, good for one attempt and 5 minutes; only the encrypted vault file travels over the network and existing files are never overwritten. The key file and YubiKey are not transferred. Port 47470 (TCP) must be open on the computer that has the vault.

On the same network. Turn on Exchange on every computer (or kw sync lan on). Computers with the same vault and password find each other and swap changes directly. Allow port 47470, UDP and TCP, in the firewall. On Linux the exchange runs only in trusted networks: the network where you turned it on is added automatically, and elsewhere Keywarden stays silent until you click Trust this network. A new computer in the exchange triggers a notification. Every incoming version, from a file, a server or another computer, goes through the same merge, mass-deletion check and log.

Import and export

From Settings, Transfer or the command line:

kw import bitwarden_export.json
kw export ~/backup.kdbx -f kdbx
kw merge ~/old-laptop.kdbx

Several vaults

Each vault gets its own daemon, called a profile. Switch between open vaults with the selector at the top of the sidebar or Ctrl+Tab; the launcher searches all of them.

kw profile-add work ~/Work/work.kdbx
kw --profile work unlock
kw profiles

On Linux each profile is a systemd unit: systemctl --user start keywardend@work.

Backups and safety

Secret Service (Linux)

Keywarden can replace gnome-keyring or KWallet as the system keyring (org.freedesktop.secrets): apps that store tokens in the keyring then keep them in your vault, in a separate folder, and Keywarden asks before an app reads a secret.

  1. In Settings, Keyring press "Move from the current keyring".
  2. Disable the secrets component of gnome-keyring and restart keywardend. Keywarden never takes the name over by force.

kw command line

kw --help and kw <command> --help describe every option. The most used commands:

kw unlock [--db PATH] [-k KEYFILE]     kw lock     kw status
kw search QUERY                        kw show QUERY [-r]
kw copy QUERY [-f password|username|totp|FIELD]
kw totp QUERY [-c]                     kw generate [-l 24] [-p -w 6] [-c]
kw add -t login|card|identity|note|ssh-key|ssh-host --title ...
kw edit ...   kw rm ...   kw dup ...   kw mv ...   kw tags
kw groups     kw mkgroup A/B           kw attach / kw attachment
kw health [--breaches]                 kw icon QUERY
kw import FILE   kw export PATH [-f csv|kdbx|2fas]   kw merge FILE.kdbx
kw ssh-import FILE [--confirm]         kw ssh-env
kw ssh-import-config                   kw knock NAME
kw otp set|scan|qr                     kw autotype [QUERY]
kw passwd [-k KEYFILE]   kw keyfile PATH   kw db-settings [--tune]
kw profiles   kw profile-add NAME FILE.kdbx   kw --profile NAME ...
kw browser-setup [--chrome-id ID] [--check]   kw new PATH

Platform support

FeatureLinuxWindowsmacOS
Window, launcher, kw, extension, syncYesYesYes
Launcher over all windowsYeslayer-shell on niri, Sway, KDE; centered window elsewhereYesYes
Clipboard hidden from historyYesYesYes
AutotypeMostnot GNOME on WaylandYesYes
Lock on screen lock and sleepYessystemd-logindYesYes
SSH agentYesYesYes
YubiKeyYesBetavia system HIDBetavia system HID
Tray iconYesKDE, waybar, noctalia; GNOME needs the AppIndicator extensionYesNot yet
Start at loginYessystemd serviceYesWindows startupYesLaunchAgent

Security model

What Keywarden protects against: other users on the machine, websites, other browser extensions, malware that reads files but cannot run as you, clipboard history and cloud clipboard, crash dumps, swap, and data loss from crashes or sync conflicts.

What it does not protect against: malware already running as your user while the vault is unlocked. It can read the screen, the keyboard and process memory; no local password manager can stop that. Lock the vault when you step away.

Found a problem? Please report it privately, see SECURITY.

Local API

A separate socket lets assistants and scripts work with the vault without ever seeing a secret: list entries, put a secret into the clipboard, or create an entry from the clipboard. The protocol is one JSON line per request; see docs/local-api.md.

FAQ

Can I keep using KeePassXC?

Yes. Both apps read and write the same file, even at the same time: Keywarden merges changes KeePassXC makes while the vault is open.

Where are settings stored?

Linux: ~/.config/keywarden. macOS: ~/Library/Application Support/Keywarden. Windows: %APPDATA%\Keywarden.

Is there a mobile app?

Not yet. Use KeePassDX on Android or KeePassium on iOS with the same synced file.

How do I change the language?

Settings, General, Interface language: system default or any available language. The window switches at once; the background service follows after a restart. The browser extension follows the browser language.

Can I help translate Keywarden?

Yes, please. Any language can be added without touching the code, and a partial translation already helps: whatever is not translated yet appears in English. See docs/translating.md.