时光

时光的时光轴

寄以时间,予以文字
telegram
github
微信公众号

Host your blog on Web3.0

At the beginning of the new year, on the first day of the first month, I don't know where the motivation came from. I remembered the long-abandoned blog and found that the writing experience in the past half month has been much better than writing on an independent blog before.

Although I used website analytics services before, I didn't feel much about the data displayed by the website analytics services due to occasional "increase website traffic" services. In comparison, the public account gives me a feeling of "someone is really reading it". Although I know there are services that can manipulate this data, it still gives me a lot of motivation to write.

iShot_2023-01-29_16.18.43.png

Thanks to an anonymous friend who encouraged me through private messages and shared my article on Moments, which made me very excited.

So, as I mentioned before, I want to diversify the format of my blog. The form of an independent blog is indispensable. It is not only for publishing what I want to say, but more importantly, I think I should reach readers in both private and public domains.

Using Planet#

I used Typecho to write my blog before. The rich plugins, beautiful themes, and good performance made me use it for a long time. But after using it for a while, I found that it is actually quite troublesome to set up a server to host a website.

I also used a static blog for a while, but the default writing experience and publishing process were not very good, so I switched back to Typecho soon.

However, the concept of Web3.0 has gradually appeared in the public's view recently, but it is not a new concept, because it is still quite difficult for ordinary users to use this thing. Fortunately, I learned about: Planet.

Planet is the work of Livid, the founder of V2EX. You can download and use it on its official website. However, currently, only the macOS version is available, and the iOS version is described on the official website as It will happen in 2023.

iShot_2023-01-29_16.35.30.png

The software is designed to be very simple, and everyone can have countless Planets. I think it's great to call them Planets directly.

You can follow other people's Planets like an RSS reader, or you can start writing directly in the software:

iShot_2023-01-29_16.39.13.png

The editor supports inserting emojis, images, videos, and audio. If you have published audio, you can also create an Apple Podcast subscription.

After completing the content editing, you just need to tap Send, and your content can be accessed in IPFS.

Making the Site Accessible through a Regular Domain#

You will find that after you publish an article, it is basically inaccessible except when you use an IPFS browser locally.

There are two reasons: slowness and most people use the HTTP protocol to access the Internet.

Using Pinning Services#

To solve the slowness issue, because of the principle of IPFS, you need to let as many IPFS nodes as possible store your site. Pinning services provide you with many IPFS nodes. You can actively tell the pinning services to store your site on their IPFS nodes, making your content more accessible.

For the use of pinning, you can refer to this article: Article. It is worth mentioning that you can follow olivida.eth in Planet to see this article.

iShot_2023-01-29_16.55.26.png

Choose a Public Gateway#

Many Internet companies provide IPFS gateways, and some of them are public. You can use these gateways to access IPFS content using the HTTP protocol.

You can visit the Public Gateway Checker to see which public gateways are available and which one is the fastest.

You can also set up your own public gateway, referring to this article: Article. You can follow v2ex.bit in Planet.

I chose ipfs.io as the gateway, and it seems very fast to me!

Resolve to a Regular Domain#

You need to add two records for your domain:

Note that if you choose to use the gateway provided by Cloudflare, you can directly add it in the Web3 section of the domain control panel, and it will complete the following steps for you.

TXT Record#

iShot_2023-01-29_17.07.11.png

Assuming you need to access the IPNS address through blog.example.com, the prefix here should be _dnslink.blog, combined it will be _dnslink.blog.example.com, and the display format may vary on different DNS providers.

The content is dnslink=/ipns/ followed by your IPNS address, which you only need to copy from Planet:

iShot_2023-01-29_17.11.20.png

CNAME or A Record#

Most public gateways do not allow you to directly use CNAME, or they do not accept access through CNAME. You can try this command:

curl -H "Host: domain" http://public-gateway However, sometimes you may find that it can return the content of your site correctly, but once you bind it directly with CNAME, your domain will be redirected to another site after a while.

So your choices will be limited. For example, if you use the public gateway provided by Cloudflare, you need to add your domain to Cloudflare. But if you have your own server, you can try reverse proxy.

You can access your content by https://ipfs.io/ipns/domain-or-ipns-address, and you can achieve access by directly reverse proxying it. You can also cache it on the web server side, which will make it faster.

Further Optimization#

By adding TXT records, you can access the site in an IPFS browser.

iShot_2023-01-29_17.29.20.png

And because you provide a public gateway, you can also access outti.me in a regular browser to see the site.

Speed it up#

I use Cloudflare to make the site access as fast as a regular site. However, there is one setting that is better not to enable, which is Rocket Loader in the Speed section:

iShot_2023-01-29_17.44.52.png

It will delay the loading of elements controlled by JavaScript, which affects the experience on the default theme of Planet. In Chrome, the test results are as follows:

iShot_2023-01-29_18.05.46.png

I selected an article with the most images, and the speed is similar to other simple static pages. (The speed test on Cloudflare has been unable to run, I don't know why)

But this is the result obtained on two layers of cache. If your content has just been published or needs to be updated, it may take several hours to see the new content.

Add Comments#

Refer to this article: Article


The above is what I currently think is a good way to host a blog on Web3.0, and I hope more and more creators choose Planet to help make Planet better.

If you don't mind, you can also download a Planet to follow my Planet (or directly subscribe to the RSS feed!):

iShot_2023-01-29_18.27.05.png

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.