Is it possible to create a ‘private’ IPFS between several computers in a local network (without internet access) ?
To this purpose, I am trying first to clear the defaults ipfs bootstraps :
But I still see in logs that it connects to default bootstraps :
libp2p:dialer creating dial target for QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ +0ms
libp2p:peer-store:address-book:trace get wait for read lock +1ms
libp2p:dialer creating dial target for QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN +1ms
libp2p:peer-store:address-book:trace get wait for read lock +1ms
libp2p:dialer creating dial target for QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmZa1sAxajnQjVM8WjWXoMbmPd7NsWhfKsPkErzpm9wGkp +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6 +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmV7gnbW5VTcJ3oyM2Xk1rdFBJ3kTkvxc87UFGsun29STS +0ms
libp2p:peer-store:address-book:trace get wait for read lock +0ms
libp2p:dialer creating dial target for QmY7JB6MQXhxHvq7dBDh4HpbH29v4yE9JRadAVpndvzySN +0ms
How is it possible ? Something I may have misunderstood ?
I don’t know if it is the solution, but the only way I’ve found to force ipfs with no default Bootstrap peers is to edit the file node_modules/ipfs-core-config/src/config.js to remove the Delegates and the Bootstraps default lists.
Now, I will try to add my owns from the setup…
Feedback is welcome to know if this solution is relevant. Thanks
It looks like the config parameter is not used anymore (even if some examples still use it). You can see it in the default config.js file here. The CONFIG.md does not show config key anymore.
Moreover, the Boostrap setup only merge the setup with this default config, as you can see it in the repo init code. So, when bootstrap setup is set to [] the final setup still contains the default bootstraps
For now, the only way I’ve found is to edit the config.js…
See here that it loads the config is loaded from initOptions.config :
Moreover, the Boostrap setup only merge the setup with this default config, as you can see it in the repo init code. So, when bootstrap setup is set to [] the final setup still contains the default bootstraps
That’s incorrect. setting Bootstrap to [] will override the default. mergeOptions overrides arrays rather than merging them. See the following example:
In the screenshot you shared, it seems that you instantiate the storage before IPFS with the config which is why it might be instantiating with the default config.
It’s hard to say without looking at the rest of your code.
Thanks again, and sorry for the delay to answer : I’ve tried to make a repo to show it, but unfortunately, it works now as you said : the config.Boostrap replaces the default setup indeed. I may have been confused by the following comment which says the config is merged. May be this file should be updated ?
Dealing with default setup, I am now faced with the fact that the storage ~/.jsipfs/config file shows an peerId identity which is not the same as the one set in options. And (another subject), that ipfs features look broken when a .jsipfs directory is already present (I have opened an issue here)
Thanks again for your help. I think the bootstrap setup subject is solved.