Build a Cosmos SDK Blockchain on Digital Ocean

To complete this tutorial, you will need an account with a VPS cloud provider. There are many options available, such as:
For this tutorial, we will use Digital Ocean. However, feel free to use any provider you prefer.
Step 1: Create a New Project on Digital Ocean
-
Log into your Digital Ocean account. You should see a page like the one below. Click
+New Project
. We will use a bare minimum system for this tutorial, but you can choose a more advanced version with higher RAM if needed. -
Input your project information. You can use any name you like. Click
Create
, then click "Skip for Now" on the next page. -
Choose a location close to you for better performance.
-
For this tutorial, select Ubuntu LTS 22.04.
-
Choose a Shared CPU option, as it is the most cost-effective choice.
-
Select the Regular CPU and SSD option.
-
Choose the password login option instead of the public key option (or use a public key if you prefer). Remember to keep your password secure, as you will need it to access your server.
-
Click
Create
at the bottom of the page. -
You will see your
droplet
being created. Once it finishes, it will display the IP address for your server. Copy this IP address.
Step 2: Access Your Server
-
Open a terminal or command prompt on your local machine.
-
Connect to your server using SSH:
ssh root@your.server.ip.address
-
Type
yes
if prompted. -
Enter your password when prompted.
-
If successful, you should see a root prompt that looks something like this:
Step 3: Install Dependencies
Run the following commands to update your system and install the necessary dependencies:
sudo apt update
sudo apt install build-essential
sudo apt install gcc
sudo apt install wget
sudo apt install curl
Step 4: Install Golang
-
Download and install Golang:
sudo wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
Step 5: Update the .bashrc File
-
Open the
.bashrc
file for editing:sudo nano ~/.bashrc
-
Copy and paste the following lines into the file:
export GOROOT=/usr/local/go export PATH=$PATH:$GOROOT/bin export PATH=$PATH:~/go/bin
-
Save the file and exit the editor (Ctrl + X, then Y, then Enter).
-
Source the
.bashrc
file to apply the changes:source ~/.bashrc
Step 6: Verify Golang Installation
Check if Golang was installed correctly:
go version
You should see an output similar to this:
Step 7: Install Ignite CLI
Now that Golang is installed, you can install the Ignite CLI to build a Cosmos SDK blockchain.
-
Install Ignite CLI:
sudo curl https://get.ignite.com/cli@v0.26.1 | sudo bash
-
Move Ignite to your
/usr/local/bin/
directory:sudo mv ignite /usr/local/bin/
-
Verify if Ignite CLI was installed correctly:
ignite version
-
Scaffold an example Blockchain
ignite scaffold chain example cd example ignite chain serve
Conclusion
Congratulations! You have successfully installed Ignite CLI on a cloud server and built an example Cosmos SDK Blockchain. You are now ready to start building your blockchain!
For more articles on creating application-specific blockchains, please visit our website: