LogoLogo
  • Welcome
  • Explorers
    • Aptos Explorer
    • Cosmos Explorer
  • Blockchains
    • Aptos
      • Run a Validator and VFN
        • Operator
        • Node Requirements
        • Deploy Nodes
          • Using Source Code
        • Connect Nodes
          • Connect to a Network
          • Staking Pool Operations
          • Delegation Pool Operations
          • Staking Pool Voter
        • Verify Nodes
          • Node Health
          • Validator Leaderboard
        • Modify Nodes
          • Upgrade Nodes
          • Shutdown Nodes
      • Run a Public Fullnode
        • PFN Requirements
        • Deploy a PFN
          • Deploy a PFN using Source Code
        • Verify a PFN
        • Modify a PFN
          • Customize PFN Networks
          • Generate a PFN Identity
          • Upgrade your PFN
          • Run a PFN from Source Code
      • Bootstrap a Node with historical data
        • Bootstrap from a Backup
        • Bootstrap from a Snapshot
      • Configure a Node
        • State Synchronization
        • Data Pruning
        • Telemetry
        • Locating Node Files
          • Files For Mainnet
          • Files For Testnet
          • Files For Devnet
      • Monitor your Nodes
        • Important Node Metrics
        • Node Health Checker
        • Node Health Checker FAQ
        • Node Inspection Service
      • Building Aptos From Source
      • Aptos Networks
    • Berachain V2
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • gRPC Endpoint
      • Live Peers
      • Forest Staking Peer
      • Performance Optimizer Script
      • Discord & TG Alert System
      • RPC Load Balancer Setup
    • Casper
      • Explorer
    • Haqq
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Mantra
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Ika
    • Story Protocol
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • EVM Endpoint
      • Websocket
      • WSS
      • Discord & TG Alert System
      • RPC Load Balancer
      • Performance Optimizer Script
      • Live Peers
      • Forest Staking Peer
    • Supra
      • Explorer
      • Oracle data
    • Showdown
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Soarchain
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Zenrock
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Zetachain
      • Node Snapshot
      • Explorer
      • AddrBook File
      • Genesis File
      • API Endpoint
      • RPC Endpoint
      • Live Peers
      • Forest Staking Peer
    • Airchains
      • Node Snapshot
      • Explorer
  • Gunzilla - Off The Grid
    • Vision and Foundation
    • Gunzilla Hacker Dashboard
      • Key Features of the Hackers Dashboard
        • Wallet Integration and Testnet Access
        • License System with Rarity Tiers
        • Decoding Stats and Hash Power Tracking
        • Marketplace for Trading Licenses and Assets
        • Scanner Tool for Blockchain Transparency
        • Social Media Integration and Community Engagement
      • Mastering the Hackers Dashboard
      • Benefits of the Hackers Dashboard
    • Gunzilla Token Page
  • Forest Esports Team
    • Forest Hexers
  • Crypto Tools & Analytics
    • Top 10 Crypto Exchanges
      • Binance
      • Coinbase
      • Kraken
      • Bybit
      • OKX
      • KuCoin
      • Bitfinex
      • Gemini
      • Crypto.com
      • Bitstamp
    • Top 10 Wallets
      • Ledger Nano X
      • Trezor Model T
      • Exodus
      • Coinbase Wallet
      • Trust Wallet
      • MetaMask
      • Crypto.com DeFi Wallet
      • ZenGo
      • Atomic Wallet
      • SafePal
  • Top 10 Crypto Data Platforms
    • CoinMarketCap
    • CoinGecko
    • CryptoCompare
    • CoinCodex
    • Live Coin Watch
    • CoinCheckup
    • Messari
    • CoinPaprika
    • Arkham Intelligence
  • DeFi Analytics and Tracking
    • DefiLlama
    • Dune Analytics
    • DeBank
    • Zapper
    • Token Terminal
    • DeepDAO
    • Revert Finance
    • L2BEAT
  • API's
    • What are APIs?
    • How APIs Work
    • Types of APIs
    • Real-World API Use Cases
    • Benefits of Using API's
    • Challenges and Considerations of using API's
  • Node Security
    • Physical Security
    • Network Security
    • System and Software Security
    • Access Control
    • Data Security
    • Monitoring and Logging
    • Backup and Disaster Recovery
    • Best Practices for Validator Nodes
    • Cloud Security
    • Incident Response and Recovery
  • Linux Bash
    • Bash 101
      • Getting Started with Bash
      • Navigating the File System
      • File Management Basics
      • Viewing and Editing Files
      • Managing Permissions
      • Working with Processes
      • Using Pipes and Redirection
      • Bash Scripting Basics
      • Essential Networking Commands
      • Installing Software with Package Managers
    • Advanced Linux for Validator Nodes
      • Advanced Bash Scripting for Node Automation and Maintenance
      • Monitoring and Logging Essentials
      • Networking and Security Best Practices
      • Backup and Disaster Recovery
  • Staking 101
    • Understand What Staking Is and How It Works
    • Choose a Blockchain Network to Stake On
    • Set Up a Compatible Wallet for Staking
    • Purchase or Transfer Funds for Staking
    • Choose a Staking Pool
    • Connect Your Wallet to a Staking Platform
    • Confirm and Stake Your Funds
    • Monitor Staking Rewards and Performance
    • Withdraw or Re-Stake Rewards
  • Optimizing Your Infrastructure Choices
    • Infrastructure Comparison: VPS vs. Bare Metal
