How to sync a Stacks node
Learn how to sync a Stacks node for running a local devnet or mainnet.
Running a Stacks node is crucial for developers aiming to interact directly with the Stacks blockchain. It allows for the verification of transactions, ensures decentralized operations, and enhances blockchain security.
In this guide, you will learn how to:
- 1Clone the Stacks blockchain Docker repository.
- 2Start the service.
- 3Monitor the node's synchronization process.
Clone the Stacks blockchain Docker repository
Clone the Stacks blockchain Docker repository from GitHub:
$git clone https://github.com/blockstack/stacks-blockchain-docker.git$cd stacks-blockchain-docker
Start the service
Inside of the stacks-blockchain-docker
directory, run the following command to start the Stacks node:
$./manage.sh -n <network> -a start
The <network>
placeholder used below can be replaced with one of:
mainnet
testnet
mocknet
Monitor the node's synchronization process
To follow the logs for the Stacks node, run the following command:
$./manage.sh -n <network> -a logs
For networks other than mocknet
, downloading the initial headers can take several minutes. Until the headers are downloaded, the /v2/info
endpoints won't return any data.