Introduction to IPFS: Run Nodes on Your Network, with HTTP Gateways

How to install IPFS nodes across your VPS network and configure your own Gateways

Ross Bulat

--

You’ve heard of the IPFS distributed file system and want to start adopting the technology in your stack — after all, a distributed, decentralised future is one that we will inevitably come to see. The industry is making fast progress along the path to achieving that goal in the software space.

IPFS, or the Interplanetary File System, was incepted in 2015 with the idea of a distributed internet with the goal of replacing the centralised HTTP web we have come to know and use today.

The capabilities of the underlying IPFS network allow us to utilise the filesystem to act as a global CDN network for web assets, with super fast delivery. Each node we set up can act as an access point to the filesystem.

IPFS was designed to distribute files on an interplanetary scale (literally), but HTTP was not. This is why each IPFS node needs to act as an access point, somewhere in the world, to serve traffic in that geographic location.

With this in mind, what this article will cover more specifically is:

  1. Installing the IPFS software on your servers. A CentOS7 VPS will be used, but documentation for any Linux distribution is provided.
  2. Configuring the IPFS repository to be stored on a mounted volume. Why? You can configure your IPFS repository to be as big as you need, therefore it maybe wise to dedicate a Volume whereby you can adjust the size as and when you need to. In this article I’ll refer to Digital Ocean Block Storage Volumes, but again, you are not limited to this solution.
  3. Opening required firewall ports. Firewalld will be configured to open the necessary ports of the VPS in order for the network to interact with other peers.
  4. Running IPFS in the background using Supervisord. Supervisord is a process manager that I use a lot — it will ensure that IPFS starts at system boot, and will restart the process should it crash or become interrupted. An environment variable needs to be defined with the process configuration, so this will be done.
  5. Opening your IPFS

--

--

Ross Bulat

Programmer and Author. @ Parity Technologies, JKRB Investments