Created a Digital Ocean Ubuntu 20.04 droplet and setup an IPFS server node in it based on this tutorial.

If I run the following command in the server

ipfs swarm peers

I get the expected results

enter image description here

In addition, according to the documentation

Every command usable from the cli is also available through the HTTP API. For example:

ipfs swarm peers

curl -X POST

so, as I try

  • In Postman

Error: connect ECONNREFUSED

enter image description here

  • In curl

curl: (7) Failed to connect to port 5001 after 2295 ms: Connection refused

enter image description here

For reference, here's the firewall

enter image description here

and as you can see TCP 5001 is open.

1 Answer 1


Based on a tip from the Reddit user techiesaravana who says

Hi, you have to edit ipfs config file you need to change the Address field to


I was able to solve the issue. To do so, I ran

ipfs config Addresses.API /ip4/

and then

systemctl restart ipfs

Now I get the expected result

enter image description here

enter image description here

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.