When you turn on two-factor authentication, most services hand you a list of eight to ten recovery codes and tell you to “store them somewhere safe”. Then you are on your own. People screenshot them, email them to themselves, print them and lose the paper, or paste them into a note called “codes”. This page gives a plain answer, then covers the other secrets that end up in the same messy places: API tokens, SSH keys and software licence keys.
What recovery codes are for
A recovery code is a one-time password that skips your second factor. You need one when the second factor is gone: the phone with your authenticator app was lost, broken or reset, or the security key is missing. Each code works once.
That tells you where they should not live: only on the device they replace. Codes stored only on your phone are no help on the day the phone is in a river.
The question that decides it
Recovery codes protect against losing your second factor. The worry with keeping them in your password manager is that one stolen vault would then hold both factors. So ask what you are protecting against:
| Situation | Codes in the password manager | Codes printed, kept at home | Codes in both |
|---|---|---|---|
| Phone lost or reset | Works | Works | Works |
| Password manager vault stolen and cracked | Both factors exposed | Safe | Exposed for the codes in the vault |
| You forget the vault’s master password | Codes locked away too | Works | Works |
| House fire or move | Works | Lost | Works |
| Someone in your home | Safe | Exposed | Exposed |
For most people the realistic risk is losing a phone, not a targeted attack on their vault, and the encrypted vault is far safer than an email to yourself or a screenshot in your photos.
Our recommendation:
- Keep recovery codes in your password vault, as their own item next to the login they belong to, so you can find them on the bad day.
- Print the codes for the two or three accounts that unlock everything else: your main email, your Apple Account or Google account, and your password manager itself. Keep the paper somewhere you would find it after a year of not looking.
- Never keep codes only on the phone that holds your authenticator.
A strong master password matters more than any of this. A vault stolen from a company’s servers, as happened to LastPass users in 2022, is attacked offline, guess after guess. A long passphrase makes that hopeless.
Keep track of which codes you have used
Each code works once, and people forget which ones are spent. Cross them off on paper, and in your vault keep them as a list you can tick off. Lockwell has a Recovery codes item type for this: paste the list a service gives you, and tick each code as you use it.
When you use the last few, generate a new set on the service’s security page; that cancels the old list. Replace the item and the paper copy at the same time.
API tokens and keys
Developers collect secrets that are not passwords: API tokens, database URLs, SSH keys and
their passphrases, signing keys. They tend to end up in .env files, shell history and old
chat messages.
- For running code, a secret belongs in your platform’s secret store or environment variables, never committed to a repository.
- For you, the person, keep a copy of each token in your password vault with what it can reach, which project it belongs to and when it expires. When a token leaks, you need to know in a minute which one it was and where to revoke it.
- SSH keys: the private key file stays in
~/.sshwith a passphrase; the passphrase, and a note of which servers trust the key, belong in your vault.
Lockwell has API token and Key item types with fields for exactly this, and its quick panel (Control-Option-Space) lets you copy a token without opening anything.
Software licence keys
Licence keys are the secret people lose most often, usually when moving to a new Mac. The purchase email is buried, the shop closed or the account is gone. Store each key with the registered email, the order number and the purchase date: the three things support asks for. Lockwell’s Licence key item has those fields.
Wi-Fi passwords
The Wi-Fi password is the one guests ask for. Keep it in your vault, and use an app that can show a QR code so a phone joins by pointing its camera. Lockwell draws one for every Wi-Fi item, on your Mac.
Questions
Is it safe to keep recovery codes in the same vault as passwords? For most people, yes: it is far safer than the alternatives people actually use. Add a printed copy for the accounts that matter most.
Should I screenshot recovery codes? No. Screenshots sync to photo libraries and cloud backups, where they sit unencrypted for years.
What about a password manager’s own recovery? If your password manager offers an emergency kit or recovery code, print it and keep it with the other paper codes. Lockwell offers a printable recovery code when you create a vault; without it, a forgotten master password cannot be recovered by anyone, including us.