Installation

Windows is only supported through a Linux virtual environment of some kind, such as WSL

It's recommended to use nvm and Node.js 20:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Restart your terminal and then run:

nvm install 20

Check that the installation went smoothly by looking for clean output from the following command:

node --version

Install the dfx command line tools for managing ICP applications:

DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"

Check that the installation went smoothly by looking for clean output from the following command:

dfx --version

If after trying to run dfx --version you encounter an error such as dfx: command not found, you might need to add $HOME/bin to your path. Here's an example of doing this in your .bashrc:

echo 'export PATH="$PATH:$HOME/bin"' >> "$HOME/.bashrc"