Building Aptos From Source
CLI Binary releases are available, but if you want to build from source for an Aptos node or CLI, this is how.
Supported operating systems
Aptos can be built on various operating systems, including Linux, macOS. and Windows. Aptos is tested extensively on Linux and macOS, and less so on Windows. Here are the versions we use:
Linux - Ubuntu version 20.04 and 22.04
macOS - macOS Monterey and later
Microsoft Windows - Windows 10, 11 and Windows Server 2022+
Clone the Aptos-core repo
Install Git. Git is required to clone the aptos-core repo, and will need to be installed prior to continuing. You can install it with the instructions on the official Git website.
Clone the Aptos repository. To clone the Aptos repository (repo), you first need to open a command line prompt (Terminal on macOS / Linux, PowerShell on Windows). Then run the following command to clone the Git repository from GitHub.
Now let’s go into the newly created directory
aptos-core
by changing directory orcd
ing into it:
(Optional) Check out release branch
Optionally, check out a release branch to install an Aptos node. We suggest you check out devnet
for your first development. See Choose a network for an explanation of their differences.
Realease Branches Devnet
Testnet
Mainnet
Prepare your developer environment by installing the dependencies needed to build, test and inspect Aptos Core. No matter your selected mechanism for installing these dependencies, it is imperative you keep your entire toolchain up-to-date. If you encounter issues later, update all packages and try again.
Additional Tools
If you used scripts/dev_setup.sh
for macOS or Linux setup, additional tools are optionally available.
Building Aptos
The simplest check that you have a working environment is to build everything and run the tests.
Terminal
If you have already installed the Move Prover Tools above then you don’t need to skip the prover tests. To install the prover (optional), follow the Prover guide
Other documentation of specific tools has recommended patterns for cargo build
and cargo run
Other resources
Last updated
Was this helpful?