# Requirements for Sherpa Orchestrator Server

### System Requirements

* **OS**: Ubuntu 20.04+ is recommended, but there are usually no issues with other Linux distributions.
* **CPU**: x86-64-v2, at least 2 cores
* **RAM**: at least 4 GB, 8 GB+ recommended
* **Disk**: 20 GB+ of free space
* **Network**: Stable internet connection
* **Access**: sudo privileges for installation

**Important:**

* Installation takes time due to downloading Docker images
* After installation, internet is not required for operation

### Preparing the Server

#### Checking Resources

The following uses Ubuntu syntax; if the command does not fit, you need to change the syntax according to your OS.

```bash
# Check system resources
df -h          # Disk space
free -h        # RAM
lscpu | grep -E "^CPU\(s\)|Model name"  # CPU information
```

<details>

<summary>💡 Resource Check Comments</summary>

**df -h** - shows disk space usage in a human-readable format **free -h** - shows information about RAM **lscpu** - shows information about the CPU

**Recommended minimum values:**

* Disk: at least 20 GB of free space
* RAM: at least 4 GB
* CPU: at least 2 cores

</details>

#### Installing Basic Tools

```bash
# Update the system and install tools
sudo apt update
sudo apt install -y ca-certificates curl tar
```

<details>

<summary>💡 Basic Tools Installation Comments</summary>

**sudo apt update** - updates the list of available packages from repositories **sudo apt install -y ca-certificates curl tar** - installs the necessary tools:

* `ca-certificates` - root certificates for SSL verification
* `curl` - tool for downloading files
* `tar` - utility for working with archives
* `-y` - automatic confirmation of installation

</details>

### Installing Docker (mandatory)

Sherpa Orchestrator runs exclusively in Docker containers.

#### Installing Docker CE

```bash
# Add the official Docker GPG key
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

<details>

<summary>💡 Docker Installation Comments</summary>

**Adding the GPG key:**

* `sudo install -m 0755 -d /etc/apt/keyrings` - creates a directory for keys with the correct permissions
* `sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc` - downloads the Docker GPG key
* `sudo chmod a+r /etc/apt/keyrings/docker.asc` - sets read permissions for all

**Adding the repository:**

* `echo "deb [...]` - adds the official Docker repository to the APT sources list
* Uses environment variables to determine architecture and Ubuntu version

**Installing packages:**

* `sudo apt update` - updates the package list after adding the new repository
* `sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin` - installs Docker and components

</details>

#### Configuration and Verification

```bash
# Add user to the docker group (optional)
sudo usermod -aG docker $USER

# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

# Check installation
docker --version
docker compose version
```

<details>

<summary>💡 Docker Configuration Comments</summary>

**sudo usermod -aG docker $USER** - adds the current user to the docker group

* `-a` - append (adds to existing groups)
* `-G docker` - adds to the docker group
* `$USER` - variable with the current user's name

**sudo systemctl start docker** - starts the Docker daemon **sudo systemctl enable docker** - enables Docker to start on system boot

**docker --version** - shows the Docker version **docker compose version** - shows the Docker Compose version

**Expected result:** Docker successfully runs a test container.

</details>

### Checking Ports

Sherpa Orchestrator uses the following ports:

* **443** - HTTPS web interface (mandatory)
* **5000** - VNC proxy API
* **6080-6100** - range of ports for VNC connections

#### Checking Port Availability

```bash
# Check if the required ports are occupied
sudo netstat -tlnp | grep -E ":443 |:5000 |:608[0-9] |:609[0-9] |:6100 " || echo "Ports are free"
```

<details>

<summary>💡 Port Check Comments</summary>

**sudo netstat -tlnp** - shows all listening TCP ports and processes

* `-t` - TCP ports
* `-l` - only listening ports
* `-n` - numeric format (without name resolution)
* `-p` - shows PID and process name

**Expected result:**

* If the ports are free, the command will output "Ports are free"
* If the ports are occupied, the processes using them will be shown

</details>

### Configuration Check

#### Final Check Before Launch

```bash
# Check Docker
docker --version && docker compose version

# Check environment variables
cat .env

# Check port availability
sudo netstat -tlnp | grep -E ":443 |:5000 |:608[0-9] |:609[0-9] |:6100 " || echo "All ports are free"

# Check disk space
df -h /var/lib/docker || echo "Docker storage driver is not configured"

echo "If all checks pass successfully, you can start Sherpa Orchestrator"
```

**Expected result:** All commands should execute without errors, and the ports should be free.


---

# 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://docs.sherparpa.ru/en/sherpa-rpa/sherpa-orchestrator/ustanovka-sherpa-orchestrator/s-ispolzovaniem-docker/trebovaniya-k-serveru-sherpa-orchestrator.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.
