To install Horizon in production or non-development environments, we recommend the following based on target infrastructure:
- If host is Debian Linux, install prebuilt binaries from repositories using a package manager.
- For any other hosts, download prebuilt release binaries of Stellar Horizon and Core for host target architecture and operation system or compile from the source.
- 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 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 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 from the source code repo for options available.
Notes on Installation
SDF publishes new releases to its custom Ubuntu repositories. Follow this guide 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. Lastly, install package outlines the various commands that these packages make available.
To proceed with installation:
sudo apt update
sudo apt install stellar-horizon stellar-core
Verify Bare-Metal Installations
stellar-horizon --help from a terminal. If the help for Horizon is displayed, your installation was successful.
Some shells (such as zsh) 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 available. Install the Helm CLI tool, 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:
helm repo add stellar https://helm.stellar.org/charts
helm repo update stellar
helm search repo stellar/horizon --versions --devel
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:
git clone https://github.com/stellar/helm-charts; cd helm-charts
helm template -f charts/horizon/values.yaml charts/horizon/
After installation is complete, you are now ready to proceed to Configuring Horizon!