Files pinned to my IPFS node don't show up on any other gateway

The same CID shows the following error at ipfs.io and many other gateways I tried

The gateway is taking too long to fetch your content. This could be due to several reasons:

The CID does not exist in the IPFS network

The host that contains the CID has gone offline, is on a slow network connection or overloaded

http://localhost:5001/webui shows everything working. The node is connected to many peers. There is data going in and out. There are no apparent errors or problems.

Do I need to open any ports besides 8080? I tried also opening 4001 but it didn’t help. 5001 and 8080 are the ports I see the server running on when I start it up.

Opening 8080 isn’t required and you should be careful when doing so (as it can be used to use your node to fetch and cache content).

Opening 4001 helps but is not enough, it makes the port physically reachable but you need to tell your public IP so your node can announce it to other nodes. You can find AppendAnnounce docs here Configure NAT and port forwarding | IPFS Docs

You can also try running a recent version of Kubo which has hole punching.

1 Like

This is running on a VPS with a static IP. I believe I configured the IP address already during setup. I just have a firewall for security but it’s not a home router that needs port forwarding setup. I can open as many ports as necessary I just need to know which ones.

Can you recommend anything else to check?

This is the config as it is now

“API”: {
“HTTPHeaders”: {
“Access-Control-Allow-Methods”: [
“PUT”,
“POST”
],
“Access-Control-Allow-Origin”: [
“http://[public is here]:4101”,
“http://localhost:3000”,
“http://127.0.0.1:4101”,
“https://webui.ipfs.io”
]
}
},
“Addresses”: {
“API”: “/ip4/0.0.0.0/tcp/4101”,
“Announce”: ,
“Gateway”: “/ip4/0.0.0.0/tcp/8080”,
“NoAnnounce”: ,
“Swarm”: [
“/ip4/0.0.0.0/tcp/4001”,
“/ip6/::/tcp/4001”,
“/ip4/0.0.0.0/udp/4001/quic”,
“/ip6/::/udp/4001/quic”
]

Do I need to change anything else or open anything besides 4001?

You need two things:

  • ipfs id needs to show your public ip and ports.
  • The port needs to be physically reachable (you can check using nc)
> nc 127.0.0.1 4001
/multistream/1.0.0

Is the expected output if everything is working.

Also I see you are running an old version of Kubo (quic has been replaced by /quic-v1), you should try updating we fixed multiple bugs in the meantime.

1 Like

Not sure what you mean by “ipfs id” or how to set that, I also do not have any command called ‘nc’ installed.

The only instance I find of ipfs (no ‘ipfs id’) in the config file are

  "Access-Control-Allow-Origin": [
    "http://[public ip]:4101",
    "http://localhost:3000",
    "http://127.0.0.1:4101",
    "https://webui.ipfs.io"
  ]

and

“Mounts”: {
“FuseAllowOther”: false,
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”

Is there an upgrade guide for quic? I am not sure how I got an old version, I setup using a quickstart guide just a couple of days ago.

Thanks.

Is any of this debug data helpful?

Port 4101 is not open, 4001 is open.

Connected to IPFS

Hosting [19.9 MB of files](http://[public ip]:4101/ipfs/bafybeif4zkmu7qdhkpf3pnhwxipylqleof7rl6ojbe7mq3fzogz6m4xk3i/#/files) — Discovered [879 peers](http://[public ip]:4101/ipfs/bafybeif4zkmu7qdhkpf3pnhwxipylqleof7rl6ojbe7mq3fzogz6m4xk3i/#/peers)

Peer ID
12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

Agent
go-ipfs v0.8.0

UI
v2.11.4

Advanced

Gateway
http://0.0.0.0:8080

API

http://[public ip]:4101/

Addresses

/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

/ip4/[public ip]/tcp/4001/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

/ip4/[public ip]/udp/4001/quic/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

/ip6/::1/tcp/4001/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

/ip6/::1/udp/4001/quic/p2p/12D3KooWDiaUyg6PFrfRPhGHGncTUGx2PidcN5c7qX83dNy5Ra25

ipfs id is a command you can run, it will list the addresses your daemon thinks it has, if your public IP is included in there this is good.

The config section you shared are unrelated to the P2P section.

1 Like

Yes this is useful, v0.8.0 is 979days old.
This is completely unusable on today’s network (actually it might work sometimes, but it is very unreliable).

I don’t know what quick start you followed (if you could share so I could see where we have outdated content thx), you can find the latest version on https://dist.ipfs.tech and the latest quick start here Publish using the command line | IPFS Docs.

If you just install the latest version and run it, it will ask you for migration and will handle quic-v1 for you.

1 Like

OK thanks. I restarted with this guide: Initialize a Kubo node and interact with the IPFS Network | IPFS Docs (on linux)

But I’m struggling with a few things. It says “By default, your gateway is not exposed to the world. It only works locally.” It is running on a VPS. I have a firewall blocking access to everything except 4001. How do I get back to where I was so that I can see the webui on 4101 remotely (the firewall limits access to 4101 to my own remote IP only).

What else do I need to do?

Whatever files I add are still not available on other gateways as is.

Is my config correct?

“Addresses”: {
“Swarm”: [
“/ip4/[public ip]/tcp/4001”,
“/ip6/::/tcp/4001”,
“/ip4/[public ip]/udp/4001/quic-v1”,
“/ip4/[public ip]/udp/4001/quic-v1/webtransport”,
“/ip6/::/udp/4001/quic-v1”,
“/ip6/::/udp/4001/quic-v1/webtransport”
],
“Announce”: ,
“AppendAnnounce”: ,
“NoAnnounce”: ,
“API”: “/ip4/127.0.0.1/tcp/4101”,
“Gateway”: “/ip4/127.0.0.1/tcp/8080”
},
“Mounts”: {
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”,
“FuseAllowOther”: false
},
“Discovery”: {
“MDNS”: {
“Enabled”: true

I don’t see the section below in the new version config file at all

“Access-Control-Allow-Origin”: [
“http://[public ip]:4101”,
“http://localhost:3000”,
“http://127.0.0.1:4101”,
“https://webui.ipfs.io”
]

Also, how do I make sure that ipfs daemon starts every time the server restarts?

I tried using this file: https://github.com/ipfs/kubo/blob/master/misc/systemd/ipfs.service

But it fails to run

Job for ipfs.service failed because the control process exited with error code.
See “systemctl status ipfs.service” and “journalctl -xe” for details.

ipfs.service - InterPlanetary File System (IPFS) daemon
Loaded: loaded (/etc/systemd/system/ipfs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-10-26 15:35:14 UTC; 1min 34s ago
Docs: https://docs.ipfs.tech/
Process: 95293 ExecStart=/usr/local/bin/ipfs daemon --init --migrate (code=exited, status=1/FAILURE)
Main PID: 95293 (code=exited, status=1/FAILURE)
CPU: 42ms

journalctl -xe has no entries

Running simply ‘ipfs daemon’ works but this is attached to a terminal. I want this to startup automatically and run unattached to any terminal.

Thanks.

Edit: I resolved the inability to access the web ui by running

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://[public ip]:4101", "http://localhost:3000", "http://127.0.0.1:4101", "https://webui.ipfs.io"]'

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'

I still can’t get it running as a system service or find any of the files I add on other gateways.

Also, getting some errors in the terminal

|2023-10-26T15:55:56.274Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic) for cid (bafyreicecv6qfui4lzoudvkfblkq7aogmtlmhabqwjvhwhn3ijkannysxq) not requested|
|---|---|---|---|---|
|2023-10-26T15:59:39.038Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWGd58eC3Rmc4GYRaUbZU36urEeSi4JYjDhF7fzNQfNWL8) for cid (bafyreia3hkiqlpvlcoxskmlpqvfa5rjnq4lffs2qp4tp53jroga6ln47oa) not requested|
|2023-10-26T16:00:26.417Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWBwjwkfmg1xw3TadPTWLwm56RNdymqVzaajHox8ymqTuE) for cid (bafyreih5cqtpvr77vuawdchtxwkz2nmzr4aww4rz4mt4gdgxvs6jmnbsoq) not requested|
|2023-10-26T16:00:26.745Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWJLKZgB9aXcb91TaW54rKY5VtnNx1om5VQLSbNTySgeKQ) for cid (bafyreih5cqtpvr77vuawdchtxwkz2nmzr4aww4rz4mt4gdgxvs6jmnbsoq) not requested|

Is there any way to get this working?

  1. Install the latest version of Kubo
  2. Initialize with default settings: ipfs init
  3. Run ipfs daemon
  4. Run ipfs id and see if the public IP appears at all
  5. If not, open tcp/udp 4001 on your firewall, security groups or whatever
  6. To verify that your content is accessible to other nodes, use https://ipfs-check.on.fleek.co/ with the CID you want to check and the /p2p/ of your peer.

Working with systemd and other sysadmin tasks is something you can learn on the internet and is unrelated to Kubo.

1 Like