Hosting a static website on IPFS

In the previous blog post, I covered the basic principles of IPFS and its features. In this article, I’m going to explore a more advanced use case – hosting a static website on IPFS.

Before diving in, I’d like to briefly explain the difference between dynamic and static websites.

For dynamic websites, content is generated on the fly by a program. These programs are typically written in languages like PHP, JavaScript, Python, or Go. When a browser makes a request, a web server processes it and forwards it to the program, which then dynamically generates an HTML page and returns it to the user. This means that requests from different users to the same URL can result in different responses. This approach makes sense when the same URL needs to serve personalized content. For example, in social networks, the same news feed page shows different updates to different users.

For static websites, all HTML files are pre-generated and stored in the server’s file system. All requests are handled by the web server, just like with a dynamic site, but instead of running additional programs, the web server simply reads and returns HTML files directly from the disk. As a result, different users requesting the same URL receive exactly the same response. This is the simplest, fastest, and most reliable way to serve data, making it an excellent choice for blogs like this one (though there are far more complex examples of static websites out there). Dynamic site vs static

IPFS is a distributed file storage system; it can’t serve dynamic websites, but it works fine for static ones. Essentially, a static website is just a directory with HTML, CSS, JS files, and images. To host such a site on IPFS, all you need to do is add the files to the system using a command like ipfs add .... However, there are a few nuances I’d like to cover.

To make a static website accessible via IPFS, follow these four steps:

  1. Run an ipfs daemon.
  2. Use relative links to local resources in HTML files.
  3. Add dnslink.
  4. Use IPNS and enable auto-refresh.

Actually, only the first two steps are required, but the remaining two make accessing the site more convenient. I’ll go into more detail about each step later in this blog post.

Read more ➠

Everything You Need to Know About IPFS Before Using It

Simply put, IPFS (InterPlanetary File System) is a peer-to-peer distributed network designed for file storage and distribution. Anyone can join the network to share their own files and/or help distribute existing ones. The system’s architecture was inspired by several other distributed systems, including BitTorrent, but unlike them, IPFS provides additional tools. For example, it can be used for hosting static websites.

The project has excellent documentation, where you can find answers to any questions about the system. For a deeper understanding, I recommend reading this documentation as well as the original white paper written by the project’s authors. In this article, I will do my best to provide all the necessary information in a clear and structured manner to help anyone without prior knowledge of IPFS to understand its basic principles. I will also discuss the practical benefits of using IPFS. In the next blog post, I will explain how to deploy your own static website to IPFS.

Read more ➠

Short trip around Germany 2024

Bremen

The first association that comes to my mind when I think about Bremen is the Brothers Grimm fairy tale and the Soviet cartoon based on it, “Town Musicians of Bremen”. I didn’t know what to expect from this town, and it seems the town’s government builds their strategy on attracting tourists by exploiting the images of the Donkey, Dog, Cat, and Rooster—they are everywhere here, at least in the touristy downtown area.

Bremen undoubtedly is one of the most charming German towns I’ve visited. The most memorable places include the beautiful historic central train station, which was built in 1889, a scenic embankment, and the cozy, quaint old town.

Ruhrgebiet

Ruhrgebiet is an industrial region in the west of Germany. It consists of several towns (Dortmund, Essen, Duisburg, and others) that are so closely connected that it’s hard to tell where one ends and another begins. In the 19th and 20th centuries, this region was the centre of heavy industry, with major coal mines and steelworks that played a key role in Germany’s economic development. Since the mid-20th century, when coal mining and steelmaking began to lose their importance, the Ruhrgebiet entered a period of decline. Today, many factories and mines have been closed and converted into cultural centres, parks, and museums.

In general, it’s a boring, dismal and grey place. It’s literally grey, the number of sunny days here is smaller than the rest of Germany. I wouldn’t stay here for a long time, but abandoned mines and steelwork factories are very unusual and worth visiting. Besides that, I was lucky, and at the time of my trip, there was a Champions League match between Borussia Dortmund and Celtic. I couldn’t miss this game. I bought tickets from a reseller at three times the price, but the game was worth it-I got to see three times as many goals as a regular match, the game finished 7-1 :))

Munich

It wasn’t my first trip to Munich; this time I visited a couple of familiar places, for example, the stunning English Garden, and also I went to Scamfest Oktoberfest and to the Olympiapark and its surroundings.

I didn’t expect anything special from Oktoberfest, but anyway, it became the biggest disappointment of the trip. It’s just a bubble blown by the local marketeers, and there is no reason to visit this event! Crowds of drunken tourists, double prices for everything, and ABSOLUTELY, POSITIVELY nothing original: food, beer, entertainment—all of these things are the same as at any other German fest, or even at any other event in any other European town. And all these things are in a noisy crowd of drunken, vomiting tourists stumbling around in Lederhosen and Dirndls. Honestly, I felt more secure in the crowd of Celtic FC fans shouting chants and shaking the tram they were in, than at this Oktoberfest.

The Olympiapark is quite a beautiful place, though, just like any other well-maintained park, but I found the former Olympic Village and the block of panel houses next to it to be more interesting. It’s a cheap place and there are no other similar districts in Munuch. It’s mostly students living here now. Some photos can easily be confused with those taken in, let’s say, Chertanovo :)