Network access to API

Hello,

I have this problem. In a nutshell, companion and desktop on other machines in my network cannot access the daemon’s API running on my NAS. I can ping the NAS, and the IPFS daemon is working fine (people are downloading my files), but I can’t get the UIs / clients to connect to the node.

When running a native node on those devices, e.g. the desktop IPFS on the laptop and PC runs its own built in node, it works fine. So it’s just the remote access to an in-LAN node that’s failing. One machine is wired into the same router connecting to the NAS, the other is on Wifi, so it’s not a subnet / wifi-extender issue either.

Companion has an IPFS API URL where you should provide the LAN_IP:6001 that your IPFS node runs on.

Yeah, no effect there.

No effect means there are errors? What errors? (dev console might help).

Never occurred to me to check the extension’s console. It’s 403s:

image

I think this is a CORS issue. You need to set

"Access-Control-Allow-Origin": [
        "*"
],

on your API section (not just gateway).

(It is not CORS per se, it is additional verifications that IPFS performs when it detects requests coming from browsers and which rely on allowed origins).

1 Like

Thank you! That worked!