How to Back Up Your Nostr Private Key Safely

Practical ways to back up a nostr private key (nsec) and check that the backup works.

If you want to know how to back up your nostr private key safely, start with one fact: on nostr your identity is a key pair, and nobody can reset it for you. There is no account recovery email and no support desk. Whoever holds the private key controls the identity, and if the key is lost, the identity is gone with it.

What the private key actually is

A nostr identity consists of two numbers. The public key (shown as an npub) is what other people follow and verify. The private key (shown as an nsec) signs every note, profile update and article you publish. Clients read the signature to prove that a post really came from you.

Because the private key is just a string of characters, it can be stored in many ways. That is both the convenience and the danger: anything that can read the string can impersonate you.

Choose a backup method

There are a few common approaches, each with different trade-offs.

  • Password manager. A reputable password manager stores the nsec encrypted, syncs across devices and is protected by one strong master password. This is the easiest option for most people.
  • Paper copy. Writing the nsec or a QR code on paper keeps it offline. Store it somewhere dry and private, and consider a second copy in a different place in case of fire or water damage.
  • Encrypted file. Saving the key inside an encrypted archive or an encrypted disk image keeps it digital but protected. Keep the passphrase separate from the file.
  • Hardware signer or browser extension. Signer extensions and dedicated signing devices keep the key out of the client itself, so individual apps never see it. You still need a backup of the key behind the signer.

What to avoid

Some habits make a backup worse than no backup at all.

  • Do not keep the nsec in a plain text note, an unencrypted cloud folder or an email draft.
  • Do not paste it into websites or chat messages. A legitimate client never needs you to send the key to a person.
  • Do not store the only copy on the same device you use every day. A broken phone should not mean a lost identity.

Check that the backup works

A backup is only useful if it restores. After saving the key, test it on a client you do not normally use: log in with the stored nsec and confirm that the public key matches the npub you already use. Then log out of the test client and remove the key from anything you do not trust.

If a key is exposed

If you suspect that your private key has been seen by someone else, treat the identity as compromised. Create a new key pair, announce the change from other channels where followers know you, and stop using the old key. Because nostr has no central authority, there is no way to revoke the old key for everyone, so prevention matters more than recovery.

Summary

Back up your nostr private key in at least two separate places, keep at least one of them offline or encrypted, test the restore once, and never share the nsec with anyone. These small steps cost a few minutes and protect an identity that cannot be rebuilt.


Write a comment