Alex Gleason
Alex Gleason
Home About RSS Feed πŸ“‘ Admin
← Back to all articles

Restore your follow list with nak

Jun 15, 2024 • 2 min read

Uh-oh, you just followed someone on a new Nostr client, and it wiped your entire follow list!

Let's use nak to check if an older version of your follow list still exists somewhere on the network:

sh
nak req -k 3 -a YOUR_PUBKEY wss://relay.example.com
  • Replace YOUR_PUBKEY with your hex pubkey (run nak decode <npub> to get it).
  • Replace wss://relay.example.com with a real relay. Keep trying different relays until you find it.
  • If you've set up NosDrive, make sure to check there too, as it backs up all versions of your replaceable events.

Once you've found your follow list on a relay, let's sign a new event and republish it:

sh
nak req -k 3 -a YOUR_PUBKEY wss://relay.old.com | jq -c '{kind, content, tags}' | nak event --sec YOUR_SECKEY wss://relay.new.com
  • Replace YOUR_PUBKEY with your hex pubkey.
  • Replace YOUR_SECKEY with your hex secret key (run nak decode <nsec> to get it).
  • Replace wss://relay.old.com with the relay where you found your follow list.
  • Replace wss://relay.new.com with any relay where you want to create your new follow list.

If this succeeded, go ahead and run history -c to clear your terminal history, since you copied your private key into the terminal session.

Now you can copy the new follow list to any additional relays:

sh
nak req -k 3 -a YOUR_PUBKEY wss://relay.new.com | nak event wss://relay.other.com

Run this any number of times, replacing wss://relay.other.com each time.

That's it! πŸŽ‰

If you couldn't find your event, you may be out of luck.

To learn more about syncing data with nak, read Sync your data between relays with nak.

Alex Gleason

Alex Gleason

I create software that empowers people online. I'm vegan btw.

alex@gleasonator.com
About Author
Alex Gleason
Alex Gleason βœ“ alex@gleasonator.com

I create software that empowers people online. I'm vegan btw.

Comments & Discussions (0)

Decentralized replies powered by Nostr (NIP-22 / NIP-10)
Loading Nostr comments...
🏷️ Topics
No items in this list.