Run A Starknet Node
System Requirements
CPU 4CPU
RAM 4GB
Storage 500GB+
OS Ubuntu 20.04 LTS
However, this article doesn’t contain the any VPS recommendations. Only Mode process. If you need a VPS for this, I recommend Fast Host. Choose the VPS of the Month Plan. It cost $1 in a month for the period of 3 Month.
You will need to create API Key
Sign Up to Alchemy
Create Account
On your dashboard click on create app
Choose Chain as Ethereum and Ethereum Mainnet
Input your App Name and Simple details
Create your App
Now, Click on your App to View your API Keys
Now Login to your terminal
Paste this command to start with :
Replace the HTTP Address from your Alchemy app then replace it instead of YOUR_HTTP_ADDRESS
Press Enter to Continue
ALCHEMY=YOUR_HTTP_ADDRESS
Then paste this
echo 'export ALCHEMY='$ALCHEMY >> $HOME/.bash_profile
Let’s Install the Required Tools
Paste the next command
sudo apt update && sudo apt install git curl pkg-config libssl-dev libzstd-dev build-essential protobuf-compiler -y
Let’s Install Rust
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
source $HOME/.bash_profile
rustup update stable --force
We will be using Pathfinder
Paste all at once
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/
Allow commands to load successful…. Might take few seconds
Press Enter for the next command
Then Paste this
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/
Press enter
Let’s Start Our Node
Paste this codes one by one
sudo systemctl restart systemd-journald
sudo systemctl daemon-reload
sudo systemctl enable starknetd
sudo systemctl restart starknetd
Now your node is up and running
Use this command to check you node status
systemctl status starknetd
Screenshot this part as we will send the feedback to Starknet Discord Channel.
Other Commands that might be useful later.
Check Logs
journalctl -u starknetd -f
Stop Node
systemctl stop starknetd
Restart Node
systemctl restart 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
Go to your Alchemy Dashboard as you can see that your node is already syncing. You can keep monitoring your node status from your Alchemy Account.
Also screenshot this and send together with the previous one
Find this helpful, Don’t Forget to Subscribe to my Email list and follow me.