This guide describes the necessary steps to configure a Lotus miner for production.

Checklist before launch

To summarize, make sure that:

  • All the prerequisite steps have been completed.

  • The worker address has some funds so that the miner can be initialized.

  • The following environment variables have been defined and will be available for all Lotus miner instances:

    export LOTUS_MINER_PATH=/path/to/miner/config/storage
    export LOTUS_PATH=/path/to/lotus/node/folder # When using a local node.
    export BELLMAN_CPU_UTILIZATION=0.875 # Optimal value depends on your exact hardware.
    export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 # When having GPU.
    export FIL_PROOFS_USE_GPU_TREE_BUILDER=1   # When having GPU.
    export FIL_PROOFS_PARAMETER_CACHE=/fast/disk/folder # > 100GiB!
    export FIL_PROOFS_PARENT_CACHE=/fast/disk/folder2   # > 50GiB!
  • Parameters have been prefetched to the cache folders specified above.

  • The system has enough swap and it is active.

  • The lotus api has been configured and the variable has been exported in the environment where lotus miner runs.

  • Wallets have been created for the owner and worker address.

Miner initialization

Before starting your miner for the first time run:

lotus-miner init --owner=<address>  --worker=<address> --no-local-storage
  • The --no-local-storage flag is used so that we can later configure specific locations for storage. This is optional but recommended.
  • The Lotus Miner configuration folder is created in ~/.lotusminer/ or $LOTUS_MINER_PATH if set.
  • The difference between owner and worker addresses is explained in the miner addresses guide. As mentioned above, we recommend using two separate addresses. If the --worker flag is not provided, the owner address will be used. Control addresses can be added later when the miner is running.

Connectivity to the miner

Before you start your miner, it is important to configure it so that it is reachable from any peer in the Filecoin network. For this, you will need a stable public IP and edit your ~/.lotusminer/config.toml as follows:

  ListenAddresses = ["/ip4/"] # choose a fixed port
  AnnounceAddresses = ["/ip4/<YOUR_PUBLIC_IP_ADDRESS>/tcp/24001"] # important!

Once you start your miner, make sure you can connect to its public IP/port.

Starting the miner

You are now ready to start your Lotus miner:

lotus-miner run

or if you are using the systemd service file:

systemctl start lotus-miner

Publishing the miner addresses

Once the miner is up and running, publish your miner address (which you configured above) to the chain so that other nodes can talk to it directly and make deals:

lotus-miner actor set-addrs /ip4/<YOUR_PUBLIC_IP_ADDRESS>/tcp/24001

Next steps

Your miner should now be preliminarily set up and running, but there are still a few more recommended tasks to be ready for prime-time:

Edit this page on GitHub