Skip to content

Instantly share code, notes, and snippets.

@didnt1able
Forked from eternnoir/Setup IPFS Node Ubuntu 16
Created September 16, 2020 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save didnt1able/cb1bdbbe387a83a9ab1ade64f1480609 to your computer and use it in GitHub Desktop.
Save didnt1able/cb1bdbbe387a83a9ab1ade64f1480609 to your computer and use it in GitHub Desktop.
sudo apt-get install htop -y # This is not necessary, I just have it for check the resources consumption
sudo apt-get update
sudo apt-get install golang-go -y
export PATH=$PATH:$GOROOT/bin:$GOPATH/
export GOPATH=$HOME/go
wget https://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.15_linux-amd64.tar.gz
tar xvfz go-ipfs_v0.4.15_linux-amd64.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST", "OPTIONS"]'
ipfs config --json Gateway.Writable true
ipfs config --json Gateway.HTTPHeaders.Access-Control-Expose-Headers '["Ipfs-Hash"]'
ipfs daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment