0

The very naive way I'm going about it is:

const node = new Ipfs({ host: "xxx.ip.address.xxx"});

When I save an image from the static page, it does give me an ipfs hash back and save it to the local browser cache, but when I run on my ipfs node:

ipfs dht findpeer QmVLRBHgCvFhPbxenyPpM1UnoLMY9kPhB6vyU2JmenaLYv

My node can't find the file.

PS: I'm running the IPFS node on Digital Ocean.

0

You need to set the IPFS host to 0.0.0.0

ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/9001

You may also need to set CORS:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'

Restart IPFS daemon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.