StarkNet — Node Setup Guide

Nunoy Nungning
3 min readNov 16, 2023

Here’s how to set up your StarkNet node in just a few simple steps.

Hardware Requirements

The following hardware minimum requirements are recommended for running the starket node:

🔲OS: Ubuntu 20.04–22.04
🔲Memory: 8 GB RAM
🔲CPU:
with at least 2 Core
🔲Disk: 50 GB SSD Storage

Create API KEY

In order to run Starknet, we’ll be utilizing Alchemy’s nodes. To get started, simply register for an account at alchemy.com and create endpoints in your personal account.

Head over to https://alchemy.com/?r=TgwODk1MjUxMDYxM and complete to register.

1. Go to https://dashboard.alchemy.com/apps
2. Click “Create new app
3. Select “Ethereum” Chain
4. Choose “Ethereum Mainnet” Network
5. Insert Your App Name, and Your Description.
6. Click “Create app

View Your API Key

Copy “Your HTTPS key”

Installing Startnet Node

1. Log on you Server
2. Replace YOUR_ALCHEMY_HTTPS_ADDRESS with your alchemy HTTPS address.

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

Example (Do not copy! , Please use you alchemy HTTPS address)

ALCHEMY=https://eth-mainnet.g.alchemy.com/v2/apikeyforrunstarknetnodejj3GJKGxsJ812D
echo 'export ALCHEMY='$ALCHEMY >> $HOME/.bash_profile

3. Install Required Tool

sudo apt update && sudo apt install git curl pkg-config libssl-dev libzstd-dev build-essential protobuf-compiler -y
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
source $HOME/.bash_profile
rustup update stable --force
mkdir -p $HOME/.starknet/db
cd $HOME
rm -rf pathfinder
git clone https://github.com/eqlabs/pathfinder.git
cd pathfinder
git fetch
git checkout v0.9.5
cargo build --release --bin pathfinder
source $HOME/.bash_profile
sudo mv ~/pathfinder/target/release/pathfinder /usr/local/bin/
echo "[Unit]
Description=StarkNet
After=network.target

[Service]
User=$USER
Type=simple
ExecStart=/usr/local/bin/pathfinder --http-rpc=\"0.0.0.0:9545\" --ethereum.url \"$ALCHEMY\" --data-directory \"$HOME/.starknet/db\"
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target" > $HOME/starknetd.service
sudo mv $HOME/starknetd.service /etc/systemd/system/

4. Start Your Node

sudo systemctl restart systemd-journald
sudo systemctl daemon-reload
sudo systemctl enable starknetd
sudo systemctl restart starknetd

5. Goto Starknet Discord channels #☊|full-node-why-you-post-ip-numbers-makes-no-sense

Capture your node screens and your app dashboard on alchemy sent to this room.

(Optional) Command

Check logs

journalctl -u starknetd -f

Check node status

systemctl status starknetd

Restart node

systemctl restart starknetd

Stop node

systemctl stop starknetd

Delete node

systemctl stop starknetd
systemctl disable starknetd
rm -rf ~/pathfinder/
rm -rf /etc/systemd/system/starknetd.service
rm -rf /usr/local/bin/pathfinder

--

--