# Lotus: switch networks

This guide will show you how to switch between various Filecoin networks with Lotus, depending on your testing or development needs.

As we mentioned in the installation guide, Lotus is compiled to operate on a single network, and the information in the configuration folder corresponds to that network.

You can choose one of the following methods to switch to a different network.

# Clean, rebuild, reinstall

The first method is the simplest. In this approach, you remove all the data related to the network you were running on before and launch a Lotus binary built to run on the new one:

  1. Shut down the Lotus daemon if it is currently running.

  2. Remove the ~/.lotus folder, or whatever you set $LOTUS_PATH to. The default is ~/.lotus.

  3. Clone the Lotus repository and move into the lotus folder:

    git clone https://github.com/filecoin-project/lotus
    cd lotus
    
  4. Build the lotus executable using make clean ... to specify which network you want to join:

    Network Build command Description
    Mainnet make clean all The production Filecoin network. FIL has real-world value on this network.
    Calibnet make clean calibnet A test network with a minimum sector size of 32 GiB. FIL has no real-world value on this network.
    Nerpanet make clean nerpanet A test network with a minimum sector size of 512 MiB. FIL has no real-world value on this network.
  5. Start the Lotus daemon again and let it sync to the new network:

    lotus daemon
    

Run on a different `$LOTUS_PATH`

This process deletes everything from the old network, including wallets. If you are on mainnet and are switching to calibnet but you want to keep all your mainnet data intact for when you switch back, change your $LOTUS_PATH before running lotus daemon:

To change your $LOTUS_PATH run: export LOTUS_PATH=~/.new-lotus-path.

# Backing up Lotus data

If you wish to backup Lotus data, copy the ~/.lotus (or $LOTUS_PATH) folder somewhere. This will take quite a while if the Lotus node has synced the whole network.

Another alternative is to export your wallets and also export the chain for later re-import on a newly installed Lotus Node.