30817:kind-30080-static-websites

Kind 30080 - Static Websites

ed253

published
2025-12-22

Experimental Kind 30080 for static web hosting

Host a static website on Nostr (HTML, CSS, JS, images)

Key points:

  • Replaceable addressable event, only the newest file is saved
  • Content must be the Data URI of the HTML/image/CSS/JS file (must be base64-encoded and include the mime type)
  • Content may be any length, but relays generally limit content to 64 KB
  • The d tag must be the file name
  • Other tags are optional, e.g. tags to describe the content

With a short URL and default relay, Nostr static websites could look something like: https://nostr.site/bob@nostr.me/projects.html

Advantages:

  • Host a static website on Nostr
  • Upload HTML pages, images, CSS/JavaScript
  • Support for NIP-05 usernames

Disadvantages:

  • Not all relays accept the experimental Kind 30080
  • Does not support backend code like Node, Python or PHP
  • The content field usually has a max size of 64 KB

Example:

{
  "id":"xxxx",
  "pubkey":"xxxx",
  "created_at":100000000,
  "kind":30080,
  "tags":[
    ["d","test.html"],
    ["published_at","100000000"]
  ],
  "content":"data:text/html;base64,PGh0bWw+CiAgPGhlYWQ+[...]PC9odG1sPg==",
  "sig":"xxxx"
}

Live examples:

Publish Kind 30080 with https://github.com/ed253/nostr-publisher-cli

View Kind 30080 with https://github.com/ed253/nostr-multimedia

Discussion

Connect a key to comment.