Skip to content

Instantly share code, notes, and snippets.

@MiguelBel
Last active September 20, 2019 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MiguelBel/695d2bd8e135137cfa24c70de1955d80 to your computer and use it in GitHub Desktop.
Save MiguelBel/695d2bd8e135137cfa24c70de1955d80 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.10/go-ipfs_v0.4.10_linux-386.tar.gz
tar xvfz go-ipfs_v0.4.10_linux-386.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
@karsrhyder
Copy link

I think last line should be systemctl start ipfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment