Tutorial: How to host your own file transfer service on your pc
The full article was originally published by David Hawig on Medium. Read the full article here.
The first part of a series describing the technology behind pact.online
For those who have never heard of the InterPlanetary File System (IPFS), here is a quick introduction by Wikipedia:
“InterPlanetary File System (IPFS) is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing hypermedia in a distributed file system.”
Let us explore IPFS through an example. At present, we use the combination “https://www” plus an address to find information on the internet. This is a location-based system, and it works in a way that resembles saying to someone that this person can find a copy of the book he or she is looking for at the library, located at Alexandria, on the second floor, section 2, shelf number 5. However, the same information — other copies of this exact book — may be found at different, perhaps even nearer, locations, but unless you specifically know where to search for, you will not find this information.
The fundamental difference with IPFS is that it uses a name-based system. The name is a unique “hash”, which is a combination of letters and numbers. This is how a real-world hash looks like: QmUheca9RxWkN31vEdzP7DFgrfonUPzCyq3gkenD9sJTuG. To illustrate how this impacts our previous book locating example: unique hashes allow a person to search specifically for the information they are looking for (i.e. title of the book) and any individual (i.e. library) who has this information, independent of their location, can provide it to the person who is looking for it. Usually, this means that the fictive person from our example can find a place much closer than the library of Alexandria to get this information, saving his valuable resources and time. If you want to learn more about it, here is a more detailed yet digestible article: https://medium.com/@ConsenSys/an-introduction-to-ipfs-9bba4860abd0. For our use case, just replace Ethereum with IOTA.
Now one of the biggest advantages with a name-based system is that you can create a complete decentralized web application (links don’t point to specific locations anymore), that can run on every server, even on your local machine. That’s why we will show you how to run our pact.online file transfer service on your local computer, which means you can share files end-to-end encrypted with a transparent IOTA based logging system without trusting any web server.