How to Run Starknet Node

post image

We will run Starknet node by using virtual machine provided by Google Compute Engine.

  1. Google Compute Engine

  • Create a new Google email to get 300$ credit.

  • Need a credit card

  • Follow on-screen instructions. In this case, we use the Google Cloud engine for individuals, not businesses.

post image

2. Setup VM machine

  • From Google cloud compute engine dashboard, Click “VM instance” Click “Create Instance”

post image
  • Setup specification of VM as follows:

Provide Name of Instance

For Machine type — CPU: 2 cores, Memory: 4GB (minimum)
For Boot disk — OS: Ubuntu 22.04 LTS and 600GB (minimum)

3. Setup Firewall

  • Go to VPC Network — → Select Firewall

post image
  • Click “Create firewall rules”

post image
  • Fill Name

  • Change Targets from “Specified target tags” to “All Instances in the net work”

  • Fill Source IP4 ranges — 0.0.0.0/0

  • Fill TCP Port — 26656,26657,26660,9090

  • Fill UDP Port — 26656,26657,26660,9090

  • Click “Create”

post image

4. Run VM Instance

  • Click “SSH” from the VM instances page

post image
  • Type “ sudo su” to go to root user

  • Type ALCHEMY=YOUR_ALCHEMY_HTTP_ADDRESS
    echo 'export ALCHEMY='$ALCHEMY >> $HOME/.bash_profile

don’t forget to replace “YOUR_ALCHEMY_HTTP_ADDRESS"

with your alchemy address

  • Type echo 'export ALCHEMY='$ALCHEMY >> $HOME/.bash_profile

  • Install Starknet node by using command: wget -O starknet.sh https://api.nodes.guru/starknet.sh && chmod +x starknet.sh && ./starknet.sh

  • Wait until getting massage “ Your Starknet Node Install!”

References:
https://nodes.guru/starknet/setup-guide/en
https://twitter.com/FawnFawncool/status/1726182197646991502
https://twitter.com/NuNoyDeFi/status/1725186936049119293