Run a Node with Digital Ocean
Last updated
Was this helpful?
Last updated
Was this helpful?
This is a step by step guide to deploy the on .
Build code is hosted on this using the
Step 1
Go to the in DigitalOcean's marketplace. Click on Create Stacks Blockchain Droplet
.
Step 2
Choose a plan (it will only allow you to select a droplet that meets the minimum requirements) and your preferred datacenter region.
Step 3
Enter a root password or if you prefer.
Step 4
You can leave the rest of the options as they are and click on Create Droplet
Step 5
You will need to wait a few seconds for the droplet to get created. Once created click on it to see more information.
Congratulations! You are now running the Stacks Blockchain. You can click on Console
for a terminal window to open or login using SSH to the public IP you've been assigned to with user root
.
Once the droplet is launched, the initial startup can take several minutes while BNS data is imported (this is a one time operation) and the Bitcoin headers are synced.
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
.
After the stacks blockchain finishes the initial header sync and starts to sync with its peers, the application ports will open (20443
and 3999
) and HTTP port 80
will now start proxying requests.
Use http://your_droplet_public_ipv4
to access the data directly, with output being similar to:
:::note The name
, region
and size
values below are hardcoded, so adjust as desired. :::
:::tip For the full list of API endpoints for the Stacks Blockchain, consult the :::
All services are managed by a that is set to start on boot.
Manual control is also possible via the at /opt/stacks-blockchain-docker/manage.sh
on the host.
Full details on how to use the manage.sh script is .
In addition to creating a Droplet from the Stacks Blockchain 1-Click App via the control panel, you can also use the .
As an example, to create a 4GB Stacks Blockchain Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your to an environment variable or substitute it into the command below.