How to use Deadbolt, a peer-to-peer password manager in Rust
By Flavio
Install Anomaly's Deadbolt on macOS or Linux, pair devices over iroh with no cloud account, run commands with brokered secrets, send one-time links, and connect AI agents over MCP.
Most password managers ask you to create an account on someone else’s server, before you can save a single login. Your vault is encrypted before it leaves your machine, sure, but you still depend on a company’s cloud to sync your devices, manage your subscription, and stay online.
Deadbolt by Anomaly (the team behind OpenCode) is taking a completely different route. It’s an open-source, MIT-licensed password manager written in Rust where your devices sync directly with each other over iroh, with no accounts and no central server.
I installed the dev build (deadbolt 0.0.0-dev-278) on my MacBook Pro to put it through a real test: creating a vault, pairing a second local device over iroh, auditing passwords offline, brokering API keys into a shell command without letting the child process see the real token, sending a one-time peer-to-peer secret link, and inspecting its built-in MCP server.
Deadbolt is still in alpha, so there is no stable release yet, and mobile apps are still in progress. But even at this stage, the CLI and secret-brokering design already solve problems I’ve been thinking about for months.
Let’s walk through how to install it, how the peer-to-peer model works, and how to use each part from the terminal.
How Deadbolt compares to hosted managers and .env files
Before we run any commands, it’s useful to see where Deadbolt fits in compared to tools you might already use, like 1Password or a local .env file.
| Feature | Deadbolt (0.0.0-dev-278) | Hosted managers (1Password / Bitwarden) | Plain .env file |
|---|---|---|---|
| Account or vendor server | None | Required (unless self-hosting Bitwarden) | None |
| Device sync | Direct peer-to-peer over iroh, plus optional blind S3, R2, or WebDAV remote | Vendor cloud | Manual copy |
| Device passphrases | Separate local passphrase per device (plus Touch ID on macOS) | One master password across devices | None (plaintext on disk) |
| Command secret injection | deadbolt run, inject, and read with output masking and process taint | op run / op inject / 1Password Environments | Loaded directly into process.env |
| HTTP / AWS secret brokering | Built in via deadbolt run --broker and deadbolt ask | Not built in for arbitrary local CLI routes | None |
| AI agent MCP server | Built in (deadbolt mcp), returns metadata and deadbolt ask commands, never raw values | Separate integrations | Agents can read .env directly |
| Mobile apps & Safari AutoFill | In progress (macOS, Linux, Chromium unpacked extension today) | Mature across desktop and mobile | N/A |
| License | MIT | Proprietary (1Password) / AGPL-3.0 (Bitwarden) | N/A |
Notice one architectural choice in that table that caught my eye right away.
Every device you pair has its own local passphrase (wrapping its own local 256-bit device root key) instead of sharing one master password across your machines.
Install Deadbolt
Because Deadbolt has not cut a stable release yet, the install script needs DEADBOLT_CHANNEL=dev to pull the latest build from the dev branch.
Run this in your terminal on macOS or Linux (x64 or arm64):
curl -fsSL https://deadbolt.pw/install | DEADBOLT_CHANNEL=dev sh
The script checks the SHA-256 hash of the download and installs deadbolt in ~/.local/bin (you can override the target directory with DEADBOLT_INSTALL).
On my Apple Silicon Mac, it installed 2 binaries in that folder: deadbolt (24 MB) and deadbolt-enclave (143 KB, the tiny signed helper that talks to Apple’s Secure Enclave to quickly unlock using Touch ID).
You can also install the CLI using Bun or npm:
bun add -g @deadbolt/cli@dev
# or
npm i -g @deadbolt/cli@dev
If you want the native desktop app on macOS, Anomaly ships a universal Deadbolt.app DMG from the repository README.
On Linux with glibc 2.28+, deadbolt app opens the desktop UI from the same install.
Check that the CLI is on your PATH:
deadbolt --version
Create your first vault and recovery kit
Everything in Deadbolt talks to a local background daemon over a Unix domain socket. You don’t need to start it by hand, as the first command will start it for you.
Let’s initialize a vault named personal, and give this machine a clear name so we can recognize it later when pairing other devices:
deadbolt init personal --device-name macbook-pro
When you run init in an interactive terminal, Deadbolt will ask for a local passphrase for this device (it will reject passphrases shorter than 8 characters, and it checks the strength of the passphrase using zxcvbn).
For scripts or tests, you can pass --passphrase-stdin or set DEADBOLT_PASSPHRASE.
Once it finishes, check the daemon state with deadbolt status:
deadbolt status
Here’s what deadbolt init and deadbolt status printed in my terminal:

