I can not access my file through a gateway or another node

I installed IPFS normally
$ sudo snap install ipfs

$ ipfs --version
ipfs version 0.4.19

So
$ ipfs init

$ ipfs daemon

Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

My ipfs node seems to be working normally, I can get other files from the network

And if I put a file of mine, it informs that it added
$ ipfs add file.txt
added QmaXkEHriysXXtgcA5aSqfWQjuuxi6S1Ni9V8RFbqheGpT text.txt

$ ipfs pind add QmaXkEHriysXXtgcA5aSqfWQjuuxi6S1Ni9V8RFbqheGpT
pinned QmaXkEHriysXXtgcA5aSqfWQjuuxi6S1Ni9V8RFbqheGpT recursively

However, I can only access the file locally.
I can not access it through the ipfs.io gateway and no other.
I can not even access by another node of mine in a vps.

It is loading forever until it gives 504 error (gateway time-out)
I have not received any errors so far.

I have not received any errors so far.

I’m using Ubuntu 18.04

1 Like

$sudo ufw status

Status: active

To Action From


Apache Full ALLOW Anywhere
22/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
4001/tcp ALLOW Anywhere
5001/tcp ALLOW Anywhere
4002/udp ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
4001/tcp (v6) ALLOW Anywhere (v6)
5001/tcp (v6) ALLOW Anywhere (v6)
4002/udp (v6) ALLOW Anywhere (v6)

My IPFS config:

{
“Identity”: {
“PeerID”: “”,
“PrivKey”: “”
},
“Datastore”: {
“StorageMax”: “10GB”,
“StorageGCWatermark”: 90,
“GCPeriod”: “1h”,
“Spec”: {
“mounts”: [
{
“child”: {
“path”: “blocks”,
“shardFunc”: “/repo/flatfs/shard/v1/next-to-last/2”,
“sync”: true,
“type”: “flatfs”
},
“mountpoint”: “/blocks”,
“prefix”: “flatfs.datastore”,
“type”: “measure”
},
{
“child”: {
“compression”: “none”,
“path”: “datastore”,
“type”: “levelds”
},
“mountpoint”: “/”,
“prefix”: “leveldb.datastore”,
“type”: “measure”
}
],
“type”: “mount”
},
“HashOnRead”: false,
“BloomFilterSize”: 0
},
“Addresses”: {
“Swarm”: [
“/ip4/0.0.0.0/tcp/4001”,
“/ip6/::/tcp/4001”
],
“Announce”: ,
“NoAnnounce”: ,
“API”: “/ip4/127.0.0.1/tcp/5001”,
“Gateway”: “/ip4/0.0.0.0/tcp/8080”
},
“Mounts”: {
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”,
“FuseAllowOther”: false
},
“Discovery”: {
“MDNS”: {
“Enabled”: true,
“Interval”: 10
}
},
“Routing”: {
“Type”: “dht”
},
“Ipns”: {
“RepublishPeriod”: “”,
“RecordLifetime”: “”,
“ResolveCacheSize”: 128
},
“Bootstrap”: [
“/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN”,
“/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa”,
“/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb”,
“/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt”,
“/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ”,
“/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM”,
“/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu”,
“/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64”,
“/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd”,
“/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM”,
“/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu”,
“/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64”,
“/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd”
],
“Gateway”: {
“HTTPHeaders”: {
“Access-Control-Allow-Headers”: [
“X-Requested-With”,
“Access-Control-Expose-Headers”,
“Range”,
“User-Agent”
],
“Access-Control-Expose-Headers”: [
“Location”,
“Ipfs-Hash”
],
“Access-Control-Allow-Methods”: [
“POST”,
“GET”
],
“Access-Control-Allow-Origin”: [
“*”
]
},
“RootRedirect”: “”,
“Writable”: true,
“PathPrefixes”: ,
“APICommands”: ,
“NoFetch”: false
},
“API”: {
“HTTPHeaders”: {}
},
“Swarm”: {
“AddrFilters”: null,
“DisableBandwidthMetrics”: false,
“DisableNatPortMap”: false,
“DisableRelay”: false,
“EnableRelayHop”: false,
“EnableAutoRelay”: false,
“EnableAutoNATService”: false,
“ConnMgr”: {
“Type”: “basic”,
“LowWater”: 600,
“HighWater”: 900,
“GracePeriod”: “20s”
}
},
“Pubsub”: {
“Router”: “”,
“DisableSigning”: false,
“StrictSignatureVerification”: false
},
“Reprovider”: {
“Interval”: “12h”,
“Strategy”: “all”
},
“Experimental”: {
“FilestoreEnabled”: false,
“UrlstoreEnabled”: false,
“ShardingEnabled”: false,
“Libp2pStreamMounting”: false,
“P2pHttpProxy”: false,
“QUIC”: false
}
}

Please visit this link to find out more about this…

Regards
screenplay ghostwriter

Do you get the answer? because i have the same problem and i dont know what to do. please help

Apparently it is a firewall problem, but not on my system or on the router. Maybe with the internet provider. So I also can’t run other services on my external ip.

I had similar issues. NAT traversal using ngrok helped a lot. Please give it a try. For details see: Hosting IPFS node with ngrok (github.com)

A good answer for those who still have this kind of problem in 2023:

IPFS node behind a NAT newtork (such as a residential network router) have difficulty connecting to the rest of the nodes on the IPFS. This can cause users to experience very long wait times or a high rate of request failures.

Read more about it and some configurations that can help here:

In general we host IPFS nodes on VPS (with correct firewall settings) or third-party services (such as Pinata, Infura, NFT.storage and etc) when in production.

1 Like