---
url: https://void.cloud/reference/cli/platform-installation.md
description: >-
  Install a Void platform from the CLI, set its domain, and run its lifecycle
  commands.
---

# Platform Installation {#void-platform-install}

```sh
void platform install [options] [--yes]
```

| Option                                    | Purpose                                                                                 |
| ----------------------------------------- | --------------------------------------------------------------------------------------- |
| `--name <slug>`                           | Installation name used in `void-<name>-<role>` resource names; choose an unused name    |
| `--display-name <name>`                   | Human-readable platform name                                                            |
| `--account <id>`                          | Cloudflare account id                                                                   |
| `--auth-config <path>`                    | Login methods, signup policy, and environment references for provider secrets           |
| `--login-methods <methods>`               | Comma-separated `github`, `google`, `oidc`, or `cloudflare-access` login methods        |
| `--access-protection`                     | Protect the platform UI and APIs with Cloudflare Access                                 |
| `--no-access-protection`                  | Skip Cloudflare Access protection                                                       |
| `--app-access <public\|platform\|custom>` | Public apps, the platform's Access policy, or separately selected app policies          |
| `--hyperdrive <create\|id>`               | Create Hyperdrive or use the specified existing configuration                           |
| `--application-domain <domain>`           | Base domain for deployed apps                                                           |
| `--workers-dev`                           | Explicit testing mode; add an application domain later                                  |
| `--zone <domain>`                         | Cloudflare zone containing the application domain                                       |
| `--dedicated-zone`                        | Add zone-wide catch-all routes; valid only when the app domain is the whole zone        |
| `--no-dedicated-zone`                     | Skip zone-wide application catch-all routes                                             |
| `--custom-domains`                        | Let projects add their own domains; needs a dedicated zone                              |
| `--security-audits`                       | Allow [security audits](./platform-security.md#enable); needs Containers and Workers AI |
| `--runtime-logs <full\|minimal>`          | `minimal` keeps request URLs and log and exception messages out of runtime logs         |
| `--storage-location <hint\|automatic>`    | Default location hint for new project R2 buckets; `automatic` clears it                 |
| `--control-plane-domain <domain>`         | Optional API custom hostname; defaults to `workers.dev`                                 |
| `--no-control-plane-domain`               | Use the default `workers.dev` API hostname                                              |
| `--dashboard-url <origin>`                | HTTPS origin of an optional dashboard deployed separately                               |
| `--plan`                                  | Preview Cloudflare changes and save installation choices locally                        |
| `--resume`                                | Continue the matching checkpointed installation                                         |
| `--runtime <path>`                        | Deploy a locally built, integrity-checked runtime directory                             |
| `--yes`                                   | Acknowledge Cloudflare changes in non-interactive use                                   |

Follow [Install a Void Platform](../../guide/self-hosted-platform.md) for prerequisites and guided setup. Use a dedicated empty PostgreSQL database and choose a login method. Unattended installs default to GitHub.

Use `--workers-dev` to try the platform before setting up a domain. Omit `--application-domain`, `--zone`, and `--dedicated-zone` in this mode. For a separately deployed dashboard, pass its HTTPS origin with `--dashboard-url` to allow login callbacks.

Cloudflare browser login works for read-only plans and workers.dev installs with the default API hostname. To create a zone or write DNS, supply a management token interactively or through `CLOUDFLARE_API_TOKEN` or `CF_API_TOKEN`. The installed platform needs its own runtime token. See [Credentials](../../guide/platform/installation/credentials.md) and [Install from CI](../../guide/platform/installation/ci.md) for the required permissions and variables.

For login configuration, use `--auth-config` or `--login-methods` with the Access protection flags. Set the default access for new apps with [`--app-access`](../../guide/platform/installation/setup.md#choose-who-can-access-apps). To enable email, set both `VOID_EMAIL_SENDER_DOMAIN` and `VOID_EMAIL_SHARED_ZONE_ID`.

Use `--plan` to preview resources and credentials. Run `void platform install` to select a saved plan. To continue an interrupted installation, including one waiting for DNS delegation, run:

```sh
void platform install --resume --name <installation-id>
```

## `void platform domain set` {#void-platform-domain-set}

```sh
void platform domain set <domain> [--installation <id>] [--zone <domain>] [--dedicated-zone] [--plan] [--yes]
```

Add an application domain to a workers.dev test platform. Domain-based installations remain the recommended default. The command detects the zone when possible, creates missing DNS and routes after confirmation, and checks HTTPS and project Zero Trust protection before making the domain canonical. If DNS, certificates, or protection are pending, rerun the same command to resume. `--plan` is read-only; non-interactive mutations require `--yes`.

Existing workers.dev URLs remain available, and the platform API origin, OAuth callback, projects, and deployments stay unchanged. The command verifies the running runtime token's Cache Purge permission for the new zone. A disabled platform stays disabled. Use the database URL from the original installation when administering from another machine. Replacing an already configured application domain is not supported. See [Adding a Domain](../../guide/platform/installation/domains.md#adding-a-domain).

## Lifecycle commands {#lifecycle-commands}

Use these commands to recover, update, pause, or remove an installation:

```sh
void platform discover [--account <id>] [--installation <id-or-name>]
void platform upgrade [id] [--runtime <path>] [--dashboard-url <origin>] [--custom-domains] [--security-audits] [--runtime-logs <full|minimal>] [--storage-location <hint|automatic>] [--plan] [--yes]
void platform rollback [id] --runtime <earlier-path> [--from-runtime <current-path>] [--plan] [--yes]
void platform repair [id] [--runtime <path>] [--dashboard-url <origin>] [--custom-domains] [--security-audits] [--auth-config <path>] [--plan] [--yes]
void platform disable [id] [--plan] [--yes]
void platform enable [id] [--runtime <path>] [--plan] [--yes]
void platform uninstall [id] [--plan] [--purge-data | --purge-resources] [--yes]
```

`discover --installation` limits recovery and endpoint verification to one installation in a shared Cloudflare account.

Use the installation slug shown beside its name in `void platform list`. Installation IDs and saved connection IDs also work. Lifecycle commands require local installation records; use `discover` to restore them on another machine. Omit `id` when only one installation is configured, or choose from the interactive picker. Non-interactive commands need a slug or ID when several installations exist. Commands that make changes also require `--yes`; `--plan` only previews changes.

`upgrade --runtime-logs <full|minimal>` changes what runtime logs record; without it, upgrades keep the current setting. See [Choose what runtime logs record](../../guide/platform/installation/setup.md#runtime-logs).

`upgrade --storage-location <hint|automatic>` changes the default location hint for new project R2 buckets. Omission keeps the current setting; `automatic` clears it. Existing buckets stay in place. See [Choose a default storage location](../../guide/platform/installation/setup.md#choose-a-default-storage-location).

To add or explicitly change a separately deployed dashboard after installation,
use `repair --dashboard-url <origin>` or `upgrade --dashboard-url <origin>`.
Preview with `--plan` first. Existing Access protection must cover the configured
dashboard origin before maintenance can proceed. See [Optional Dashboard](../../guide/platform/installation/domains.md#optional-dashboard).

While first administrator setup is pending, `repair --auth-config <path>` replaces
the login settings from a file in the install format and prints a new setup code.
Interactive repair offers the same change with the saved values filled in. Login
methods and Access protection stay as installed. Run it on the computer that
installed the platform. See [First administrator sign-in fails](../../guide/platform/installation/maintenance.md#first-administrator-sign-in-fails).

After discovery on another machine, set `VOID_PLATFORM_DATABASE_URL`. See [Manage an installation from another machine](../../guide/platform/installation/maintenance.md#manage-an-installation-from-another-machine) for the secrets needed to recreate a missing Worker.

| Command     | Behavior                                                                                                    |
| ----------- | ----------------------------------------------------------------------------------------------------------- |
| `discover`  | Verifies remote ownership and restores local installation records without downloading secrets               |
| `repair`    | Recreates missing resources owned by the installer                                                          |
| `upgrade`   | Deploys the selected runtime and supported pending migrations                                               |
| `rollback`  | Restores a declared-compatible earlier runtime without reversing PostgreSQL migrations                      |
| `disable`   | Blocks app traffic and the platform API without removing data; only admin status and sign-in stay available |
| `enable`    | Redeploys and verifies the platform Workers, then restores traffic                                          |
| `uninstall` | Blocks traffic and removes eligible resources, retaining data by default                                    |

Repair and upgrade keep a disabled platform paused.

Replacing platform Worker configuration changed outside Void requires interactive approval. Follow [Platform Workers changed outside Void](../../guide/platform/installation/maintenance.md#workers-changed-outside-void) if maintenance asks for it.

The CLI uses its packaged runtime by default. To select a [custom build](https://github.com/voidzero-dev/void/blob/main/platform/meta/development/runtime.md#deploying-your-runtime), pass its directory with `--runtime`. Relative paths resolve from your current directory.

Platform migrations only move forward. Void checks compatibility before updating the database and tells you if an intermediate release is needed.

An upgrade completes after the new Workers pass health checks. If rollout fails, Void attempts to restore the previous Workers. Retrying does not repeat completed migrations.

For rollback, pass the earlier runtime directory with `--runtime`. If the installed version is a custom build, also supply its files with `--from-runtime`.

Preview uninstall with `--plan`. By default, uninstall retains data. Use `--purge-data` to remove eligible data resources, or `--purge-resources` to remove installer-owned infrastructure as well. Zones, adopted resources, and external PostgreSQL are retained. The legacy `--keep-zone` flag has no effect.

See [Disable and Uninstall](../../guide/platform/installation/uninstall.md#remove-retained-resources) for the full removal policy and the cleanup order.