See those 24 words printed during init? That’s your recovery kit. Deadbolt only shows those words once.
Unlike a cloud password manager, there is no “Forgot password” link, and there’s no vendor database that has a copy of your vault. Those 24 words derive a top-level recovery key (class = 0) that outranks every individual device.
If you ever lose all your devices, those 24 words (and a copy of your encrypted vault frames, for example from a blind S3 or Cloudflare R2 remote) are what you’ll use to run deadbolt recover and rebuild the vault from scratch.
If you look at the Deadbolt data directory on disk, every folder is locked to 0700 and every file to 0600 (if file permissions in the terminal are unfamiliar, my free CLI Handbook covers chmod, pipes, exit codes and more in detail).
Inside v/<vault-id>/ you will find members.log (signed membership events) and wal-0.log (signed, XChaCha20-Poly1305 encrypted vault frames).
You can lock and unlock the daemon from the terminal at any time, or set an inactivity timeout and turn on Touch ID quick unlock on macOS (backed by Apple’s Secure Enclave through deadbolt-enclave):
deadbolt lock
deadbolt unlock --timeout 15m
deadbolt touchid on
deadbolt touchid status
Add items and run an offline password health audit
Deadbolt supports 18 item types out of the box: login, card, note, ssh, identity, passkey, api, database, server, wifi, license, bank, document, passport, driver-license, membership, crypto and id-document.
When you create a login without a password= argument, Deadbolt will generate a 24-character strong password for you.
Let’s add 5 realistic items, 2 of which are logins that reuse the same password, so we can see how the offline health audit will react:
deadbolt new login --name "GitHub" username=flavio url=https://github.com
deadbolt new api --name "Stripe Live" credential=sk_live_demo_9f8a7b6c5d4e3f2a1b0c username=billing-worker type=bearer host=api.stripe.com
deadbolt new login --name "Staging Admin" username=admin password=summer-2026-login url=https://staging.flaviocopes.com
deadbolt new login --name "Old Forum" username=flavio password=summer-2026-login url=https://old-forum.example.org
deadbolt new database --name "Analytics DB" type=postgres host=db.internal port=5432 database=analytics username=readonly password=pg-demo-secret-7741
Each deadbolt new command prints a 4-character hex short ID (e.g. 01cc or 9ee1). You can refer to items using their title or their short ID.
Now list your items, inspect one of them, and run deadbolt health --all:
deadbolt ls
deadbolt show "GitHub"
deadbolt health --all
Here is the actual output from my vault:

Two nice touches show up right away:
deadbolt showalways masks secret fields (••••••••) so you don’t leak passwords into your terminal scrollback when checking a username or URL. To read a raw field when you actually need it, you rundeadbolt get "GitHub".deadbolt health --allruns 100% offline inside the daemon usingzxcvbnand a ~292 KB bundled directory of sites. It caught the reused password betweenOld ForumandStaging Admin, noticed thatGitHubsupports authenticator codes and passkeys, and completely ignored theStripe LiveAPI credential instead of nagging about an API key not looking like a human password.
If you also want Have I Been Pwned breach checks, that part is opt-in (deadbolt health --online or deadbolt health breaches enable), using padded k-anonymity range queries so your actual password never leaves your machine.
If you open Deadbolt.app against the same daemon, those same 5 items and health warnings show up in a native desktop interface built in Rune:

