Installing IPFS via ipfs-update on Linux or WSL

  1. download latest version of ipfs-update download latest from https://dist.ipfs.io/#ipfs-update e.g. wget https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-amd64.tar.gz

  2. extract the zip: e.g. tar -zxvf ipfs-update_v1.6.0_linux-amd64.tar.gz

  3. go into the folder: cd ipfs-update/

  4. run the install command: sudo ./install.sh

  1. You should now be able to check it is working via: ipfs-update help
  1. Intall latest go-ipfs sudo ipfs-update install latest

IPFS should now be installed!

Resolving IPFS API CORS issues

I keep being hit by this issue when trying to configure my IPFS node to allow programmatic access to the API.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:5001/api/v0/add?stream-channels=true. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

The answer is to configure the API permissions of the IPFS configuration.


ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"*\"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"GET\", \"POST\"]'

IMPORTANT: After making any configuration changes you need to restart the IPFS daemon in order for the new settings to take effect

I had gone wrong as I had been trying to change the GATEWAY.HTTPHeaders instead of API. I also didn’t realise I needed to restart the daemon.