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

# Installing

> To install Horizon in production or non-development environments, we recommend the following based on target infrastructure.

To install Horizon in production or non-development environments, we recommend the following based on target infrastructure:

### Bare-Metal

* If host is Debian Linux, install prebuilt binaries [from repositories](#package-manager) using a package manager.
* For any other hosts, download [prebuilt release binaries](#prebuilt-releases) of Stellar Horizon and Core for host target architecture and operation system or [compile from the source](https://github.com/stellar/stellar-horizon/blob/main/DEVELOPING.md).

### Containerized

* Non-Orchestrated: if the target deployment environment does not include a container orchestrator such as Kubernetes, then this means you intend to run the Horizon release image from [dockerhub.com/stellar/stellar-horizon](https://hub.docker.com/r/stellar/stellar-horizon) as a container directly with Docker daemon on host. Choose the tag of the Horizon image for the specific release version and then pull the image using `docker pull stellar/stellar-horizon:<tag_version>` to get it locally onto host.
* Orchestrated: when the target environment has container orchestration, such as Kubernetes cluster, we recommend using the [Horizon Helm Chart](https://github.com/stellar/helm-charts/tree/main/charts/horizon) to manage the installation and deployment lifecycle of the Horizon image as container(s) on the cluster.

To install Horizon in development environments, refer to the [Horizon README](https://github.com/stellar/stellar-horizon) from the source code repo for options available.

### Notes on Installation

#### Package Manager

SDF publishes new releases to its custom Ubuntu repositories. Follow [this guide](https://github.com/stellar/packages/blob/master/docs/adding-the-sdf-stable-repository-to-your-system.md#adding-the-sdf-stable-repository-to-your-system) to add the stable SDF repository to your host system. If you are interested in installing release candidate versions of software that have yet to reach stable, refer to [Adding the Bleeding Edge Testing Repository](https://github.com/stellar/packages/blob/master/docs/adding-the-sdf-stable-repository-to-your-system.md#adding-the-bleeding-edge-testing-repository). Lastly, [install package](https://github.com/stellar/packages/blob/master/docs/installing-individual-packages.md#installing-individual-packages) outlines the various commands that these packages make available.

To proceed with installation:

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
sudo apt update
sudo apt install stellar-horizon stellar-core
```

#### Prebuilt Releases

Refer to the list of [Horizon releases](https://github.com/stellar/stellar-horizon/releases) and [Core releases](https://github.com/stellar/stellar-core/releases). Copy the binaries to host PATH.

#### Verify Bare-Metal Installations

Run `stellar-horizon --help` from a terminal. If the help for Horizon is displayed, your installation was successful.

Some shells (such as [zsh](https://www.zsh.org)) cache PATH lookups. You may need to clear your cache (by using `rehash` in zsh, for example) or restart your shell before trying to run the command above.

#### Helm Chart Installation

If the deployment can be done on Kubernetes, there is a [Horizon Helm Chart](https://github.com/stellar/helm-charts/blob/main/charts/horizon) available. Install the [Helm CLI tool](https://helm.sh/docs/intro/install), if you haven't already on your workstation, minimum of version 3. Next, add the Stellar repo to the helm client's list of repos and confirm that you can view the list of available chart versions for the repo:

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
helm repo add stellar https://helm.stellar.org/charts
helm repo update stellar
helm search repo stellar/horizon --versions --devel
```

Wait to install the Horizon Helm Chart, it will be done after [Configuring](https://developers.stellar.org/docs/data/apis/horizon/admin-guide/configuring.md) is completed and in [Running](https://developers.stellar.org/docs/data/apis/horizon/admin-guide/running.md).

If Kubernetes is not an option, the helm charts may still be good reference for showing how to configure and run the Horizon Docker container. Just run the helm command with `template` to display the generated Kubeneretes manifests, which demonstrate all the container configurations needed:

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
git clone https://github.com/stellar/helm-charts; cd helm-charts
helm template -f charts/horizon/values.yaml charts/horizon/
```

## Next Step

After installation is complete, you are now ready to proceed to [Configuring Horizon](https://developers.stellar.org/docs/data/apis/horizon/admin-guide/configuring.md)!