Notice that the desktop app is just a thin client talking to the same background daemon. Quitting the app leaves the daemon running, and locking from either the app or the CLI wipes cached secrets on both sides immediately.
If you are migrating from an existing manager, deadbolt import detects the format automatically from 1Password .1pux exports, Apple Passwords CSVs, Bitwarden .json exports, or generic CSVs.
Pair a second device peer-to-peer over iroh
Because there is no central login, adding a laptop, desktop, or Linux server works like pairing 2 Bluetooth devices, except it works over the internet through iroh.
Here’s how the sync architecture fits together:
To test this for real, I spun up a second completely isolated Deadbolt home directory (DEADBOLT_HOME) on the same machine, gave it a different local passphrase, and ran deadbolt join:
deadbolt join --device-name linux-workstation
It printed a single-use five-word code valid for 5 minutes and waited:
Code: input-radar-mercy-arctic-joy
On a device with your vault, run: deadbolt approve input-radar-mercy-arctic-joy
waiting…
Back on the first device (macbook-pro), I approved that code:
deadbolt approve input-radar-mercy-arctic-joy
About 3 seconds later, the first device printed ✓ added "linux-workstation" to personal, the second device printed ✓ joined "personal" from macbook-pro, and running deadbolt ls on the second device immediately listed all the 5 items we created before.
You can check which devices belong to your vault at any time:
deadbolt devices
And if you ever remove a lost laptop, Deadbolt rotates the vault’s encryption epoch so future writes are unreadable to the removed device.
What if your two machines are rarely online at the same time? That is what deadbolt remote is for. You can point a vault at your own S3 bucket, Cloudflare R2 bucket, MinIO instance, or WebDAV folder:
deadbolt remote set s3 --help
The remote is strictly blind. It only ever stores signed, encrypted DBF2 frames and immutable checkpoint packs. Never plaintext items, field names, or keys.
It gives you offline catch-up between devices, and a durable copy of your encrypted frames for disaster recovery, without handing your data to a SaaS vendor.
Pass secrets to commands without leaking them
This is the part of Deadbolt that made me want to try it in the first place.
If you read my guide on managing secrets on your own infrastructure, you know I hate leaving raw API keys in plaintext .env files on my laptop.
Deadbolt gives you 4 different ways to hand secrets to commands, each one tightening the boundary a little bit more.
| Command | What the child process sees | Output masking | Can child call deadbolt get? | Best fit |
|---|---|---|---|---|
deadbolt read <ref> | Prints the raw value to stdout | None | Yes | Quick manual lookup or piping into another tool |
deadbolt inject -i tpl -o out | Writes a 0600 config file with resolved values | None | N/A (file written ahead of time) | Tools that only read a JSON, TOML, or YAML config file |
deadbolt run --env ... -- <cmd> | Real value in its env var | Replaces raw, URL-encoded, and base64 forms with <concealed by deadbolt> | No (blocked by daemon taint, exit code 4) | Normal CLIs and dev servers (bun run dev, gh) |
deadbolt run --broker / deadbolt ask | Fake db_ph_... placeholder + local 127.0.0.1 URL | Broker swaps header outbound and scrubs echoed secrets in responses | No (blocked by daemon taint, exit code 4) | Untrusted scripts and AI coding agents calling HTTP or AWS APIs |
References follow the format deadbolt://[vault/]item/field.
The vault defaults to your default vault, and the item can be its title or short ID.
1. Inject config files with 0600 permissions
When a tool is stubborn and insists on reading a file on disk, keep a safe template (config.tpl) with {{ deadbolt://... }} placeholders:
{
"database": {
"host": "db.internal",
"password": "{{ deadbolt://personal/Analytics DB/password }}"
}
}
Then render it with deadbolt inject:
deadbolt inject -i config.tpl -o config.json
Deadbolt writes through a 0600 temporary file, and renames it into place.
It also tracks the file inode and modification time in injected.json (without storing any secret values) so a future inject run will not clobber manual edits unless you pass --force.
2. Run commands with masking and process-tree taint
For environment variables, wrap the command in deadbolt run (or pass --env-file .env.tpl containing KEY=deadbolt://... lines):
deadbolt run --env STRIPE_KEY='deadbolt://personal/Stripe Live/credential' -- \
sh -c 'echo "len=${#STRIPE_KEY} value=$STRIPE_KEY"'
Deadbolt resolves the reference, passes the real value to the child’s environment (the child reports len=33), and masks stdout and stderr on the fly so accidental prints come out as <concealed by deadbolt>.
Even better is process-tree taint. Before deadbolt run spawns your command, it registers its own PID and process start time with the daemon. While that run is active, the daemon walks the parent process chain of every incoming request and refuses anything running underneath deadbolt run.
When I ran deadbolt get 'GitHub' inside a deadbolt run command, the daemon immediately blocked it with exit code 4:
error: process is running inside deadbolt run and cannot access daemon secrets
A script that you only gave your Stripe key to cannot quietly reach back into your unlocked daemon and dump your GitHub password.
3. Broker HTTP and AWS secrets so the child never holds them
deadbolt run still puts the real secret inside the child process memory.
If you are running a third-party script, or an AI coding agent, you might not want the child to have the real key at all.
That’s the exact problem we looked at in How AI agents can log in without seeing your passwords.
Add --broker and one or more --route rules, and Deadbolt spins up a locked-down local HTTP proxy on 127.0.0.1 for the duration of that single command:
I tested this against a tiny local Python HTTP server on port 18925 that echoed back the Authorization header it received, while restricting the route to method=GET and prefix=/v1/charges:
deadbolt run --broker \
--route 'stripe=http://127.0.0.1:18925,bearer=deadbolt://personal/Stripe Live/credential,env=STRIPE_KEY,base-env=STRIPE_API_BASE,method=GET,prefix=/v1/charges' \
-- sh -c '
echo "env: $STRIPE_KEY"
curl -s -H "Authorization: Bearer $STRIPE_KEY" "$STRIPE_API_BASE/v1/charges"
echo ""
curl -s -o /dev/null -w "disallowed /v1/customers -> HTTP %{http_code}\n" \
-H "Authorization: Bearer $STRIPE_KEY" "$STRIPE_API_BASE/v1/customers"
'
Here are those 3 tests (masking, taint isolation, and live brokering) running in my terminal:

Look closely at the broker output, because 3 subtle things happened at once:
- Inside the child shell,
STRIPE_KEYwasdb_ph_2880afbd7f1d75bcc0852c81f1d7af63, a random placeholder generated for that single run. On the upstream side (I verified by logging the header to a file on the server), the realBearer sk_live_demo_9f8a7b6c5d4e3f2a1b0carrived intact. - When my test server deliberately echoed the real token back inside its JSON response body, the broker caught it and scrubbed it to
*********************************before returning the body tocurl. - Requesting
/v1/customers, which was outsideprefix=/v1/charges, got rejected locally withHTTP 403before anything left the machine.
The broker also checks that the TCP socket that connects to 127.0.0.1 actually belongs to the child’s process tree (using proc_listchildpids on macOS, and netlink socket diagnostics on Linux), so another process on your machine that peeks at ps eww still gets 403.
And besides Bearer and custom headers (like Anthropic’s x-api-key), --route supports AWS SigV4 signing (sigv4=us-east-1/s3) so aws s3 cp works without ever holding real AWS keys.
Connect AI coding agents safely with deadbolt mcp
Deadbolt ships a local stdio MCP server out of the box.
In Claude Code, you register it with one command:
claude mcp add deadbolt -- deadbolt mcp
For Codex, Cursor, or any other client that reads a JSON MCP config, add a deadbolt entry pointing at the deadbolt binary:
{
"mcpServers": {
"deadbolt": {
"command": "deadbolt",
"args": ["mcp"]
}
}
}
Once connected, it exposes 5 read-only and broker-building tools:
deadbolt_status: checks whether the daemon is running and unlocked, its version, and vault count.deadbolt_list_vaults: lists vault names, IDs, and device counts.deadbolt_list_items: lists item titles, IDs, types, tags, and field names (plusdeadbolt://references), never field values.deadbolt_health_summary: returns offline password health counts and flagged items, never secrets or hashes.deadbolt_ask: generates adeadbolt askcommand for an HTTP API call so the agent runs the command through the local broker after you approve a quick confirmation card (or silently for vaults listed inauto_approve_vaultsinconfig.toml).
Not a single MCP tool can return a secret value. The agent discovers what items exist, builds a scoped deadbolt ask command, and runs its script against the placeholder broker, while the real credential never enters the model’s context window.
If you want to understand how stdio MCP servers work or build your own for internal tools, my free MCP Server Handbook shows you how to build and test them in TypeScript.
Share a secret or file peer-to-peer with deadbolt send
Sometimes you need to hand a staging database URL, a .env snippet, or a PDF to a coworker who does not use Deadbolt at all.
deadbolt send creates a one-time link, served from your machine daemon over iroh. Nothing is uploaded to a server. The encryption key is inside the URL fragment, after #, which is never sent by the browser in the HTTP request.
Here is how you pipe a secret from stdin, with a 10 minute expiry:
printf 'postgres://readonly:pg-demo-secret-7741@db.internal:5432/analytics' | \
deadbolt send - --title "Staging DSN" --ttl 10m --yes
That prints a https://deadbolt.pw/r#... link. The recipient can either open that URL in any browser (the page runs a small WebAssembly iroh client locally, connects only after they click Receive so chat link previews don’t burn the one-time open, and decrypts in the browser) or run deadbolt receive in a terminal, with no vault or daemon needed:
deadbolt receive 'https://deadbolt.pw/r#...'
I tested receiving the link once, and then I ran deadbolt receive a second time, and then deadbolt activity to see the audit log:

The first deadbolt receive fetched the 194-byte encrypted bundle from my local daemon, and printed the connection string.
The second time I tried, I got error: this link was already used.
Look at the bottom of that screenshot too. deadbolt activity keeps a local encrypted audit log of every request, including the process ancestry (zsh › deadbolt), the action (send-create, resolve-run, item-get), and if it was allowed or refused, without ever recording a secret value.
Set up the Chromium browser extension
If you want autofill in Chrome, Brave, Arc, Edge, Chromium or Helium, Deadbolt will connect the browser extension to your local daemon using native messaging.
Pick an empty folder for the unpacked extension, register it, and let deadbolt update download the extension bundle into it:
deadbolt browser install --extension-dir ~/deadbolt-extension
deadbolt update
Then open chrome://extensions, turn on Developer mode, click Load unpacked, and select ~/deadbolt-extension.
Every time you run deadbolt update in the future, it refreshes both the CLI/app and the extension directory, and you just click reload on the extension card.
How I would use Deadbolt (and where it falls short today)
I am not going to replace my daily password manager with an alpha tool tomorrow morning, and here is why.
Right now, Deadbolt is a poor fit if you need mobile autofill on iOS or Android, or if you live in Safari on macOS. Both mobile apps and Safari AutoFill are still not in releases. Loading an unpacked Chromium extension also adds friction compared to a Chrome Web Store install. And because deadbolt send serves links directly from your running daemon, closing your laptop lid kills any active share until you reopen it (or until store-backed S3/R2 sends get wired into the CLI).
There’s also a real responsibility trade-off with a no-server design. If you never attach a blind S3 or R2 remote and you lose your only laptop, your 24-word recovery kit alone cannot resurrect frames that no longer exist anywhere. You need both the words and at least one surviving copy of the vault frames (another paired device or a blind remote).
Where I would use Deadbolt right now is as a developer and AI-agent secrets vault on my Mac:
- Store API keys for local scripts, Cloudflare deploys, and model providers in a dedicated
agentvault instead of scattering.envfiles across~/dev/. - Wrap coding agent tool calls and local evaluation scripts in
deadbolt run --broker(or wiredeadbolt mcpinto Claude Code and Codex) so an agent can hit a specific API path without ever seeing the raw bearer token in its environment or context window. - Attach a private Cloudflare R2 bucket with
deadbolt remote set s3so a second Mac or Linux workstation can catch up even when the first machine is asleep, while R2 only ever holds encrypted frames. - Use
deadbolt sendfrom the terminal whenever I need to pass a temporary key or file to someone without pasting it into Slack or email.
Once the mobile apps ship and deadbolt hits a stable 1.0 release, this has all the pieces to replace a hosted password manager completely.
Even in alpha, the local secret broker, process taint isolation, and zero-secret MCP server already feel like how developer password managers should have worked from the start.
Want me to talk about your product? You can sponsor this site.
Related posts about security: