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
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 http://127.0.0.1:5001/api/v0/swarm/peers
so, as I try
- In Postman
Error: connect ECONNREFUSED 164.92.254.19:5001
- In curl
curl: (7) Failed to connect to 164.92.254.19 port 5001 after 2295 ms: Connection refused
For reference, here's the firewall
and as you can see TCP 5001 is open.