Instructions for starting 2 nodes on one computer

Until libp2p adds the ability to self dial (, you will need to start 2 different nodes (client and miner) to send data to yourself for mining. There does not yet exist a guide to starting two nodes on a single device.

The easiest way is to

  1. setup the first node as normal
  2. open up a new shell and set the FIL_PATH env var to a blank directory, ex: ~/.filecoin2
  3. in the same shell set the FIL_API env var to a localhost multiaddr ending in an unused port, ex: /ip4/
  4. now run init, daemon etc from the shell

You can also do this by specifying an api port with --cmdapiaddr and a repo with --repodir for every command, but this gets more tedious

1 Like