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

# Deploy the gateway

> Run the Tilde gateway as a Docker container in your own network, with PostgreSQL, ClickHouse, S3-compatible storage, an OpenTelemetry collector, and a GitHub token.

The gateway is the Tilde platform. It serves the UI, the management and ingress APIs, the agent runtime protocol, the inference gateway, and telemetry ingestion. With Tilde OSS and Tilde Enterprise, you run it as a Docker container inside your own network, next to your databases and agents. Tilde does not host any part of it.

<Info>
  With Tilde Cloud, Tilde runs the gateway for you. Skip this page, and [deploy your agents](/docs/deployment/direct-agents). See [Editions](/docs/editions).
</Info>

## Self-hosting Tilde OSS

Tilde is open source and freely available for anyone to host themselves. We include a Docker Compose file in the [tilde repository](https://github.com/trytilde/tilde), under an Apache 2.0 license, as guidance for self-hosting. Essentially, self-hosting Tilde means you run or purchase your own infrastructure, manage deployments, choose your own URLs to expose it on, and deal with any scaling issues yourself.

The self-hosted version is the same product we run on Tilde Cloud, though our infrastructure is very different to support production volume. All changes go through our standard CI/CD pipeline before they ship to Tilde Cloud and become available for self-hosted instances.

Because we don't manage self-hosted instances or provide paid support plans for them, we don't offer any sort of guarantees around Tilde working in certain ways on your infrastructure, and you assume all responsibility and risk for your use of the product and the stack.

Tilde is a complex product to run, so for production we recommend [Tilde Cloud or Tilde Enterprise](/docs/editions). Tilde Enterprise is the supported way to run Tilde on-prem.

## Deploy the gateway

Deploy the gateway first. Every agent deployment mode depends on it.

<img src="https://mintcdn.com/tilde/UIZH9VuZaVUMv6QU/images/gateway.drawio.svg?fit=max&auto=format&n=UIZH9VuZaVUMv6QU&q=85&s=eaffd8738a96ab32e97829d18dfb0bf6" alt="Tilde gateway deployed inside your on-prem environment, with infrastructure and agents on the left and ingress on the right" width="1902" height="603" data-path="images/gateway.drawio.svg" />

<div className="zoom-hint"><Icon icon="magnifying-glass-plus" size={13} /> <em>Click to zoom</em></div>

Everything inside the boundary stays private. Add the public ingress only when public chat providers such as Telnyx, WhatsApp, Slack, MS Teams, or AgentMail must deliver webhooks, or when external clients must reach chat routes. Expose only those paths.

## What the gateway depends on

The gateway needs all of these dependencies.

| Dependency | Purpose |
| - | - |
| PostgreSQL | Operational state. |
| ClickHouse | Log, trace, and metric history. |
| S3-compatible storage | The telemetry queue, trace media, skill files, attachments, and avatars. |
| OpenTelemetry collector | Receives a copy of agent telemetry for your own observability backend. |
| GitHub token | Syncs private Git skill sources, and raises GitHub rate limits. |

## Supported deployment methods

The gateway is a single Docker container, so it runs anywhere you run containers. On every platform, run the gateway in a private network behind an HTTPS ingress or load balancer.

### Docker Compose

The [tilde repository](https://github.com/trytilde/tilde) includes a Docker Compose file, `compose.yaml`, that starts the gateway's dependencies for development. Use it as guidance when you self-host Tilde OSS on a virtual machine or bare-metal server.

### Kubernetes <span className="enterprise-tag">ENTERPRISE</span>

Run the gateway on Amazon EKS, Google GKE, Azure AKS, OpenShift, or your own cluster. We recommend Kubernetes. It gives you rolling updates, health-based restarts, and secret management out of the box, and it runs the gateway and your agents side by side.

<Info>
  We provide onsite assistance for Tilde Enterprise deployments, and for monitoring them once they run.
</Info>

### Managed container services <span className="enterprise-tag">ENTERPRISE</span>

Run the gateway on Amazon ECS and Fargate, Google Cloud Run, or Azure Container Apps.

<Info>
  We provide onsite assistance for Tilde Enterprise deployments, and for monitoring them once they run.
</Info>

## Next steps

<Columns cols={2}>
  <Card title="Direct agents" href="/docs/deployment/direct-agents">
    The simplest way to connect an agent to the gateway.
  </Card>

  <Card title="Network exposure" href="/docs/security/overview#network-exposure">
    Ports, routes, and what to expose publicly.
  </Card>
</Columns>
