| title | Dojo Installation Guide |
|---|---|
| description | A comprehensive guide for installing a Dojo development environment across different platforms and use cases. |
import { LinkCard } from "../components/LinkCard";
Dojo's installation process was designed to be idiomatically consistent with its dependencies, Rust and Cairo. You can get up-and-running in just a few steps, and be building provable games in no time.
:::warning Windows is not natively supported. We recommend WSL2 for Windows development. :::
For existing Cairo developers, the fastest way to get started is with our asdf installer.
Simply run the following command in your terminal to install the Dojo toolchain.
curl -L https://install.dojoengine.org | bash
This script will install the asdf plugins for Sozo, Katana, and Torii, install their latest versions, and set them for global use.
Skip to Verification to test your installation.
:::note
This script requires asdf to be installed.
See here for installation instructions.
:::
Before installing Dojo, ensure your system meets these requirements:
- Operating System: macOS, Linux, or Windows with WSL2
- Memory: At least 4GB RAM (8GB recommended)
- Storage: 2GB free disk space for toolchains and dependencies
- Network: Stable internet connection for downloading binaries
- Dependencies:
curl,jq, andgit(usually pre-installed on most systems)
Before installing Dojo, you'll need these foundational tools:
Rust is required for Dojo's infrastructure tools (Katana and Torii).
Minimum version: 1.85.0
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | shThis installs Rust's executables, including the cargo package manager, in the ~/.cargo directory.
Verify installation:
cargo --version
# Should output: cargo 1.85.0 (or later)For more information, see the Rust installation guide.
Dojo is written in Cairo, StarkWare's language for creating provable programs.
Minimum version: 2.10.1
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | shThis installs Cairo's toolchain, including the scarb package manager and build tool, in the ~/.asdf directory.
:::note
asdf does not automatically add itself to your PATH and must be configured manually.
See more information about configuring asdf here.
:::
Verify installation:
scarb --version
# Should output: scarb 2.10.1 (or later)For more information, see the starkup documentation.
The Dojo framework consists of a Cairo framework and three Rust-based tools: katana, torii, and sozo.
:::note The Cairo framework is managed by Scarb as a compile-time dependency. See the Dojo configuration documentation for more info. :::
asdf is a popular version manager, supporting programmatic management of dependencies.
asdf is the preferred way to install Dojo.
:::tip
You can use our asdf installer to install the toolchain in a single command:
curl -L https://install.dojoengine.org | bash:::
::::steps
Follow the asdf installation instructions for your platform.
asdf plugin add katana https://github.com/dojoengine/asdf-katana.git
asdf plugin add torii https://github.com/dojoengine/asdf-torii.git
asdf plugin add sozo https://github.com/dojoengine/asdf-sozo.git# Install the latest version
asdf install {sozo,katana,torii} latest
# Install specific versions
asdf install {sozo,katana,torii} 1.6.0
# List available versions
asdf list all {sozo,katana,torii}# Set version locally (in project .tool-versions)
asdf set {sozo,katana,torii} latest
# Set version globally (in user home .tool-versions)
asdf set --home {sozo,katana,torii} latestasdf supports programmatic package management through the .tool-versions file.
# path/to/project/.tool-versions
scarb 2.12.2
sozo 1.7.1
katana 1.7.0
torii 1.8.3
starknet-foundry 0.43.1Simply run asdf install in the project root to install all dependencies.
If needed, asdf will download the correct version of all dependencies.
::::
dojoup is an alternative way to install and manage Dojo installations.
Dojoup is version-aware and will automatically install compatible versions of katana, torii, and sozo.
:::warning
Dojoup is deprecated and will be removed in the future.
Use the asdf installer instead.
:::
::::steps
curl -L https://raw.githubusercontent.com/dojoengine/dojo/main/dojoup/dojoup-install | bashThis command installs dojoup in the ~/.dojo directory and adds it to your shell profile.
:::info
You need to restart your terminal for the dojoup command to be available.
:::
In a new terminal window, run:
dojoup installThis installs katana, torii, and sozo in the ~/.dojo directory.
# Install a specific version
dojoup install 1.6.0
# Get help
dojoup --help::::
After installation, verify that all tools are working correctly:
# Check Sozo (CLI tool)
sozo --version
# Should output: sozo 1.6.0 (or later)
# Check Katana (sequencer)
katana --version
# Should output: katana 1.6.0 (or later)
# Check Torii (indexer)
torii --version
# Should output: torii 1.6.0 (or later)Create a simple test project to verify everything works:
# Clone the dojo-starter repository
git clone https://github.com/dojoengine/dojo-starter
# Navigate to the project
cd dojo-starter
# Build the project
sozo build
# Test successful if no errors appearDojo provides official Claude Code skills that give Claude relevant context for working with models, systems, testing, deployment, and more. For an overview of available skills, see the Dojo Overview.
To install the skills, run the following in your terminal:
npx skills add dojoengine/bookProblem: After installing dojoup, the command is not found.
Solution:
- Restart your terminal completely
- If still not working, manually source the environment:
source ~/.dojo/env - Check that
~/.dojo/binis in your PATH:echo $PATH | grep -o ~/.dojo
Problem: starkup fails to install or configure properly.
Solution:
- Ensure
asdfis properly installed - Add
~/.asdf/shimsto your PATH:export PATH="$HOME/.asdf/shims:$PATH" - Or, add it via your shell profile (
.bashrc,.zshrc, etc.)
Problem: Incompatible versions between Rust, Cairo, or Dojo components.
Solution:
-
Check current versions:
cargo --version # Should be 1.85.0+ scarb --version # Should be 2.10.1+ sozo --version # Should be 1.6.0+
-
Update if needed:
rustup update # Update Rust asdf install scarb latest # Update Cairo/Scarb dojoup install # Update Dojo
Problem: sozo build fails in the test project.
Solution:
-
Ensure all dependencies are installed
-
Try cleaning and rebuilding:
sozo clean && sozo build -
Check for version mismatches between your installed tools
If you continue to experience issues:
- Check the Dojo GitHub Issues for known problems
- Join our Discord for community support
- Review the Dojo Book for comprehensive documentation
Note: Version numbers in this guide are current as of the latest stable release. For the most current version numbers, check the Dojo releases page.
Install the Cairo 1.0 extension for:
- Syntax highlighting
- Error detection
- Auto-completion
- Code formatting
If you run into problems getting started with Dojo, join our Discord and ask for help.
With Dojo installed, you're ready to start building: