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.

1 Answer 1


You need to set the IPFS host to

ipfs config Addresses.API /ip4/
ipfs config Addresses.Gateway /ip4/

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 and acknowledge you have read our privacy policy.

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