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

**URL:** <https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598>\
**Category:** Kubo\
**Created:** [June 7, 2019, 7:44am UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598 "2019-06-07T07:44:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anarkrypto](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/anarkrypto/32/2819_2.png) [@anarkrypto](https://discuss.ipfs.tech/u/anarkrypto)\
**Post date:** [June 7, 2019, 7:44am UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/1 "2019-06-07T07:44:40Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![anarkrypto](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/anarkrypto/32/2819_2.png) [@anarkrypto](https://discuss.ipfs.tech/u/anarkrypto)\
**Post date:** [June 7, 2019, 12:21pm UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/2 "2019-06-07T12:21:34Z")

</div>

**$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)

---

<div class="post-metadata">

**Author:** ![anarkrypto](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/anarkrypto/32/2819_2.png) [@anarkrypto](https://discuss.ipfs.tech/u/anarkrypto)\
**Post date:** [June 7, 2019, 12:23pm UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/3 "2019-06-07T12:23:20Z")

</div>

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  
}  
}

---

<div class="post-metadata">

**Author:** ![suzanneelizabeth1995](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/suzanneelizabeth1995/32/2837_2.png) [@suzanneelizabeth1995](https://discuss.ipfs.tech/u/suzanneelizabeth1995)\
**Post date:** [July 7, 2019, 7:57am UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/4 "2019-07-07T07:57:46Z")

</div>

Please visit this link to find out more about this…

> **[flyingzumwalt/decentralized-web-primer](https://github.com/flyingzumwalt/decentralized-web-primer/issues)**
>
> A primer explaining IPFS and the Decentralized Web, viewable at - flyingzumwalt/decentralized-web-primer

Regards  
[screenplay ghostwriter](https://www.scriptstories.com/)

---

<div class="post-metadata">

**Author:** ![noizyy](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@noizyy](https://discuss.ipfs.tech/u/noizyy)\
**Post date:** [July 10, 2019, 8:29pm UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/5 "2019-07-10T20:29:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anarkrypto](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/anarkrypto/32/2819_2.png) [@anarkrypto](https://discuss.ipfs.tech/u/anarkrypto)\
**Post date:** [April 7, 2020, 6:55pm UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/6 "2020-04-07T18:55:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SomajitDey](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/somajitdey/32/5466_2.png) [@SomajitDey](https://discuss.ipfs.tech/u/SomajitDey)\
**Post date:** [June 8, 2021, 1:43pm UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/7 "2021-06-08T13:43:09Z")

</div>

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)](https://gist.github.com/SomajitDey/25f2f7f2aae8ef722f77a7e9ea40cc7c)

---

<div class="post-metadata">

**Author:** ![anarkrypto](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/anarkrypto/32/2819_2.png) [@anarkrypto](https://discuss.ipfs.tech/u/anarkrypto)\
**Post date:** [February 5, 2023, 8:15am UTC](https://discuss.ipfs.tech/t/i-can-not-access-my-file-through-a-gateway-or-another-node/5598/8 "2023-02-05T08:15:24Z")

</div>

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

IPFS node behind a [NAT newtork](https://docs.ipfs.tech/concepts/glossary/#nat) (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:

> **[Configure NAT and port forwarding | IPFS Docs](https://docs.ipfs.tech/how-to/nat-configuration/)**
>
> Fix common connection issues by managing your routers NAT and forwarding ports so other IPFS nodes can interact with your node.

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.
