---
title: "Choose How to Run Dex"
description: "Dex Cloud runs Dex Server for you; self-hosting runs it on your own infrastructure. Either way, your Workers run your code wherever you deploy them."
canonical_url: "https://docs.superdurable.io/components/choose-how-to-run/"
source: "docs/content/components/choose-how-to-run.mdx"
locale: "en"
---

> Index of every page for AI agents: https://docs.superdurable.io/llms.txt

# Choose How to Run Dex

Dex Server runs in one of two places: in Dex Cloud, where Super Durable runs it
for you, or on your own infrastructure. Your Workers run your Flow code in both
cases, on your servers, your cloud, or your laptop. For development, `dexcli
dev` runs a local server on your machine.

|                            | Dex Cloud                                                                                                    | Self-hosted                                                                                                                                                       |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Who operates Dex Server    | Super Durable: storage, upgrades, capacity, and monitoring                                                   | You                                                                                                                                                               |
| Where Flow state is stored | In Dex Server's storage, which Super Durable operates. Flow inputs, Attributes, and Step results live there. | In the object storage bucket you provide                                                                                                                          |
| Where your code runs       | Your Workers, on your servers, your cloud, or your laptop. Your code and your API credentials stay there.    | The same                                                                                                                                                          |
| How Workers connect        | Over TLS, with the server's API key                                                                          | Through the authentication and TLS you configure                                                                                                                  |
| Upgrades                   | Super Durable upgrades the server                                                                            | You upgrade it; upgrades roll forward. See [Upgrades and compatibility](https://docs.superdurable.io/reference/server/upgrades.md)                                |
| What you set up            | A server in Dex Cloud, which gets its own endpoint and API key                                               | The [smallest real deployment](https://docs.superdurable.io/components/production.md#smallest-deployment): a server node, object storage, authentication, and TLS |
| Pricing, regions, and SLA  | [Contact Super Durable](https://superdurable.io/about/#contact)                                              | You choose them: your cloud, your regions, your own availability targets                                                                                          |
| Get started                | [Sign up for Dex Cloud](https://dex.superdurable.io/register)                                                | [Run Dex in Production](https://docs.superdurable.io/components/production.md)                                                                                    |

<a id="dex-cloud"></a>

## Dex Cloud

Super Durable runs Dex Server for your application. Each server you create in
Dex Cloud has its own endpoint and API key. Your Workers and Clients connect to
that endpoint over TLS with the key.

Your code runs in your Workers, so your code and the credentials it uses for
your own APIs stay on your side. Flow state, meaning Flow inputs, Attributes,
and Step results, is stored by Dex Server, so in Dex Cloud it lives in storage
that Super Durable operates.

To connect a Worker or a Client, pass the endpoint and the key:

- The key goes in an [API key credential](https://docs.superdurable.io/reference/server/authentication.md#sdk-credentials).
- TLS is the SDK's [TLS option](https://docs.superdurable.io/reference/server/authentication.md#tls).

[Sign up for Dex Cloud](https://dex.superdurable.io/register), then create a
server.

<a id="self-hosted"></a>

## Self-hosted

You run **dex-server-zd** next to your Workers. It keeps every Flow in object
storage, such as Amazon S3, and a hot standby can take over when the active
node stops. You configure authentication, TLS, retention, and monitoring
yourself. [Run Dex in Production](https://docs.superdurable.io/components/production.md) lists each item.

The [Sustainable Use License](https://docs.superdurable.io/intro/limits.md#license) lets you run Dex for your
own business.

<a id="local-and-production"></a>

## Local and production

| Component   | Local development               | Production                                                |
| ----------- | ------------------------------- | --------------------------------------------------------- |
| Server      | **dexcli dev** starts server-zd | **dex-server-zd serve** with object storage, or Dex Cloud |
| Web         | **dexcli dev** starts Dex Web   | A separate **dex-web** process, or **dexcli web**         |
| Application | Your Worker process             | Your Worker service, scaled like any service              |

[Run Locally](https://docs.superdurable.io/components/run-locally.md) covers the local side, and [Run Dex in Production](https://docs.superdurable.io/components/production.md) the production side.

## Next

- [Quick Start](https://docs.superdurable.io/quick-start.md) runs a Flow against a local server.
- [Your Application](https://docs.superdurable.io/components/application.md) sets up the Worker and Client that connect to either server.
- [Run Dex in Production](https://docs.superdurable.io/components/production.md) covers a self-hosted deployment.
