A decentralized Internet Archive built on Nostr + Blossom. No single point of failure. Content-addressed storage. Censorship-resistant by design.
NAAN nodes are agents that download, archive, and re-upload web content to Blossom servers, then publish archive receipts as kind 4554 events on Nostr relays — creating a queryable, decentralized index of preserved content.
URL → Download → SHA-256 → Blossom Upload → (Hashtree) → Kind 4554 Event → Nostr Relays
- Download — Web pages via SingleFile (headless Chrome), videos via yt-dlp
- Hash — SHA-256 for content-addressed integrity
- Upload — Push to multiple Blossom servers for redundancy
- Chunk — Files over 50MB are automatically split via Hashtree for streaming and P2P delivery
- Publish — Announce the archive on Nostr with full metadata (kind 4554)
- Discover — Anyone can query relays for archived content by URL
Full archiving pipeline. Downloads content, uploads to Blossom, publishes to Nostr.
# Archive a web page
bash scripts/archive-url.sh https://example.com/article
# Archive a video (auto-detected for YouTube, Vimeo, Twitter, TikTok, Rumble)
bash scripts/archive-url.sh https://youtube.com/watch?v=dQw4w9WgXcQ
# Force video mode
bash scripts/archive-url.sh https://example.com/video.mp4 --video
# Dry run (download only, no upload/publish)
bash scripts/archive-url.sh https://example.com --dry-run
# Force Hashtree chunking regardless of file size
bash scripts/archive-url.sh https://example.com/large-page --hashtreeChunk a file into a Merkle tree via Hashtree and push all chunks to Blossom servers. Returns the tree root hash. Used automatically by archive-url.sh for files over 50MB.
bash scripts/hashtree-upload.sh large-video.mp4
bash scripts/hashtree-upload.sh archive.html --dry-runUpload a single file to a Blossom server with NIP-98 authorization.
bash scripts/blossom-upload.sh archive.html
bash scripts/blossom-upload.sh video.mp4 https://cdn.hzrd149.comMonitor public Nostr mentions tagging NAAN and auto-archive URLs. Access is controlled by configurable tiers: owner (owner only), friends (mutual follows), followers (anyone following the owner), follows (anyone the owner follows, default), or anyone. Whitelist and blacklist files provide per-pubkey overrides. Set ACCESS_TIER in naan.conf or as an environment variable.
# Run the monitor (processes mentions from the last 10 minutes)
bash scripts/monitor-mentions.sh
# Dry run (show what would be archived without doing it)
bash scripts/monitor-mentions.sh --dry-run
# Check mentions since a specific timestamp
bash scripts/monitor-mentions.sh --since 1712100000Check if a URL has already been archived on Nostr.
bash scripts/lookup-archive.sh https://example.com/articleNAAN extends fiatjaf's kind 4554 with additional metadata tags:
{
"kind": 4554,
"content": "",
"tags": [
["url", "<blossom URL>"],
["url", "<mirror blossom URL>"],
["r", "<original URL>"],
["x", "<sha256>"],
["m", "<MIME type>"],
["format", "html|mp4|pdf|..."],
["size", "<bytes>"],
["title", "<content title>"],
["archived-at", "<unix timestamp>"],
["hashtree", "<merkle tree root hash>"],
["tool", "naan"]
]
}The hashtree tag is included when a file was chunked via Hashtree. Clients can use this to fetch content chunk-by-chunk from Blossom servers or via WebRTC peers, enabling streaming playback for large video archives without downloading the entire file.
For video archives, NAAN also publishes NIP-71 events (kind 34235/34236) with Hashtree info in the imeta tag, so video clients like nostube can stream directly.
{
"kind": 34235,
"tags": [
["imeta", "url <blossom_url>", "m video/mp4", "x <sha256>", "size <bytes>", "hashtree <root_hash>", "fallback <mirror_url>"],
["title", "Video Title"],
["r", "<original URL>"]
]
}Query any relay for archives of a URL:
nak req -k 4554 -t r="https://example.com" wss://relay.damus.ioNAAN is packaged as an OpenClaw skill in naan-archiver/. Any OpenClaw agent can install it to become an archival node. The skill auto-discovers Blossom servers and relays from the operator's Nostr metadata (kind 10063 and kind 10002), so configuration is minimal: provide an nsec and optionally an operator pubkey.
See naan-archiver/SKILL.md for setup instructions.
- yt-dlp — video downloading
- nak — Nostr signing and publishing
- htree — Hashtree CLI for chunked storage (optional, for files >50MB)
curl,jq,sha256sum— standard tools- A Nostr keypair (nsec)
- Access to Blossom servers for upload
NAAN builds on existing Nostr infrastructure:
- Blossom — Content-addressed blob storage (BUD-01 through BUD-11)
- Hashtree — Chunked file storage for large content (by Martti Malmi)
- nsite — Deploy websites to Nostr + Blossom. Every NAAN node serves its own archive index as an nsite
- ContextVM — MCP over Nostr for agent-to-agent coordination (future)
Turn every OpenClaw agent into a Nostr archival node.
The Internet Archive is fantastic, but it's a central point of failure. One organization, one jurisdiction, one domain. We can do better.
NAAN is an OpenClaw skill. Install it, give it an nsec, and your agent becomes part of a decentralized web archive. No central server, no API keys, no accounts.
Archives are requested via Nostr: tag an agent in a public note or send it a DM with a URL. The agent downloads the content, uploads it to Blossom servers, and publishes the archive metadata as a Nostr event. Anyone can query any relay to find every archived copy of a URL, from every node, with full provenance.
Each node is autonomous. It has its own keys, its own storage, its own operator. Nodes discover each other's work through Nostr relays. Blossom provides content-addressed redundancy. OpenTimestamps anchors proofs to the Bitcoin blockchain. The Web of Trust gates access.
There is no single interface. Every agent deploys its own archive index as an nsite, browseable by anyone. And since archive events are just Nostr events, any client can query and display them.
The more agents run the skill, the more resilient the archive becomes.
See RESEARCH.md for the full design document.
- Nostr Web Archiver — fiatjaf's browser extension for archiving websites to Nostr + Blossom. Pioneered the idea of publishing web archives as Nostr events.
- ArchiveBox — Self-hosted internet archiving. Comprehensive, well-designed, and a proof that individuals can run their own archive. NAAN takes the same spirit and pushes it to Nostr, which brings syndication.
- Internet Archive — The original. Decades of preservation work. NAAN exists because this work is too important to depend on a single organization.
MIT