0

I created an IPFS instance in the Google Compute Engine.

When I state the Daemon with

ipfs daemon

The Local IP address for the box (The Private address is listed) 10.128.0.4 but when I want to connected to the External IP (134.123.143.185 ) from outside Google I can't.

How do I add the External IP to the list of acceptable IP address to connect with.

try {
    const client = createClient(new URL('http://134.123.143.185:5001'))

    // call Core API methods
    const { cid } = await client.add('Hello world!')
    console.log(cid);
} catch (error) {
    console.log(error);
}

1 Answers1

1

The IPFS server is probably set only to listen on 127.0.0.1/5001

If you run

sudo ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001

This is probably horribly insecure and not the right thing to do someone hopefully someone will correct this answer.

  • From the official [IPFS forum question](https://discuss.ipfs.io/t/running-ipfs-on-google-compute-engine-instance/1487/3), we find a similar configuration. – Pit Apr 09 '21 at 10:50