---
title: "ezgh warehouse warehouses create"
description: "Create a warehouse."
---

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

# ezgh warehouse warehouses create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh warehouse warehouses create <name> --engine-version v --instance-type t --storage-size-gib n --subnet s [flags] [--wait]
```

Create a warehouse in a subnet of your VPC. `ezgh warehouse warehouses engine-versions` lists the versions. `--shards` (1 to 8) and `--replicas` (1 to 3) set its shape, 1 × 1 by default; each shard keeps serving through the loss of one node with 2 or 3 replicas. `--keeper` is dedicated (the default for more than one node) or colocated, for 3 or more nodes of at least 8 vCPUs and 32 GiB. Every node's instance type needs at least 8 GiB of memory. `--from-backup` &lt;whs\_ ID&gt;/&lt;backup ID&gt; restores a backup into the new warehouse, with the backup's number of shards as `--shards` (`ezgh warehouse backups get` shows it); it needs warehouse.warehouses.query on the backup's warehouse. Its users come across with new passwords in new Secrets; connections don't. The app user's password is written to a new Secret in the project, which `ezgh warehouse users get <warehouse> app` names. It takes minutes: `--wait` waits until it's available and prints it.

Part of [`ezgh warehouse warehouses`](/cli/reference/warehouse-warehouses).

## Examples

```sh
ezgh warehouse warehouses create analytics --engine-version 26.8 --shards 2 --replicas 2 \
  --instance-type gp-1.large --storage-size-gib 500 --subnet sbn_2m9x0a7qpe4k --wait
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--allowed-source-cidr` | string, repeatable |  | an IPv4 CIDR that may connect; repeat for more, at most 20 (default the VPC's ranges) |
| `--backup-retention-days` | int |  | how long backups are kept, 1 to 35 days (default 7) |
| `--backup-window` | string |  | when the daily backup is taken, HH:MM-HH:MM UTC |
| `--backups` | boolean | `true` | daily backups (`--backups=false` turns them off) |
| `--deletion-protection` | boolean |  | refuse deletes of the warehouse and its databases until it's turned off |
| `--description` | string |  | what it's for |
| `--engine-version` | string |  | the ClickHouse version, from ezgh warehouse warehouses engine-versions |
| `--from-backup` | string |  | restore this backup, &lt;whs\_ ID&gt;/&lt;backup ID&gt; |
| `--instance-type` | string |  | every node's instance type, with at least 8 GiB of memory |
| `--keeper` | string |  | the Keeper mode: dedicated or colocated (default dedicated for more than one node) |
| `--maintenance-window` | string |  | when maintenance happens, ddd:HH:MM-ddd:HH:MM UTC, at least 30 minutes |
| `--plaintext-port` | boolean |  | also serve HTTP on 8123 and the native protocol on 9000 without TLS, inside the VPC |
| `--replicas` | int |  | how many replicas of each shard, 1 to 3 (default 1) |
| `--shards` | int |  | how many shards, 1 to 8 (default 1) |
| `--storage-size-gib` | int |  | each node's storage, in GiB (at least 10) |
| `--subnet` | string |  | the subnet it's in (sbn\_…) |
| `--tag` | string, repeatable |  | a tag, key=value; repeat for more |
| `--wait` | boolean |  | wait until it's available, and print it then |
| `--wait-timeout` | duration | `10m0s` | how long `--wait` waits |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/warehouse-warehouses-create/index.mdx
