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 :)

Journey around Iceland

The term grill-tourism has been well-established in my lexicon for a long time — this is a type of holiday where a tourist isn’t actively involved in the planning of his trip. A tour operator drives a tourist like a roasted chicken in a bus-oven from a hotel to points of interest and the tourist’s goal is either to lie on the beach and be covered in a crispy sun-tan crust, or gazing out of the window while seated on a bus. Or even there isn’t a tour operator and you are just lying for a week under the sun in a chaise longue in an all-inclusive hotel. It’s grill-tourism as well. This term used to have a strictly negative meaning to me, but now it has become more neutral: sometimes you just want to switch off your brain and do nothing. There is nothing wrong with it, but it’s important to mix grill-holidays with more eventful itineraries, since grill-tourism is monotonous and tedious.

DALL-E and a couple of other neural networks are sponsors of this picture

Through recent observations (and also based on some of my own adventures) I’ve extracted one more category of holidays — checklist-tourism. The goal of a checklist-tourist is to see as many things as possible and to set as many check marks as possible in an imaginary (or maybe in a real) checklist at all costs within a single short trip. On the one hand, you really can see a lot, but on the other hand — you’re always in a rush, you don’t have space to manoeuvre and you can’t afford to spend more time in a place you like. It’d be better to avoid checklist-tourism: memories from such trips fade and are squashed into one evenly grey lump of plasticine and over time you can no longer separate one episode of the adventure from another.

With these two vacation types in my mind I’d approached the planning stage of my trip to Iceland. Prior to the journey, my perception of the country was superficial and romanticised, as if it were a snow-covered island out of a fairy tale. This perception was amplified by a plethora of blog posts and photos from the internet, showing truly incomparable scenes that reinforce this image: ice caves with the walls lumining from the inside, the Northern Lights, beaches of black sand and shards of ice sparkling in the sunlight. However, the vast majority of these exceptional scenes are nothing more than marketing tricks aimed at attracting tourists; rare shots taken by professionals at a brief and fortunate moment.

What to do in Iceland?

In short, itinerary planning nowadays is complicated by the fact that the real pearls have to be sifted out from the marketing noise. So I am going to write about some of the interesting things I’ve learned about Iceland.

There are about 360 thousand people living in Iceland and almost half of them are in Reykjavik. In other words, it’s definitely the kind of place one should avoid at all costs, since the feeling of solitude is one of the reasons why I think it’s worth travelling to Iceland. The overall population density across the entire island is about 3.5 individuals per square kilometre, whereas in the capital city, the density reaches 490 people per square kilometre. For comparison, the population density in Berlin is approximately 4000, and in Moscow it is about 5000 individuals per square kilometre.

There are 130 volcanoes grouped into 30 volcanic clusters here and they erupt occasionally. Local companies organise excursions to the erupting volcanoes! Observing streams of live lava is a truly unique and once in a lifetime experience. It’s hard to imagine where else on Earth one could go for such an adventure. Apparently, however, aligning your itinerary for the eruption is either a matter of immense luck, or a substantial amount of freedom to book a last-minute vacation and fly directly to see the eruption sight.

The picture below I found on the internet. This is how an excursion to the erupting volcano could look like, save for the photoshopped lava.

A picture from the internet. The lava looks photoshopped

Apart from volcanoes there are geysers as well. By the way, all the geysers in the world are named after the geyser Geysir that is located near Reykjavik.

There are several large extraterrestrial-looking glaciers, ice caves, rivers and waterfalls. One of the glaciers was used as a setting for two planets in the movie Interstellar (undoubtedly the best science fiction movie ever made).

Besides Interstellar, there are many other movies that have been filmed in Iceland. The movie “The Secret Life of Walter Mitty” was one of the reasons why I decided to drive along the desolated Icelandic roads. Around the island, closely following the coastline, is Route 1 — a ring road stretching about 1300 kilometres, granting access to nearly all the local landmarks throughout the year. Some of the island’s roads are closed in the winter, so it’s important to bear that in mind when planning a route.

Golden Circle and Diamond Circle are two popular tourist vehicle routes. The first is close to Reykjavik and the second is in the north-east of the island, close to Lake Myvatn and the waterfalls Dettifoss and Selfoss. Both routes can be completed from one to two days and the second one is more scenic, since it’s further away from the capital and crowds of tourists.

Waterfalls! There are several of them here and they are not just typical mountain brooks gently dripping from a few metres, they are powerful, expansive rivers! Europe’s mightiest waterfall, Dettifoss, spans 100 metres in width, and its torrents cascade from a height of 44 metres!

Aurora borealis — the Northern Lights can be observed in Iceland. This was the reason why I decided to visit Iceland in November; the prime Aurora season which runs from November to February.

Surprisingly, diving and snorkelling are available here! Yes, the water temperature in November is below 10 degrees, so a dive requires a drysuit and the appropriate preparation. But anyway, it’s still a viable option!

Fauna: whales, seals, birds, deer, horses. Many activities here involve animals, but November is not the peak season for such entertainment.

If your wallet permits (on average the typical European prices can be safely doubled in Iceland), you can rent a helicopter to fly to the summit of one of the local mountains.

Another type of attraction is the natural baths — outdoor pools where the water is drawn from underground boreholes and has a temperature of 36-40°C, depending on the location. It’s quite an exotic contrast — you walk out from a warm changing room to the fresh air where the temperature is below zero, waddle about 10 metres, and jump into a hot pool. The opposite of a Russian sauna :)

Iceland is one of the few places with very little artificial light. This makes driving very difficult at night, which falls around 6 p.m. in November. On the flip side, a large part of the island has a Bortle scale index from 1 to 3, allowing you to see the Milky Way with the naked eye… as long as the sky remains cloud-free.

Planned route

Iceland is a place where a grill-tourist has nothing to do, all the activities there imply activity: a lot of driving with even more outdoor hiking under the pouring icy rains and penetrating cold winds, requiring a high level of energy.

Even a month wouldn’t be enough to try everything I mentioned above without a rush. I had only 10 days, so to not turn into a grill-tourist I had to significantly cut down the list. Finally, I came up with the following route:

  • Fly to Reykijavik, it’s located on the west side of the island, and the very next day with a domestic airline fly to Akureyri, a town on the north-west of the island,
  • In Akureyri, rent a car and explore the surroundings of the Diamond Circle: the Myvatn Lake, geysers and waterfalls, and natural baths. All these things are here and they’re not as heavily crowded with tourists as Reykjavik’s area. Every night observing the Northern Lights,
  • Then drive to the south of the island to the Vatnajökull glacier area and spend a few days there. Stay in a guest house on a farm, which is located barely 50 kilometres away from civilization! It is supposed to be an unmatchable experience: stay in an isolated place, hike the glaciers and black sand beaches by day, and watch the Northern Lights by night,
  • After 3 days there, drive back to the west, towards Reykjavik to explore its surroundings and watch the Northern Lights. Then return the car and fly back home.

Of course, not everything went according to plan, and I’m going to tell the story of this adventure.

Read more ➠