kind 35128 · 2026-10-09 07:34 UTC
BACKUPNOSTR - Save your Nostr posts to your own computer.
Local-first backup for Nostr. Save every post to one JSON file, encrypt it with a password, restore it later. Single HTML file, no backend, no tracking, no analytics. Cloud is fragile. Local is resilient. WHAT IT DOES ------------ Backup. Connects to your relays, fetches every event you published, normalizes and deduplicates them, and writes them to one local .json file. Optionally encrypts the file with a password (NIP-49: scrypt + XChaCha20-Poly1305). Restore. Reads a local backup file, verifies every event's id and signature, and republishes the events to your write relays -- idempotently, with backoff, and with the correct NIP-42 AUTH flow where required. Verify. Re-fetches from relays and shows you what is missing, extra, or has changed since the backup. Everything runs in the page. Your nsec never leaves your browser. Works with NIP-07 browser extensions, NIP-46 remote signers, or a pasted nsec that stays in memory only. FEATURES -------- - Single .html file. No build step. No npm install. No CDN. Works from file:// after the first load. - Full relay catalog built in (~500 relays). Active WebSocket pool is capped at exactly 4 connections at a time, chosen by an intelligent scoring system that weighs pins, NIP-65 read/write markers, latency, uptime, event volume, auth/payment requirements, and recent failures. - Optional password encryption of the backup file using the same primitives as NIP-49 (scrypt + XChaCha20-Poly1305), so the file decrypts with a standard NIP-49 library. - Deterministic, byte-identical output for the same input set: sorted by created_at, then id, then kind. Replaceable and addressable events are normalized to the latest version per NIP-01. - Honours NIP-09 deletions, NIP-40 expiry, NIP-70 protected events, NIP-42 AUTH, and NIP-11 relay information documents. - First-login animated guided tour. Skippable, resumable, keyboard-navigable, screen-reader-friendly, respects prefers-reduced-motion, and remembers completion per identity. - Runs a self-test on boot that verifies SHA-256, HMAC-SHA256, PBKDF2, scrypt, ChaCha20, Poly1305, XChaCha20-Poly1305, secp256k1, BIP-340 Schnorr sign/verify, bech32, NIP-49 decrypt, and the 4-connection cap. GETTING STARTED --------------- 1. Download backupnostr.html (or clone this repo and open the file). 2. Open it in any modern browser. Double-click works -- no server required. 3. Paste your npub to back up a public key, or click "Use NIP-07" to connect a browser extension. 4. Click "Load NIP-65" to pull your relay list, or add relays manually. 5. Pick a preset, optionally set a password, click "Start backup". 6. The .json file downloads. That file is the deliverable. To restore: open the same page, set your identity, pick the file under Restore / Verify, and click Restore. Running it twice is safe. WHAT IS IN THE BACKUP FILE -------------------------- { "format": "backupnostr/v1", "created_at": 1700000000, "tool": { "name": "BackupNostr", "version": "1.0.0" }, "author": { "pubkey": "<hex>", "npub": "<bech32>" }, "relays": { "write": [...], "read": [...], "used": [...], "failed": [...] }, "preset": "everything-public", "counts": { "events": 12345, "by_kind": { ... }, ... }, "checksum": { "algorithm": "sha256", "events_canonical": "<hex>", "file": "<hex>" }, "encrypted": false, "events": [ ... ], "deleted_ids": [ ... ], "expired_ids": [ ... ], "rejected": [ ... ] } Encrypted backups use format "backupnostr/v1+ncrypt" and store the KDF parameters, nonce, associated data, and base64 ciphertext. The KDF and cipher are exactly NIP-49's, so a NIP-49 library can decrypt the blob if you ever want to. NIPS IMPLEMENTED ---------------- NIP-01, 09, 10, 11, 13, 17, 19, 21, 25, 31, 37, 40, 42, 44, 46, 49, 51, 59, 62, 65, 70, 77, 89, 94, 98, B7. See the source comments for the specific behaviour of each. PRIVACY ------- No analytics. No telemetry. No server component. No login. The page never writes your nsec, your password, or any decrypted DM content to localStorage, sessionStorage, IndexedDB, or the URL. Only the pubkey, the relay list, the tour completion flag, and UI preferences may be persisted, and only when you explicitly ask it to. LICENSE ------- MIT. See LICENSE if present, or treat this as MIT-licensed by default. CONTRIBUTING ------------ This is a single-file tool. Changes should keep it that way. If you find a bug, please include the exact backup filename (the "backupnostr-..." part is enough) and the relevant lines from the activity log, which you can download with the "Download log" button.
Missing files
These files were checked. They were not on the hosts listed here.
| path | sha256 | missing on |
|---|---|---|
| /__MACOSX/._index.html | 7805e69391903e4bc37c97b193c58fd3fe5fc00f87e68f2e2e557f2d4327ae2b |
https://nsite.run · missing
https://nostr.download · missing
|
Manifest
- event id
- e3eefedbf430f86bbf5d1d38866e0ca116600883a03e2d57a58a94c0e033e58b
- aggregate x
- None
- d tag
- backup-nostr
Paths
| path | sha256 | hosts | |
|---|---|---|---|
| /index.html | ff355c7fb1ed3fb56e8fde9844ee701dbbbb81ffcbd900a6939fe619aecd064c |
https://nsite.run · degraded
https://nostr.download · degraded
https://blssm.us · degraded
https://blossom.yakihonne.com · degraded
https://zencrown.relay2aeon.quest/ · degraded
|
preview |
| /__MACOSX/._index.html | 7805e69391903e4bc37c97b193c58fd3fe5fc00f87e68f2e2e557f2d4327ae2b |
https://nsite.run · missing
https://nostr.download · missing
https://blssm.us · degraded
https://blossom.yakihonne.com · degraded
https://zencrown.relay2aeon.quest/ · degraded
|
preview |
| /404.html | ff355c7fb1ed3fb56e8fde9844ee701dbbbb81ffcbd900a6939fe619aecd064c |
https://nsite.run · degraded
https://nostr.download · degraded
https://blssm.us · degraded
https://blossom.yakihonne.com · degraded
https://zencrown.relay2aeon.quest/ · degraded
|
preview |