Install Motoko locally
Follow these steps to set up your local Motoko development environment.
1. Install the IC SDK
To develop Motoko projects, you need the Motoko compiler (moc
). The Internet Computer Software Development Kit (IC SDK) includes the latest version of moc
along with utilities for creating, deploying, and managing applications.
- Linux
- macOS
- Windows
Prerequisites
Open a terminal window. Download and install Node.js.sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
To customize your IC SDK installation, you can use the interactive installation prompt or set environment variables for a terminal session.
Confirm the IC SDK has been installed (you may need to open a new terminal window):
dfx --version
Prerequisites
Open a terminal window. Download and install Node.js. Using HomeBrew is recommended. Apple silicon machines: Download and install Rosetta:softwareupdate --install-rosetta
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
To customize your IC SDK installation, you can use the interactive installation prompt or set environment variables for a terminal session.
Confirm the IC SDK has been installed (you may need to open a new terminal window):
dfx --version
Prerequisites
dfx
is not natively supported on Windows. You will need to install a Linux instance via Windows Subsystem for Linux and run all commands within that Linux instance.
wsl --install -d ubuntu
Open the WSL Linux environment. Run all following commands within this environment. Download and install Node.js within your WSL Linux environment.sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
To customize your IC SDK installation, you can use the interactive installation prompt or set environment variables for a terminal session.
Confirm the IC SDK has been installed (you may need to open a new terminal window):
dfx --version
2. Install the Motoko VS Code extension
While you can use any IDE for Motoko development, Visual Studio Code (VS Code) is recommended.
If you are using VS Code, you can enhance your development experience by installing the official Motoko extension.
Explore Motoko use cases
- Web applications
- DeFi
- Chain Fusion
Motoko makes it easy to build scalable backend services for web applications.
Build decentralized finance (DeFi) applications using Motoko.
Develop cross-chain applications and integrate directly with other blockchains.