Powered by GitBook
On this page
  • Supported operating systems
  • Clone the Aptos-core repo
  • Building Aptos

Was this helpful?

  1. Blockchains
  2. Aptos

Building Aptos From Source

PreviousNode Inspection ServiceNextAptos Networks

Last updated 7 months ago

Was this helpful?

, 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

  1. Install . 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 .

  2. 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.

    git clone https://github.com/aptos-labs/aptos-core.git
  3. Now let’s go into the newly created directory aptos-core by changing directory or cding into it:

    cd aptos-core

(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 for an explanation of their differences.

Realease Branches Devnet

git checkout --track origin/devnet

Testnet

git checkout --track origin/testnet

Mainnet

git checkout --track origin/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.

macOS

> Using the automated script

  1. Run the dev setup script to prepare your environment:

./scripts/dev_setup.sh
  1. Update your current shell environment:

source ~/.cargo/env

You can see the available options for the script by running

./scripts/dev_setup.sh --help

> Manual installation of dependencies

If the script above does not work for you, you can install these manually, but it is not recommended:

Linux

> Using the automated script

  1. Run the dev setup script to prepare your environment:

./scripts/dev_setup.sh
  1. Update your current shell environment:

source ~/.cargo/env

You can see the available options for the script by running

./scripts/dev_setup.sh --help

> Manual installation of dependencies

If the script above does not work for you, you can install these manually, but it is not recommended:

Windows

> Using the automated script

  1. Open a PowerShell terminal as an administrator.

  2. Run the dev setup script to prepare your environment:

PowerShell -ExecutionPolicy Bypass -File ./scripts/windows_dev_setup.ps1
  1. Open a new PowerShell terminal after installing all dependencies

> Manual installation of dependencies

  1. Open a new PowerShell terminal after installing all dependencies

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

cargo build
cargo test -- --skip prover

Other documentation of specific tools has recommended patterns for cargo build and cargo run

Other resources

Ensure you have brew package manager installed:

.

.

.

and

.

.

.

and

Install .

Install . Visit their GitHub repository for the .

Install . During setup, select “Desktop development with C++” and three additional options: MSVC C++ build tools, Windows 10/11 SDK, and C++ CMake tools for Windows.

If on Windows ARM, install .

If not already installed during Visual Studio/Build Tools installation, install .

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

CLI Binary releases are available
Git
Git website
Choose a network
https://brew.sh/
Rust
CMake
LLVM
libssl-dev
libclang-dev
Rust
CMake
LLVM
libssl-dev
libclang-dev
Rust
LLVM
latest prebuilt release
Microsoft Visual Studio Build Tools for Windows
Visual Studio
CMake
Prover guide
Run a Local Development Network
Indexer
Node Health Checker