Modifying the Bootstrap Peers List
The IPFS bootstrap list is a list of peers with which the IPFS daemon learns about other peers on the network. IPFS comes with a default list of trusted peers, but you are free to modify the list to suit your needs. One popular use for a custom bootstrap list is to create a personal IPFS network.
First, let’s list your node’s bootstrap list:
> ipfs bootstrap list /ip4/188.8.131.52/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ /ip4/184.108.40.206/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx /ip4/220.127.116.11/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z /ip4/18.104.22.168/tcp/4001/ipfs/QmSoLpPVmHKQ4XTPdz8tjDFgdeRFkpV8JgYq8JVJ69RrZm /ip4/22.214.171.124/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64 /ip4/126.96.36.199/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu /ip4/188.8.131.52/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm /ip4/184.108.40.206/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd /ip4/220.127.116.11/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3
The lines listed above are the addresses of the default IPFS bootstrap nodes – they are run by the IPFS development team. The addresses listed are fully resolved and specified in multiaddr format, which makes every protocol explicit. This way, your node knows exactly where to reach the bootstrap nodes – the location is unambiguous.
Don’t change this list unless you understand what it means to do so. Bootstrapping is an important security point of failure in distributed systems: malicious bootstrap peers could only introduce you to other malicious peers. It is recommended to keep the default list provided by the IPFS dev team, or – in the case of setting up private networks – a list of nodes you control. Don’t add peers to this list that you don’t trust.
Here we add a new peer to the bootstrap list:
> ipfs bootstrap add /ip4/18.104.22.168/tcp/4001/ipfs/QmaMqSwWShsPg2RbredZtoneFjXhim7AQkqbLxib45Lx4S
Here we remove a node from the bootstrap list:
> ipfs bootstrap rm /ip4/22.214.171.124/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu
Let’s say we want to create a backup of our new bootstrap list. We can easily do this by redirecting stdout of
ipfs bootstrap list to a file:
> ipfs bootstrap list >save
If we ever want to start from scratch, we can delete the entire bootstrap list at once:
> ipfs bootstrap rm --all
With an empty list, we can restore the default bootstrap list:
> ipfs bootstrap add --default
Remove the entire bootstrap list again, and restore our saved one by piping the contents of the saved file to
ipfs bootstrap add:
> ipfs bootstrap rm --all > cat save | ipfs bootstrap add
By jbenet and insanity54
Was this information helpful?
Thank you for the feedback.
Edit this page in GitHub or open an issue