Setup IPFS Node in Your Private Linux Server 12Jun2023
Setting up an IPFS node in your private server will reduce the loading time when you call the file.
Download the installation file. Feel free to browse https://dist.ipfs.io/go-ipfs for the latest distribution.
wget https://dist.ipfs.io/go-ipfs/v0.20.0/go-ipfs_v0.20.0_linux-amd64.tar.gz
Uncompress it.
tar -xvzf go-ipfs_v0.20.0_linux-amd64.tar.gz
Run the installation
./go-ipfs/install.sh
Initialise the IPFS with lowpower profile
ipfs init --profile=lowpower
Edit the port to avoid conflict
nano ~/.ipfs/config
"API": "/ip4/0.0.0.0/tcp/9191",
"Gateway": "/ip4/0.0.0.0/tcp/9090"
Run the server
nohup ipfs daemon &
Run the following commands to allow cors
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://wildd.ddns.net:9191", "http://localhost:3000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
Comments
Post a Comment