# Installing on Ubuntu

## 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 OS & Drivers

### Operating System

* **Ubuntu 22.04 LTS** — recommended, best GPU driver compatibility
* **Ubuntu 24.04 LTS** — supported, but kernels 6.16+ may have issues with older driver branches (R550 and below)

### NVIDIA Drivers

| Branch      | Version    | CUDA Support    | Recommended For                |
| ----------- | ---------- | --------------- | ------------------------------ |
| R580 (LTSB) | 580.126.18 | Up to CUDA 12.8 | Most GPUs, long-term stability |
| R590        | 590.48.01  | Up to CUDA 13.1 | RTX 50 series, latest features |

Install the recommended driver:

```bash
sudo apt install nvidia-driver-580
```

Or for RTX 50 series:

```bash
sudo apt install nvidia-driver-590
```

### CUDA Toolkit (for ML/AI workloads)

Renters running ML workloads expect CUDA. Recommended versions:

| CUDA Version | Min Driver | Status                          |
| ------------ | ---------- | ------------------------------- |
| CUDA 12.8    | R570+      | Stable, wide ecosystem support  |
| CUDA 13.1    | R590+      | Latest, RTX 50 series optimized |

Most Docker images include their own CUDA runtime, so hosts don't always need to install the CUDA Toolkit system-wide. However, having compatible drivers is essential.

## 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. **Run Updates in Sequence:**

```bash
sudo apt update && sudo apt upgrade -y
```

### 4. Install dependencies:

```
sudo apt install -y curl git gnupg lsb-release
```

### 5. Switch to superuser mode:

```bash
sudo -i
```

### 6. **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)
```

### 7. **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.

### 8. **Finalize:**

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.

```
sudo 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
```
