Configure IPFS Desktop to work with a gcloud IPFS Cluster

Hello all!

I’ve noticed that when I first start IPFS Desktop it connect to some global public IPFS nodes. What I wish to do, is to use IPFS Desktop with a private IPFS cluster that is hosted on gcloud.

I’ve tried a couple of times configuring the bootstrap of my IPFS cluster, but I always get a crash afterwars with an “invalid ip” message.

Is is possible to setup IPFS Desktop to connect to a private cluster or is it supposed to work only with the nodes provided by the app?

If possible, any links docs availble on how to do so? I’m unable to find documentation about it.

Thanks you!

well, what are you configuring, where, and what are you using as value?

It should work as long as it points to an ipfs API endpoint.

Hello Hector,

This is the default IPFS Desktop config file:

{
	"API": {
		"HTTPHeaders": {}
	},
	"Addresses": {
		"API": "/ip4/127.0.0.1/tcp/5001”,
		"Announce": [],
		"AppendAnnounce": [],
		"Gateway": "/ip4/127.0.0.1/tcp/8080”,
		"NoAnnounce": [],
		"Swarm": [
			"/ip4/0.0.0.0/tcp/4001”,
			"/ip6/::/tcp/4001”,
			"/ip4/0.0.0.0/udp/4001/quic-v1”,
			"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport”,
			"/ip6/::/udp/4001/quic-v1”,
			"/ip6/::/udp/4001/quic-v1/webtransport”
		]
	},
	"AutoNAT": {},
	"Bootstrap": [
		"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb”,
		"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt”,
		"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ”,
		"/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ”,
		"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN”,
		"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa”
	],
	"DNS": {
		"Resolvers": {}
	},
	"Datastore": {
		"BloomFilterSize": 0,
		"GCPeriod": “1h”,
		"HashOnRead": false,
		"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”
		},
		"StorageGCWatermark": 90,
		"StorageMax": “10GB”
	},
	"Discovery": {
		"MDNS": {
			"Enabled": true
		}
	},
	"Experimental": {
		"FilestoreEnabled": false,
		"Libp2pStreamMounting": false,
		"OptimisticProvide": false,
		"OptimisticProvideJobsPoolSize": 0,
		"P2pHttpProxy": false,
		"StrategicProviding": false,
		"UrlstoreEnabled": false
	},
	"Gateway": {
		"APICommands": [],
		"DeserializedResponses": null,
		"DisableHTMLErrors": null,
		"ExposeRoutingAPI": null,
		"HTTPHeaders": {},
		"NoDNSLink": false,
		"NoFetch": false,
		"PathPrefixes": [],
		"PublicGateways": null,
		"RootRedirect": “”
	},
	"Identity": {
		"PeerID": “12D3KooWM8MGxAXxbGSbui7KXCshKA9qzja4USoD8AXdMW9snAGz”
	},
	"Internal": {},
	"Ipns": {
		"RecordLifetime": “”,
		"RepublishPeriod": “”,
		"ResolveCacheSize": 128
	},
	"Migration": {
		"DownloadSources": [],
		"Keep": “”
	},
	"Mounts": {
		"FuseAllowOther": false,
		"IPFS": "/ipfs”,
		"IPNS": “/ipns”
	},
	"Peering": {
		"Peers": null
	},
	"Pinning": {
		"RemoteServices": {}
	},
	"Plugins": {
		"Plugins": null
	},
	"Provider": {
		"Strategy": “”
	},
	"Pubsub": {
		"DisableSigning": false,
		"Router": “”
	},
	"Reprovider": {},
	"Routing": {
		"AcceleratedDHTClient": false,
		"Methods": null,
		"Routers": null
	},
	"Swarm": {
		"AddrFilters": null,
		"ConnMgr": {},
		"DisableBandwidthMetrics": false,
		"DisableNatPortMap": false,
		"RelayClient": {},
		"RelayService": {},
		"ResourceMgr": {},
		"Transports": {
			"Multiplexers": {},
			"Network": {},
			"Security": {}
		}
	}
}

Now I got IPFS Desktop running on my local desktop and I want it to connect to an IPFS cluster running on google cloud. Do I still need to update address.api. I will run IPFS Desktop on my laptop only. I’m not sure what to change to point to the nodes running on a private cluster.

Even if I change the bootstrap address to only the one of my cluster, something like:

	"Bootstrap": [
	"/ip4/x.x.x.x/tcp/8085/p2p/QmVKuLVFyBX2ZSyB2w7YLpH4AM7YCdaqdNRjwZa9cR335M”
	],

I still have IPFS Desktop discover global peers. I see almost 300 peers and files from a public cluster, instead of just my cluster that is only 9 nodes.

that is the configuration for the Kubo node inside IPFS Desktop, I think. Now that I think of it, I am not sure that IPFS Desktop can be pointed to a remote Kubo node, but I would expect it to have a settings page where this can be done.

Right. I tried removing all bootstrap address from the kubo node config, and IPFS Desktop is still discovering peers. So, I guess IPFS desktop and the underlaying kubo node handle differente configs.

To configure Kubo in a private network see: kubo/docs/experimental-features.md at master · ipfs/kubo · GitHub