> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/server-infrastructure-setup.md).

# Server Infrastructure Setup

**Objective:** Provision a host and install Docker, Docker Compose, and AWS CLI

### Step 1: Confirm Host Sizing

Verify your host meets the minimum specifications:

| **Spec**           | **Host (Primary Services)**                                                                                                                    |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Specs              | 4 vCPU, 16 GB RAM or larger (≈ t3.xlarge)                                                                                                      |
| OS                 | Ubuntu 22.04 LTS (or equivalent)                                                                                                               |
| Storage            | 50 GB+ available disk                                                                                                                          |
| Open inbound ports | 22, 80, 3000, 4317 *(required only if integrating Claude Code)*, 5432 *(Database access, host only; no public or external* *access permitted)* |

{% hint style="info" %}
**Note:** This is the minimum supported profile for all environment sizes. If you expect high integration or commit volume, contact your Hivel representative before provisioning.
{% endhint %}

### Step 2: Provision the Host

Create a virtual machine or server with the specifications above. Record the private IP address of the host.

### Step 3: Install Docker, Docker Compose, AWS CLI, and PostgreSQL

Connect to the host and run the following commands, then verify installation.

{% code expandable="true" %}

```
# Update system
sudo apt update && sudo apt upgrade -y
sudo apt install -y postgresql postgresql-contrib
sudo apt install -y unzip

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# Install AWS CLI (needed only for the registry pull step, see section 4)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

# Verify installations
docker --version
docker-compose --version
aws --version

# Log out and back in for Docker group changes to take effect
```

{% endcode %}

### **Verify Installation Success:**

✓ Each `--version` command prints a version string with no errors\
✓ `docker ps` runs without requiring `sudo`

**If `docker ps` still requires sudo after logging back in:**

Run `newgrp docker` to activate the new group membership in your current shell session, or reboot the host if the group change still hasn't taken effect.<br>

{% columns %}
{% column %} <a href="/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/overview.md" class="button primary" data-icon="backward">Back to Overview</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/prerequisites.md" class="button primary" data-icon="forward">Prerequisites</a>
{% endcolumn %}
{% endcolumns %}
