Nostr: How to Generate Your Keys Locally
Published on Oct 27, 2025, filed under development. (Share this on Mastodon or Bluesky?)
If, like me, you’ve found yourself needing to search if and how you could generate your private and public keys for Nostr on your own machine, then two pieces of information just helped me:
- Nostr uses Secp256k1.
- You can generate Secp256k1 keys using openssl. (The commands can be adjusted further, but I’m not the best person to advise on that.)
For self-verification using your own domain, you can add the generated public key to .well-known/nostr.json, like
{
"names": {
"NAME": "PUBLIC_KEY"
}
}
This worked for me to set up an account on Primal: j9t@meiert.com.
Why? I don’t know. I’m testing 🤷♂️
If I err with something—which I well might, given that I’ve had no idea of Nostr—please let me know so that I can update this post. Thanks!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve been working as a technical lead and engineering manager for companies you’ve never heard of and companies you use every day, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)
