> For the complete documentation index, see [llms.txt](https://docs-lunar.earthly.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-lunar.earthly.dev/install/lunar-hub/self-hosted.md).

# Self hosted

Self hosting means you run Lunar Hub on your own Kubernetes cluster and operate it: you provision its dependencies, run `helm install`, and own upgrades, secret rotation, and backups. If you would rather Earthly did all of that, see [Lunar Dedicated](/install/lunar-hub/dedicated.md) instead.

{% hint style="info" %}
Lunar Hub is supported on **Kubernetes only**. Bare-metal and Docker installations are not supported.
{% endhint %}

## In order

1. [**Overview**](/install/lunar-hub/self-hosted/overview.md) — what a Hub deployment is made of: the Hub service, the operator, the transient snippet pods, and the external dependencies they need. Read this first if you want the shape of the system before committing to it.
2. [**Prerequisites**](/install/lunar-hub/self-hosted/prerequisites.md) — Postgres, S3 buckets, namespaces, DNS, a licence, and your Git platform credentials. Everything that must exist before `helm install`.
3. [**Install walkthrough**](/install/lunar-hub/self-hosted/install-walkthrough.md) — step by step from zero to a working Hub, including the values file and how to verify the install.
4. [**Sync Config**](/install/lunar-hub/self-hosted/sync-config.md) — keep the Hub's copy of your configuration current on every push, from a GitHub Action or a GitLab CI job. Strongly recommended: without it you apply config changes by hand.
5. [**Day-2 operations**](/install/lunar-hub/self-hosted/day-2-operations.md) — upgrades, secret rotation, observability, backup and restore, and uninstall.

## Before you start

Two neighboring sections apply to Dedicated installs as well, so they sit outside this one:

* [**Git Platforms**](/install/git-platforms.md) covers creating the credential the Hub authenticates with, on GitHub or GitLab. You need it by the prerequisites step.
* [**Lunar CI Tracer**](/install/ci-tracer.md) covers build-time data, if you want it. The tracer installs on your CI runners rather than in the cluster, so it is independent of the Hub install and can be added later.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-lunar.earthly.dev/install/lunar-hub/self-hosted.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
