Skip to content

Instantly share code, notes, and snippets.

@eternnoir
Forked from MiguelBel/Setup IPFS Node Ubuntu 16
Last active April 15, 2022 06:58
Show Gist options
  • Save eternnoir/1534df75e233ff97c447197b7b967c11 to your computer and use it in GitHub Desktop.
Save eternnoir/1534df75e233ff97c447197b7b967c11 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