Skip to main content

Specifying the replica version in dfx

Advanced

Overview

The replica version included in the most recent release of dfx may not reflect the most up to date replica release. In some workflows, such as testing new features of the replica, having the most recent version of the replica may be desirable.

Using a specific replica version

To use a specific replica version, there are two options:

  1. Set the DFX_REPLICA_PATH local environment variable to reflect DFX_REPLICA_PATH=<path to new replica>. If this option is used, it is also necessary that canister_sandbox and sandbox_launcher are in the same directory with the desired replica version.

  2. Use the commands dfx cache install && cp <path to new replica> "$(dfx cache show)/replica" to copy the replica version into dfx's cache.