> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heygarth.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Guideline

> Infrastructure prerequisites and Docker setup for a self-hosted on-prem Garth deployment.

<Info>
  This page covers the **infrastructure prerequisites** for an on-prem
  (self-hosted) Garth deployment. Complete these steps before configuring your
  git provider under [OAuth App](/on-prem-setup/github).
</Info>

## Instance requirements

Provision a single host that meets the following minimum specification:

| Resource             | Requirement        |
| -------------------- | ------------------ |
| **vCPU**             | 8                  |
| **RAM**              | 16 GB              |
| **Storage**          | 200 GB SSD         |
| **Architecture**     | x86\_64            |
| **Operating System** | Ubuntu 24.04.2 LTS |

## Networking

| Item          | Requirement                                            |
| ------------- | ------------------------------------------------------ |
| **Static IP** | A dedicated static IP assigned to the instance         |
| **DNS**       | `garth.<domain>` resolving to the instance's static IP |

<Tip>
  Replace `<domain>` with your organization's domain. This DNS host is the
  `<dns-host>` referenced throughout the OAuth App setup pages.
</Tip>

## Docker setup

The Garth Team will provide the **Docker Compose file** and required
**artifacts**, along with a GCP `service-account-key.json` for pulling container
images from the private registry.

<Steps>
  <Step title="Install Docker">
    Install Docker Engine on the Ubuntu host per the
    [official Docker documentation](https://docs.docker.com/engine/install/ubuntu/).
  </Step>

  <Step title="Authenticate to the registry">
    Log in to the Garth container registry using the shared
    `service-account-key.json`:

    ```bash theme={null}
    cat service-account-key.json | docker login -u _json_key --password-stdin https://asia-south1-docker.pkg.dev
    ```

    <Warning>
      Store `service-account-key.json` securely and restrict its file
      permissions. It grants pull access to the Garth private registry.
    </Warning>
  </Step>
</Steps>

## Ingress

Configure ingress to the instance to allow:

* **Git traffic** as per your provider configuration — GitHub, Bitbucket, Azure DevOps, or GitLab.
* **LLM traffic** as per your chosen LLM provider.

### Ports

Only **Garth Service Gateway** (`4000`) and **Garth Universe** (`5173`) are
exposed externally via DNS. All other ports listen internally and must **not** be
reachable from outside the instance.

**External services**

| Service                | Port         |
| ---------------------- | ------------ |
| PostgreSQL — 18-alpine | 5432         |
| RabbitMQ — 3.13.7      | 5672 / 15672 |
| Redis                  | 6379         |
| Neo4j                  | 7474 / 7687  |
| OpenBao                | 8200 / 8201  |

**Garth services**

Open the following ports:

`4000`, `4060`, `4200`, `4220`, `4250`, `5173`, `6001`, `6010`, `6020`, `6030`, `6040`, `6050`, `8018`
