IPFS Hosting

Here we look at how we might host our own IPFS Gateway for hosting Fedwiki assets.

The basic idea is to simply place a standard "writeable" IPFS daemon behind an Nginx reverse proxy.

# Writeable HTTP Gateways

By default, an HTTP gateway for IPFS only supports the HTTP GET method. This allows you to fetch a resource by its hash and, if the hash is a directory, by the path from that directory to a named file - discuss.ipfs.io

If you enable the Writeable flag for a gateway, it gains the ability to understand the HTTP POST, PUT, and DELETE methods. This allows clients to add data to IPFS, but doesn't trust them with the full daemon API.

You can enable this mode by setting Gateway.Writeable to true in the daemon configuration, or by passing the --writeable flag on the daemon's command line.

# Caching

I am not clear how efficient the current IPFS daemon is at retrieving a pinned asset in IPFS. Consequently it may be worth caching media files all though this will result in twice the storage space.

# Workflow

Uploading a media (audio) file to server will result in hosting the file in Fedwiki, and adding the asset to IPFS. It will be the responsibility of Fedwiki to use IPFS to serve the file where locally available.

# Desktop Client

We consider the option of coding the server and desktop client simultaneously. The desktop client would be useful in order to make it easy to work with the audio (video) archive that we call teh Anthropological Archive.

# See also - Alexandria - Anthropological Archive - Web Hosting With IPFS - chriswarbo.net - Hosting on IPFS - github - IPFS Hosting - atnnn.com - DispersionJS - github - Docker Volume IPFS - github