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 ➠

My story about relocating from Russia to Germany and looking for a new job

Hello everyone! My name is Roman and in this blog post, I’d like to tell you a story about how me and my wife relocated from Moscow to Berlin. It took about 4 months to solve all the bureaucracy issues and find a job, but this post is not a detailed instruction on how to relocate and find a job but just a narration about the experience and feelings I had during this period of time.

First and foremost, let me introduce myself. For most of my life, I had been living in Russia in Moscow, and over the last about 15 years I’ve been working as a programmer. I have had a lot of different jobs, but the most interesting step in my career before relocating was the previous six years I’d been working in Yandex.

Yandex is a large Russian IT company, which was started in the mid-90s as a local search engine and in that time it could have been considered as the “Google of Russia”. Russia is one of a short list of countries where the local search engine is more popular than Google. These days Yandex’s business is much wider than just internet searching. The company built a taxi service and acquired Uber in Russia; Yandex is famous for its self-driving cars; it created its own open-source column-based database called Clickhouse, ML library Catboost and dozens of other less famous but high-quality products. Nowadays, Yandex can be considered not only as the “Google of Russia”, but also as the “Uber of Russia”, the “Amazon of Russia”, “Whatever you can imagine” of Russia and most of these services are more popular in Russia rather than their international counterparts.

Me and my wife Olya had been dreaming for a long time about relocating from Russia to a few specific European countries, but we both wanted to get a job. I, with my experience, was sure that I would be able to find a job and we wanted Olya to find one first.

In Russia, Olya had been working for a Russian representative of a German company when in the summer of 2020 that company decided to close its Russian office and Olya was invited to continue working in the Berlin office.

Read more ➠