Hello I’m not realy shure where to start.
I Try to setup an IPFS Server Node with Helia.
But all examples and everything I tried is failing at the point where I try to fetch the content of a stored (on my IPFS helia server) CID either locally in the IPFS app or through IPFS online Gateway (https://ipfs.io/ipfs).
I configured the server firewall allow traffic to port 4001 which is the one I configured in my code (I also tested with kubo i have no problem to see my file).
Aside from possible configuration/programming/usage errors, one thing catched my eye: While debuggig the add (also the provide function) I found out that my “announcers” array inside “libp2p” is just empty, if it is empty it will be set to a new array which contains the local addresses.
That seems not to be right. According to
helia.libp2p.getPeers().length
im also connected to many peers (40+).
Both give me some errors. pl diagnose seems to mostly can connect of find my server, but the content itself is (almost) never retrievable.
After creating the helia instance I tried adding strings/files/jsons and I pinned them locally.
Am I missing something?
My helia config looks like following:
const config_helia = {
//
libp2p: {
datastore: datastore,
//
autoDial: true,
//
addresses: {
listen: [
'/ip4/0.0.0.0/tcp/4001',
'/ip4/127.0.0.1/tcp/4001',
`/ip4/${PUBLIC_IP}/tcp/4001`,
'/ip6/::/tcp/4001'
]
},
//
services: {
autoNAT: autoNAT(),
dcutr: dcutr(),
delegatedRouting: () => createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev'),
dht: kadDHT({
clientMode: false,
validators: {
ipns: ipnsValidator
},
selectors: {
ipns: ipnsSelector
}
}),
identify: identify({
agentVersion: AGENT_NAME
}),
keychain: keychain(),
ping: ping(),
pubsub: gossipsub(),
relay: circuitRelayServer({
advertise: true
}),
upnp: uPnPNAT()
},
nat: {
enabled: true
}
},
//
datastore: datastore,
blockstore: blockstore,
//
start: autostart
};
I Also tried using no config (and different versions of configs).
Hope you can help and thank you in advance.