Run your own Stacks Blockchain node easily with just few commands.
2.2.2 or greater is required
git clone https://github.com/stacks-network/stacks-blockchain-docker && cd stacks-blockchain-docker
cp sample.env .env./manage.sh -n mainnet -a start./manage.sh -n mainnet -a start -f signerUsing data from the Hiro Archiver service, this script will download the latest files, extract them and restore the postgres data.
Note: it can take a long time to process the data, and you'll need at a minimum roughly 1.5TB of free space to download and process the chainstate archives
Note: for faster downloads, install aria2 on your system
Example aria2c install on a debian based system:
git clone https://github.com/aria2/aria2 aria2c && cd aria2c
sudo apt-get install build-essential libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev sqlite3 pkg-config autopoint binutils autoconf automake autotools-dev libtool
autoreconf -i
./configure
make && make install
sudo ./scripts/seed-chainstate.sh
./manage.sh -n mainnet -a startFor 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.
Use the command ./manage.sh -n <network> -a logs to check the sync progress.
stacks-blockchain:
curl -sL localhost:20443/v2/info | jqstacks-blockchain-api:
curl -sL localhost:3999/v2/info | jqproxy (optional argument):
curl -sL localhost/v2/info | jq
curl -sL localhost/ | jq