504 Timeout on Public Gateway

I’m setting up ipfs for the first time in a new network, I turned on Port Forwarding on my WiFi router for 4001 and IPv6. I’m able to retrieve files from the local gateway, but not public gateways. How do I troubleshoot this?

1 Like

Port forwarding isn’t enough.
Port forwarding makes your peer physically reachable. But you also need to tell other peers that your port are open else they wouldn’t know to try it.
You need to add your public IPs in the AppendAnnounce


(I’m assuming that your public IP is and your outside port is 12345 change it with yours).

Once you done that and restarted your node, you can try https://ipfs-check.on.fleek.co/.

I ve just tried your suggestion. But it didn’t work. I’m still getting 504 Gateway message from browser.
I replaced my public ip and the port as 4001

Try this:

same issue here, did you ever manage to resolve it? thanks a lot

No luck!
@ylempereur the output from the page is as follows;

❌ Could not connect to multiaddr: context deadline exceeded
✔ Found multiaddrs advertised in the DHT:
❌ Could not find the multihash in the dht
❌ There was an error downloading the CID from the peer: could not connect to peer

That means your node isn’t reachable from the public internet. Your port forwarding isn’t set up properly. Once that is fixed, the top red X will go away. Then we’ll deal with the rest, if it’s still a problem.

Any update on the issue? Facing weird problem here.
I am getting SUCCESS in ipfs check page for ipv6 address but not for ipv4.

I have rechecked, port is open on VPS for both ipv4 and ipv6

If you try to connect to the advertised public ip4 address from a remote location using telnet/netcat/nc, it should connect and receive the string “/multistream/1.0.0” back. If that’s not the case, your firewall or port forwarding isn’t set up properly yet.