> For the complete documentation index, see [llms.txt](https://docs.ternoa.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ternoa.network/nodes-and-validators/installing-ternoa.md).

# Installing Ternoa

We have made an installer script automates the installation process of the Ternoa Node software on Debian/Ubuntu-based systems. It downloads the Ternoa Node binary, creates a systemd service, and sets up necessary configurations.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Debian/Ubuntu-based Linux distribution
* Internet connection to download the Ternoa Node binary
* Sudo privileges

<figure><img src="https://4243142665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmktDjNnp8rvsgQsujVRm%2Fuploads%2FWXIdIMFSU3NZ0XVpoHyu%2FScreenCaast.gif?alt=media&amp;token=86da4483-21fe-4757-a31b-2042f91dc895" alt=""><figcaption><p>Ternoa installer is very easy to use</p></figcaption></figure>

### Usage <a href="#usage" id="usage"></a>

1. Download the installer script:

   ```bash
   curl -sSL install.ternoa.network -o ternoa-installer.sh && chmod +x ternoa-installer.sh && sudo ./ternoa-installer.sh
   ```
2. Make the script executable:

   ```bash
   chmod +x ternoa-installer.sh
   ```
3. Run the script with sudo privileges:

   ```bash
   sudo ./ternoa-installer.sh
   ```
4. Follow the on-screen prompts to provide necessary inputs like Node Name, Chain Name, Validator option, etc.
5. Once the installation is complete, the Ternoa Node service will be started automatically.

### Inputs <a href="#inputs" id="inputs"></a>

* **Verion**: Required. Ternoa Binary version default is v1.3.2.
* **Node Name**: Required. Name of the Ternoa Node.
* **Chain Name**: Choose from alphanet, mainnet, or betanet. Default is mainnet.
* **Archive Mode**: Choose true or false. Default is true.
* **Enable Prometheus**: Choose true or false. Default is false.
* **Prometheus Port**: Optional. Port for Prometheus metrics. Default is 9615.
* **Validator**: Choose true or false. Default is false.

### How it Works <a href="#how-it-works" id="how-it-works"></a>

1. The installer script detects the operating system (Debian or Ubuntu) and sets up necessary dependencies.
2. It prompts the user for required inputs such as Node Name, Chain Name, and other configurations.
3. The script downloads the Ternoa Node binary from the official repository.
4. It creates a systemd service for the Ternoa Node, ensuring it starts automatically on system boot.
5. Additional configurations like Prometheus metrics, archive mode, and validator option are applied based on user inputs.
6. Once the installation is complete, the Ternoa Node service is started automatically.
7. Logs of the Ternoa Node service are displayed for 10 seconds to verify successful installation.

### Troubleshooting

Once Ternoa is installed, let’s check to make sure that it’s working correctly:

```bash
ternoa --version
```

You can also restart the Ternoa service using.

```bash
systemctl restart ternoa 
```

or if you would like to stop it, you should run :

```bash
systemctl stop ternoa
```

to troubleshoot, and check the logs in real-time, you can run the following command:

```bash
journalctl -f -u ternoa.service
```

For more detailed instructions, view our workshop on setting up a validator node [**here**](https://docs.ternoa.network/for-node-operators/how-to-run-a-validator-node).
