Last active
July 7, 2021 11:38
-
-
Save ilovelili/0a49ddacc1c7a42b73f4a90290b5450e to your computer and use it in GitHub Desktop.
ipfs init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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