# Upgrading your node

We have a new upgrade script you will be pleased to know!\
\
To upgrade your node, login as root and once logged in run the following code.

```
cd ~
rm -rf upgrade.sh
wget -O upgrade.sh https://raw.githubusercontent.com/Geordie-R/coti-node-upgrade/main/upgrade.sh && chmod +x upgrade.sh
./upgrade.sh
```

You will be asked a series of questions once you run the code above.

* You will be asked if you are upgrading a node on the testnet or mainnet. Type number 1 for the mainnet or 2 for the testnet then press enter.
* You will be asked for your ubuntu username the node is installed under.  Leave it empty and press enter if you used "coti" originally.
* You will be asked what version of the node software you would like to install. Type the number if you know it in this format: 3.1.0 then press enter. If you leave it empty it will use the latest version.  Please note if a brand new release has just been released i may not have had time to update the latest version in the script so just type it in manually if you are upgrading to a brand new release.

If all goes well you should see UPGRADE COMPLETE! in giant letters!

#### Credits

Thanks to Cryptofirebird for the collaboration with code and testing! Checkout his excellent website with lots of useful features here: <https://coti.nebula-tech.io/>

{% hint style="danger" %}

Once you have completed the above two steps, you can [go here to check ](https://cotidocs.geordier.co.uk/installing-the-node/finally-checking-youre-up)if you are up.
{% endhint %}


---

# 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://cotidocs.geordier.co.uk/upgrading-your-node.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.
