# Stacks Blockchain Generated on 24 Jan 2023 from [the Stacks Blockchain catalog page](https://marketplace.digitalocean.com/apps/stacks-blockchain) Help strengthen the Stacks Blockchain while also making it easier/more efficient to access the data via [API endpoints](https://docs.hiro.so/api). ## Software Included | Package | Version | License | |---|---|---| | [stacks-blockchain](https://github.com/stacks-network/stacks-blockchain) | [2.05.0.6.0](https://github.com/stacks-network/stacks-blockchain/releases/tag/2.05.0.2.0) | [GPLv3](https://github.com/stacks-network/stacks-blockchain/blob/master/LICENSE) | | [stacks-blockchain-api](https://github.com/hirosystems/stacks-blockchain-api) | [6.2.3](https://github.com/hirosystems/stacks-blockchain-api/releases/tag/v3.0.3) | [GPLv3](https://github.com/hirosystems/stacks-blockchain-api/blob/master/LICENSE) | ## Creating an App using the Control Panel Click the **Deploy to DigitalOcean** button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account. [![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/droplets/new?image=stacksfoundation-stacksblockchain) ## Creating an App using the API In addition to creating a Droplet from the Stacks Blockchain 1-Click App using the control panel, you can also use the [DigitalOcean API](https://docs.digitalocean.com/reference/api). As an example, to create a 4GB Stacks Blockchain Droplet in the SFO2 region, you can use the following `curl` command. You need to either save your [API access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) to an environment variable or substitute it in the command below. ```shell curl -X POST -H 'Content-Type: application/json' \ -H 'Authorization: Bearer '$TOKEN'' -d \ '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"stacksfoundation-stacksblockchain"}' \ "https://api.digitalocean.com/v2/droplets" ``` ## Getting Started After Deploying Stacks Blockchain **Once droplet is launched, initial startup can take several minutes while BNS data is imported (this is a one time operation)**. To keep track of the progress, you can `ssh root@your_droplet_public_ipv4` to the host and run: `/opt/stacks-blockchain-docker/manage.sh -n mainnet -a logs`. Once the stacks blockchain starts to sync with peers, application ports will open and nginx port 80 will now start proxying requests. Use http://your\_droplet\_public\_ipv4 to access the data directly, with output being similar to: ``` { "server_version": "stacks-blockchain-api v6.2.3 (master:77ab3ae2)", "status": "ready", "chain_tip": { "block_height": 16220, "block_hash": "0x3123fba9c0de6b569573494cf83c1d5d198a66bfd5f48ef97949b6bf11ba13be", "index_block_hash": "0xeec960fbbd6186b4ccac85ce12adba72be497d881f81e077305c90955b51a6ae" } } ``` All services are managed by a [systemd unit file](https://github.com/stacksfoundation/stacks-machine-images/blob/master/files/etc/systemd/system/stacks.service) that is set to start on boot. Manual control is also possible via the [manage.sh script](https://github.com/stacks-network/stacks-blockchain-docker/blob/master/manage.sh) at `/opt/stacks-blockchain-docker/manage.sh` on the host. Full details on how to use the `manage.sh` script is [available here](https://github.com/stacks-network/stacks-blockchain-docker/blob/master/docs/usage.mdt).