# How to create a Starknet Node

By [Only Dust](https://paragraph.com/@only-dust) · 2022-07-15

---

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](https://storage.googleapis.com/papyrus_images/370e3b5fea1e6926f3b295a0d8cb74b8f08aa9c79a071abb10badbd62b43761d.png)

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
------------

![](https://storage.googleapis.com/papyrus_images/d6d59c66747c54d982ca0a39e9cba2467f8e3ee27f48dc13009428ba38b12bd7.png)

*   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

    Connect to infura and create an account
    

[https://infura.io/](https://infura.io/)

    After creating our account, go to 'CREATE NEW PROJECT'
    

![Screenshot of infura dashboard](https://storage.googleapis.com/papyrus_images/ea99527be2ad61786ca7c62d73e067830b44eeaa1b9963ef547e16213b9e0499.png)

Screenshot of infura dashboard

    Choose PRODUCT → Ethereum & Choose a PROJECT NAME → here Mirror xyz
    

![](https://storage.googleapis.com/papyrus_images/d7b499eb87704e1603351661e56d4ac3709460ad6375d58381eb33767d22e747.png)

    Select CREATE
    

![Screenshot of infura](https://storage.googleapis.com/papyrus_images/b5a9feb3eb68706833c7b944bf12b009b35af801b61a93ed3faa339edc3427bb.png)

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.
    

![](https://storage.googleapis.com/papyrus_images/56ff490afaee929c4c7da2d94d056129584a31510a993c4b6df499cd7bf9f88f.png)

> 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](https://storage.googleapis.com/papyrus_images/d747e84c01d091e8c5d1cf86976001baa769292167ae30b7fcc224616a2d3de0.png)

terminal ubuntu

### Third step → Paste your generated endpoint on Infura or Alchemy

![pasted endpoint](https://storage.googleapis.com/papyrus_images/4180a4c6895e7fed30bd8e73c85081cb4bba1db788c5a5e6648b49a9034adbde.png)

pasted endpoint

### Press Enter and Go drink a coffee it’s time to build release

![](https://storage.googleapis.com/papyrus_images/d35ba4a26494d52c0a8d47407ce1f6d5555c26588c8265261c8845e375a60162.png)

Wait ≈ 15 minutes and go back to your screen, you should have this message on your terminal:

![](https://storage.googleapis.com/papyrus_images/e52c986fe0200fd83d26135af7db5f114eca9666a4c14343f9961e6af265598a.png)

To check the log:

    sudo journalctl -f -u starknet
    

![screenshot of starknet service](https://storage.googleapis.com/papyrus_images/1f99187afbfdc573b85e7e514eaf61305b336f48377f015b5febeaa305ff3317.png)

screenshot of starknet service

Install Starknet node as a service
----------------------------------

Check the block on voyager:

[https://voyager.online/](https://voyager.online/)

you can use also the new interface of voyager:

[https://beta.voyager.online/](https://beta.voyager.online/)

Enter to the last transaction:

![](https://storage.googleapis.com/papyrus_images/06b359af4c63de718fa8bd36f668366d0501f8340e4276a0e7f10988e74c6ddd.png)

Check the number of block:

![](https://storage.googleapis.com/papyrus_images/2cbfb09aff90c8e05550399e5ce07a907396192f8ed9e0c166663c43ab7e7ac0.png)

> If you want to share your node with the community open the port 9545, add custom DNS if you want

### Your fresh Starknet Node will be sync at block 3021, from my labs on AWS with a high bandwitch, I have taken 30 minutes to be sync ;)

You can check the number of requests increase on Infura:

![](https://storage.googleapis.com/papyrus_images/768e11fc49efaf25a17d61bb7f2e759a00ea78674c36c46f557602a5f9856897.png)

After 50 minutes, our new node is syncing with block 3023:

![](https://storage.googleapis.com/papyrus_images/d472fe52a8dbe1d1355e3f8b490a3183c55e4167f39b56990ef787529303f773.png)

On gorli we have ≈ 260 000 blocks so keep cool and wait sync during a few days

Have fun and let’s grow the community of Starkware!

![](https://storage.googleapis.com/papyrus_images/764af36a2391bb7e3b68e1a9c690622379aed09772c1a20b41cb5c26af864b79.png)

---

*Originally published on [Only Dust](https://paragraph.com/@only-dust/how-to-create-a-starknet-node)*
