Skip to main content

Hostr

Host websites on Nostr. Deploy SPAs to relay infrastructure.

Overview

Hostr is a command-line tool for hosting Single Page Applications (SPAs) and static content using Nostr relay infrastructure. Censorship-resistant, decentralized web hosting.

Key Features

Decentralized Hosting

┌─────────────────────────────────────────────────────────────────┐
│ Hostr Architecture │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Traditional Hosting: │
│ Website ──► Single server ──► Single point of failure │
│ │
│ Hostr: │
│ Website ──► Nostr event ──► Multiple relays │
│ │ │
│ ├──► Relay A │
│ ├──► Relay B │
│ └──► Relay C │
│ │
│ Distributed, redundant, censorship-resistant │
│ │
└─────────────────────────────────────────────────────────────────┘

Core Features

FeatureDescription
Deploy SPAsHTML, CSS, JavaScript
Multi-relayDeploy to multiple relays
CLI toolCommand-line interface
FreeUse any Nostr relay
Censorship-resistantDistributed hosting

Supported Content

  • HTML files
  • CSS stylesheets
  • JavaScript files
  • Static assets
  • Single Page Applications

Usage

Deploy a Website

# Initialize
hostr init

# Add relays
hostr add-relay wss://relay.example.com

# Deploy
hostr deploy ./dist

Commands

CommandDescription
initInitialize project
deployDeploy to relays
add-relayAdd relay endpoint
remove-relayRemove relay
list-relayShow configured relays
startStart local server

Technical Details

  • Written in Go
  • Files stored as Nostr events
  • Uses relay network for distribution
  • Related: NIP-96 (HTTP File Storage)

Use Cases

  1. Personal sites — Host your portfolio
  2. Documentation — Static docs hosting
  3. Dapps — Decentralized frontends
  4. Landing pages — Campaign pages

Comparison

FeatureHostrVercelIPFS
ProtocolNostrHTTPIPFS
CensorshipResistantPlatformResistant
CostFree (relays)FreemiumVariable
SpeedRelay-dependentFast CDNVariable

See Also