This guide covers how to safely upgrade Lotus when running a storage provider.

There are two types of upgrades:

Cross-check your config file

All upgrade types require you to double-check that your configuration files are up-to-date. You can do this by exporting the default configuration files from Lotus and comparing them to your configuration files.

To export the default configuration files from Lotus, run:

lotus-miner config default
  # Binding address for the Lotus API
  # type: string
  #ListenAddress = "/ip4/"


If you would prefer to have Lotus export the default configuration to a file, run:

lotus-miner config default >> ~/default-lotus-miner-configuration.toml

Once you have an updated default configuration file from the new version, compare it with your configuration file and make sure that you’re not missing any sections. You can use the diff command to produce a list of changes that would need to be made to the your configuration file, to make it match the updated default configuration file.

If you keep the same formatting as the default configuration file it should be fairly easy to spot difference and new sections using this command:

diff -y -W 200 your-config.toml default-lotus-miner-configuration.toml

A vertical bar sign indicates that there is a difference in that line between your configuration file, and the default configuration file.

#ListenAddress = "/ip4/"   |	  #ListenAddress = "/ip4/"

The greater-than-sign indicates that your configuration file is missing some lines that are included in the updated default configuration file.

					      >	  #AllowProveReplicaUpdate2 = true

You can also check the Lotus release notes for details on what new sections have been added.

Upgrade in-place

  1. Safely shutdown your lotus-miner as explained here.
  2. Shutdown any seal workers
  3. Shutdown your Lotus Node (lotus daemon stop or systemctl stop lotus-daemon)
  4. Pull the new version and rebuild. For more information read the Lotus installation guide again:
export RUSTFLAGS="-C target-cpu=native -g"
git pull
git checkout <tag_or_branch>
git submodule update
make clean
make all
make install
  1. Start the Lotus daemon and wait for it to finish syncing:
lotus daemon
# or when using systemctl
systemctl start lotus-daemon

Wait for it to finish syncing

lotus sync wait
  1. Start your lotus-miner.
lotus-miner run

And your lotus-workers

lotus-worker run

Upgrade with reset

It is similar to reinstalling everything from scratch, so you can follow the usual installation and miner-setup guides after it. Before you do this, consider:

Once you are ready, stop everything and delete the data folders, or rename them:

# Assuming you are using the default data folders
rm -rf ~/.lotus
rm -rf ~/.lotusminer
rm -rf ~/.lotusworker

After that, Lotus applications will start from scratch.

Edit this page on GitHub