STORY
Introducing Hostr(nostr-webhost) πŸš€
AUTHOR
Joined 2023.08.26
DATE
VOTES
sats
COMMENTS

Introducing Hostr(nostr-webhost) πŸš€

Hostr(nostr-webhost) πŸš€

Hostr is a groundbreaking command-line tool developed to host Single Page Applications (SPAs) using the Nostr protocol. This initiative taps into the decentralized network of Nostr relays to host HTML, CSS, and JavaScript files, ushering in a new era of decentralized web hosting.

Problems & Solutions 🚨

Traditional web hosting relies on centralized servers, a model that comes with risks like data tampering. Hostr solves this by utilizing Nostr's decentralized relays, ensuring data integrity through public key-based authentication.

Hostr, compared to the same decentralized hosting mechanism IPFS, has the advantage of a faster discovery feature and a lower risk of data loss.

Faster Discovery Feature

Unlike IPFS's DHT that continuously queries other nodes through the queried node until the data is found and then sends the data back via those nodes, Hostr utilizes 'nevent' as the default identifier. With 'nevent', the relays containing the data are predetermined, allowing data retrieval simply by connecting to that relay via WebSocket, achieving performance comparable to conventional website retrieval processes.

Lower Risk of Data Loss

In IPFS, data will disappear from nodes automatically unless deliberately pinned, making data uploaded onto IPFS inaccessible mostly after a day. However, most Nostr relays don't have such a mechanism, and since Hostr content doesn’t support binary data like IPFS, the storage capacity and retention cost are not as high, making the likelihood of site inaccessibility much lower compared to IPFS.

How was it built? πŸ› 

Hostr is engineered using Go, coupled with the robust command-line interface. It encapsulates complex processes into simple commands, easing the deployment and management of SPAs on the Nostr network.

Blockers & Issues βœ‹

A notable issue is the current incompatibility with domain-based authorization mechanisms like NIP-7 due to event path-based identification, which could inadvertently authorize other events.

Try it out πŸ”—

Dive into decentralized web hosting with hostr! Check it out on [GitHub](https://github.com/studiokaiji/nostr-webhost)) and follow the installation guide to get started on hosting your SPA in a decentralized manner.

For a more comprehensive understanding and detailed information, exploring the [NIP-106 proposal](https://github.com/nostr-protocol/nips/pull/811)) and the project's [README](https://github.com/studiokaiji/nostr-webhost)) is highly recommended.