How to create a Starknet node in a few minutes, this article will explain how to build a starknet node quickly and easier.
A few months ago it was complicated to have a syncing Node, especially on Görli, You’re thinking you were sync but you were not, nobody had a Node Sync because pathfinder was not stable with a lot of blocks. We encountered a few errors like this screenshot. Now in this article, I will explain how to build a sync Node quickly and easier.
Error catched on Starknet Node
At Onlydust we have created a terraform stack with Rundeck server to automate the creation of nodes. In 10 minutes and in one commit, our new node is almost ready and starts syncing, also syncing duration depends on your connection speed. We also use an endpoint of Ethereum Node with our own Node. In this article to be fast, we will use an endpoint from Infura or Alchemy.
Prerequisite
Ubuntu 20.04 LTS
Can execute sudo command
An account on Infura or Alchemy
We will use the user ubuntu, but you can adapt the script with your own user
Create an account on Infura
I have taken the choice to use Infura but you can do the same on Alchemy
After creating our account, go to 'CREATE NEW PROJECT'
Screenshot of infura dashboard
Choose PRODUCT → Ethereum & Choose a PROJECT NAME → here Mirror xyz
Select CREATE
Screenshot of infura
Keep this endpoint, You will need to add this url to the script cloned from github.
You can choose another endpoint for Görli, for example. Just switch the endpoint as seen on this screenshot.
For information, I will delete this POC project after publishing this article, don’t try to use this endpoint or other information on this screenshot.
Install Starknet node as a service
First step navigate to $HOME with ubuntu user
cd /home/ubuntu
Second step → Clone Onlydust github repo (still with user ubuntu)
git clone https://github.com/onlydustxyz/starknet-node
cd starknet-node
chmod +x install.sh
./install.sh
terminal ubuntu
Third step → Paste your generated endpoint on Infura or Alchemy
pasted endpoint
Press Enter and Go drink a coffee it’s time to build release
Wait ≈ 15 minutes and go back to your screen, you should have this message on your terminal: