# Installing Software

## Server Requirements

The server (or rig – these terms are nearly interchangeable in this context) must be equipped with NVIDIA GPUs, as AMD is currently not supported. The minimum required disk space is 32 GB; for reliability, it's recommended to use an SSD instead of a flash drive. A minimum of 8 GB of RAM is required, but 16 GB will provide greater stability. As for the CPU, the system can work with a Celeron on a 1151 socket, but for more efficient performance, consider using a CPU like the i7-6700.

Before proceeding, it is highly recommended to disable any overclocking, including the Power Limit (PL), and reset the GPUs to factory settings. Afterward, stress-test the system for stability by, for example, testing the GPUs using the kawpow algorithm and loading the CPU. Monitor temperatures and ensure everything is running stably.

If the system operates stably and temperatures are within a safe range, continue to the next step in the instructions. If temperatures are too high or errors occur, address these issues first – for example, by improving cooling or troubleshooting – and ensure stable operation before proceeding.

## Recommended Drivers & CUDA (HiveOS)

HiveOS includes its own driver management via the `nvidia-driver-update` command. For best compatibility with Clore.ai workloads (especially ML/AI), use the following recommended versions:

### NVIDIA Drivers

| Branch          | Version    | CUDA Support    | Recommended For                                      |
| --------------- | ---------- | --------------- | ---------------------------------------------------- |
| **R580 (LTSB)** | 580.126.18 | Up to CUDA 12.8 | Most GPUs — stable, long-term support until Aug 2028 |
| **R590**        | 590.48.01  | Up to CUDA 13.1 | RTX 50 series (5090/5080), latest features           |

To install a specific version in HiveOS:

```bash
nvidia-driver-update 580.126.18 --force
```

For RTX 50 series GPUs:

```bash
nvidia-driver-update 590.48.01 --force
```

> **Important:** Do not use `nvidia-driver-update --force` without specifying a version — it may install an older default driver that doesn't support modern CUDA workloads.

### CUDA Toolkit Compatibility

Most renters use Docker images that include their own CUDA runtime, so hosts typically don't need to install the CUDA Toolkit manually. However, **the host's NVIDIA driver must support the CUDA version required by the renter's workload.**

| CUDA Version | Minimum Driver | Status                              |
| ------------ | -------------- | ----------------------------------- |
| CUDA 12.4    | R550+          | Widely used in ML ecosystem         |
| CUDA 12.8    | R570+          | Latest stable 12.x branch           |
| CUDA 13.1    | R590+          | Latest, optimized for RTX 50 series |

**Recommendation:** Install R580 LTSB (580.126.18) for broad compatibility with CUDA 12.x workloads. If you host RTX 50 series GPUs, use R590 (590.48.01) for full CUDA 13.x support.

## Registering and Adding the Server

### 1. Go to the [website](http://clore.ai/), register, log in, and navigate to the marketplace:

<figure><img src="https://img1.teletype.in/files/0e/86/0e86de72-544d-48d8-8d82-cf120e516a81.png" alt=""><figcaption></figcaption></figure>

### 2. **Adding a Server:** There are two ways to add a server:

**Method 1:** Go to the "My Servers" section and click the "+Add Server" button. Enter the server's name and click "Next."

<figure><img src="https://img4.teletype.in/files/f7/8e/f78e0a46-06fa-4a5d-b429-f21b78eafb6c.png" alt=""><figcaption></figcaption></figure>

After adding, the server will be marked with a red circle, meaning it is inactive. We will activate it later, but for now, click on the created server to obtain a key – you will need it later.

<figure><img src="https://img4.teletype.in/files/36/ae/36aeeab8-98e0-4fea-81e9-d731d5211df2.png" alt=""><figcaption></figcaption></figure>

### 3. HiveOS Setup:

Choose the rig and open Shell. For those who rarely use HiveOS, images have been added below for clarity.

<figure><img src="https://img1.teletype.in/files/45/06/4506318a-02cf-4de5-b5c8-bcf44df412ea.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://img3.teletype.in/files/e7/8e/e78e68e8-04da-4f84-89ab-546426d5f761.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://telegra.ph/file/49b76dd27191faca74a44.png" alt=""><figcaption></figcaption></figure>

### 4. **HiveOS Update:** Run the command:

```bash
hive-replace -y --stable
```

#### **If HiveOS Disk Space Issues Arise:** If there's less free space on the disk than expected after installation or update (e.g., only 20 GB free on a 512 GB disk), execute the following:

* **For M.2:**

  ```bash
  growpart /dev/nvme0n1 4
  resize2fs /dev/nvme0n1p4
  ```
* **For SATA:**

  ```bash
  growpart /dev/sda 4
  resize2fs /dev/sda4
  ```

### 5. **Run Updates in Sequence:**

```bash
selfupgrade --force
apt update
apt upgrade
apt autoremove
```

### 6. **Update Necessary Drivers:**

```bash
nvidia-driver-update --force
```

> **Tip:** To install a specific recommended driver version, use:
>
> ```bash
> nvidia-driver-update 580.126.18 --force
> ```
>
> For RTX 50 series GPUs, use version `590.48.01` or later.

### 7. **Reboot the Rig:**

```bash
reboot
```

### 8. **Switch to Superuser Mode:**

```bash
sudo -i
```

### 9. **Install the Software:**

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting/-/raw/main/install.sh)
```

If the system reports that `git` is missing, install it with:

```bash
apt install -y git
```

Then retry the installation.

If you encounter a `gpg` error, use:

<figure><img src="https://telegra.ph/file/e2ef8c5760193ad523e20.png" alt=""><figcaption></figcaption></figure>

```bash
apt install gpg -y --allow-downgrades
```

<figure><img src="https://img3.teletype.in/files/66/1c/661c9073-cc8e-4734-aa85-cff08902d4d6.png" alt=""><figcaption></figcaption></figure>

Afterward, rerun the installation.

```
bash <(curl -s https://gitlab.com/cloreai-public/hosting/-/raw/main/install.sh)
```

### 10. **Activate the Server:**

```bash
/opt/clore-hosting/clore.sh --init-token <token>
```

Replace `<token>` with the key obtained earlier.

If an error indicates a missing folder or file, the installation likely didn’t complete correctly, and the `clore-hosting` folder was not created. In this case, repeat the installation.

### 11. **Finalize reboot:**

Restart the rig, wait a moment, and refresh the marketplace page. If everything was set up correctly, the server will be marked with a green circle.

```
reboot
```

<figure><img src="https://img2.teletype.in/files/98/9c/989c1cbd-2670-4568-b784-020af71451be.png" alt=""><figcaption></figcaption></figure>

## How to Disable All Installed Services

If you need to disable everything previously installed:

1. Disable the services:

   ```bash
   systemctl disable clore-hosting.service
   systemctl disable docker.service
   systemctl disable docker.socket
   ```
2. Reboot the system:

   ```bash
   reboot
   ```

## How to Re-enable Services

To re-enable the services:

1. Enable the services:

   ```bash
   systemctl enable clore-hosting.service
   systemctl enable docker.service
   systemctl enable docker.socket
   ```
2. Reboot the system:

   ```bash
   reboot
   ```

## Removing the Previously Installed Token

To delete the token, use the command:

```bash
/opt/clore-hosting/clore.sh --reset
```

The file containing the token is located at:

```
/opt/clore-hosting/client/auth
```
