Hosting a Webpage on ENS with Skynet

David Vorick
The Sia Blog
Published in
3 min readSep 8, 2021

--

Resolve .eth domains to decentralized data on Skynet with support from MetaMask and Cloudflare.

Starting with the already-released MetaMask 10.0.0, Skynet can be used to host webpages over ENS. When visiting these Skynet pages using MetaMask, the pages will automatically load. For an example of this, check out https://skynetlabs.eth/. If you don’t have MetaMask, Cloudflare has added Skynet support to their eth.link service, so you can visit the page at https://skynetlabs.eth.link/.

If you are eager to get this set up immediately, check out our documentation at https://docs.siasky.net/integrations/ens-ethereum-name-service. It’s as simple as adding a sia:// content record to your ENS name.

Why Skynet? Skynet is a high-reliability, high-performance, low-cost solution for decentralized storage. When you store a file on Skynet, you rent space from a decentralized network of servers that all have high uptime. This means that even after the original uploader shuts down their computer, the data remains available, without the need for any centralized pinning provider.

Skynet is unique among decentralized storage providers in its performance characteristics. Uploading to the network takes 1–3 seconds, and downloads from the network typically complete in under 200 milliseconds. These are the speeds you enjoy without any caching layer. Most other providers are able to get close to these speeds for cached content, but as soon as you need a file that isn’t in the local cache a download can take 30+ seconds. Skynet is able to achieve these speeds using a novel storage and retrieval architecture design to minimize the number of hops required to fetch data.

Finally, Skynet is low-cost. Storing a typical webpage on Skynet for a year costs about 0.6 cents. This cost is low enough that most Skynet portals (such as https://siasky.net/ or https://skyportal.xyz) are willing to do it completely for free. Skynet gets its cost advantages from an open marketplace. Anyone can sell their storage space on the network, and every storage provider is in open competition with all of the others. Only the best and cheapest storage providers get revenue, which drives everyone to lower their prices as much as is sustainable.

If you don’t want to use a third-party portal to upload your data, you can see how to run one yourself at this link. All of our code is freely available, including every performance and price optimization. Because Skynet is a decentralized network, data uploaded to any portal is visible from any other portal. The portals function exactly as their name suggests — they transport you to the decentralized network, giving web browsers an easy way to talk to Skynet without requiring any extensions or software downloads. To learn more about Skynet, you can check out this blog post or read through our more extensive documentation.

At Skynet, it’s our vision to build a brighter future where people control their own data, their own websites, and their own social networks. We don’t like the siloed, corporate-controlled Internet of today, and we believe the web3 efforts coming out of the blockchain are building a much healthier alternative. We’re excited to be a part of that alternative, and believe that the future will happen faster than anyone is expecting.

--

--