# Installation

### Introduction

This guide will walk you through the installation process for running a Nesa node.

***

### Download and Execute the Bootstrap Script

To download and run the bootstrap script, use the following command:

<pre class="language-bash"><code class="lang-bash"># For all operating systems
<strong>bash &#x3C;(curl -s https://raw.githubusercontent.com/nesaorg/bootstrap/master/bootstrap.sh)
</strong></code></pre>

{% hint style="info" %}
**Hint**: Ensure Docker is running before executing the script.
{% endhint %}

{% hint style="info" %}
**View Your Node's Performance**

Visit <https://node.nesa.ai> and enter your Node ID.

You can find your Node ID by re-running the bootstrap script (above) and reading the Node ID from the script's header.
{% endhint %}

***

### Node Configuration

During the script execution, you will be prompted to configure your node:

1. **Moniker**: Choose a unique name for your node.

   ```bash
   # Example prompt
   Choose a moniker for your node: <Your Node Name>
   ```
2. **Node Type**: Select whether your node will be a Validator or a Miner.

   ```bash
   # Example prompt
   What type(s) of node is <Your Node Name>?
   [ ] Validator
   [ ] Miner
   ```

   * **Validator**: Enter the private key for the validator.

     ```bash
     # Example prompt
     Validator's Private Key: <Your Private Key>
     ```
   * **Miner**:
     * **Miner Type**: Choose between Distributed Miner or Non-Distributed Miner.

       ```bash
       # Example prompt
       What type of miner will <Your Node Name> be?
       [ ] Distributed Miner
       [ ] Non-Distributed Miner
       ```
     * **Model Selection**:
       * For Distributed Miner: Select an existing swarm or start a new one.

         ```bash
         # Example prompt for Distributed Miner
         Would you like to join an existing swarm or start a new one?
         [ ] Join existing swarm
         [ ] Start a new swarm
         ```

         If starting a new swarm:

         ```bash
         # Example prompt
         Which model would you like to run? (meta-llama/Llama-2-13b-Chat-Hf)
         ```
       * For Non-Distributed Miner: Enter the model name to run.

         ```bash
         # Example prompt for Non-Distributed Miner
         Which model would you like to run? (meta-llama/Llama-2-13b-Chat-Hf)
         ```

### **Understanding Swarms**

A swarm in the context of Nesa is an orchestrator with one or more miners working collaboratively to handle inference tasks. Distributed miners can join an existing swarm to contribute to an ongoing effort or start a new swarm to initiate a new collaborative mining process.

**Swarm Configuration Process**:

1. **Select an Existing Swarm**:
   * You will be presented with a list of available swarms.
   * Select the swarm you want to join.
   * The script will configure your node to connect to the selected swarm.
2. **Start a New Swarm**:
   * Enter the model name you want to run.
   * The script will set up a new swarm for this model.
   * Your node will act as the initial member of this new swarm, and others can join later.

***

### Final Setup

After completing the configuration:

1. The script will set up the working directory and clone the necessary repositories.
2. Docker containers will be started using `docker-compose`.

To check the status of your node:

```bash
# Check Docker containers status
docker ps
```

{% hint style="info" %}
**Note**: Ensure all required Docker containers are running.
{% endhint %}

***

#### Additional Help/Support

If you need any additional help or support, please visit the [Nesa Discord](https://discord.gg/nesa) for community support and discussion. You can also explore additional documentation to deepen your understanding of Nesa and its features.
