# Steps To Upgrade The Chain

#### 1. Login and switch to the node directory.

* cd /usr/local/go/src/github.com/scripttoken/script

{% hint style="info" %}
\*Note: Copy the previous config file and save it some where and replace it after git pull with the previous one.
{% endhint %}

#### 2. Pull the latest code from repository and check the branch to be main only.

* git branch&#x20;
* git checkout main&#x20;
* git pull

#### 3. Compilation of the code&#x20;

* cd /usr/local/go/src/github.com/scripttoken/script&#x20;
* make install

#### 4. Run the code

* Terminate the running blockchain node in background process whether it is in tmux, nohup, sceen, pm2 or other.
* cd /usr/local/go/src/github.com/scripttoken/script
* Run, /usr/local/go/bin/script start --config=../scriptnet/node&#x20;
* Enter the password and start the node.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.script.tv/for-users/blockchain-integration/steps-to-upgrade-the-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
