{
  "schema_version": 2,
  "id": "operate/rs/references/cli-utilities/crdb-cli/crdb/create",
  "title": "crdb-cli crdb create",
  "url": "https://redis.io/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/create/",
  "summary": "Creates an Active-Active database.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T10:14:21+01:00",
  "page_type": "content",
  "content_hash": "92dcd4c0228037069aeb683ad85782151ea510236b9525b66dee8afd7d4c9d2c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Creates an Active-Active database.\n\n[code example]"
    },
    {
      "id": "prerequisites",
      "title": "Prerequisites",
      "role": "content",
      "text": "Before you create an Active-Active database, you must have:\n\n- At least two participating clusters\n- [Network connectivity](https://redis.io/docs/latest/operate/rs/networking/port-configurations) between the participating clusters"
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter&nbsp;&&nbsp;options(s)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                                                                             | Value                                           | Description                                                                                                                                                                                                                  |\n|---------------------------------------------------------------------------------------|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| name \\<CRDB_name\\>                                                                  | string                                          | Name of the Active-Active database (required)                                                                                                                                                                                |\n| memory-size \\<maximum_memory\\>                                                                | size in bytes, megabytes (MB), or gigabytes (GB) | Maximum database memory (required)                                                                                                                                                                                           |\n| instance fqdn=\\<cluster_fqdn\\>,username=\\<username\\>,password=\\<password\\>,url=https://\\<hostname-or-IP\\>:9443,replication_endpoint=\\<hostname-or-IP\\>:\\<port\\>,replication_tls_sni=\\<hostname\\>         | strings                                         | The connection information for the participating clusters (required for each participating cluster)<br/><br/>**Required:**<br/>• `fqdn` - Cluster fully qualified domain name<br/>• Either a username and password, or certificate credentials:<br/>&nbsp;&nbsp;- `username` and `password` - Cluster username and password<br/>&nbsp;&nbsp;- `client_cert` and `client_key` - Client certificate and its private key, as PEM strings<br/><br/>Don't provide both for the same cluster. The command fails with `Use either username/password or client_cert/client_key/trusted_ca, not both`.<br/><br/>**Optional:**<br/>• `trusted_ca` - CA that validates the API certificate the peer cluster presents, as a PEM string. Only valid with certificate credentials. If you omit it, the cluster uses the certificates in its `mtls_trusted_ca.pem` file.<br/>• `url` - URL to access the cluster's REST API<br/>• `replication_endpoint` - Address to access the database instance for peer replication<br/>• `replication_tls_sni` - Cluster [Server Name Indication (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) hostname for TLS connections<br/><br/>See [Certificate-based authentication for cluster management](https://redis.io/docs/latest/operate/rs/security/certificates/certificate-based-authentication#certificate-based-authentication-for-cluster-management). |\n| port \\<port_number\\>                                                                 | integer                                         | TCP port for the Active-Active database on all participating clusters                                                                                                                                                        |\n| default-db-config \\<configuration\\>                                                  | string                                          | Default database configuration options. For a list of database settings, see the [CRDB database config object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/crdb/database_config) reference.|\n| default-db-config-file \\<filename\\>                                                  | filepath                                        | Default database configuration options from a file. For a list of database settings, see the [CRDB database config object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/crdb/database_config) reference.|\n| wait                                                                               |                                                 | Prevents `crdb-cli` from running another command before this command finishes                                                                                                                                                  |\n| no-wait                                                                            |                                                 | `crdb-cli` can run another command before this command finishes                                                                                                                                                 |\n| compression                                                                           | 0-6                                             | The level of data compression: <br /><br > 0 = No compression <br /><br > 6 = High compression and resource load (Default: 3)                                                                                                            |\n| causal-consistency                                                                    | true <br/> false (default: false)                        | [Causal consistency](https://redis.io/docs/latest/operate/rs/databases/active-active/causal-consistency) applies updates to all instances in the order they were received                                                     |\n| password \\<password\\>                                                                | string                                          | Password for access to the database                                                                                                                                                                                          |\n| replication                                                                           | true <br/> false (*default*)                        | Activates or deactivates [database replication](https://redis.io/docs/latest/operate/rs/databases/durability-ha/replication) where every master shard replicates to a replica shard                                                       |\n| encryption                                                                            | true <br/> false (*default*)                        | Activates or deactivates encryption                                                                                                                                                                                          |\n| sharding                                                                              | true (*default*)<br/> false                         | Activates or deactivates sharding (also known as [database clustering](https://redis.io/docs/latest/operate/rs/databases/durability-ha/clustering)). Cannot be updated after the database is created                                   |\n| shards-count \\<number_of_shards\\>                                                              | integer                                         | If sharding is enabled, this specifies the number of Redis shards for each database instance                                                                                                                                 |\n| oss-cluster                                                                           | true<br/>false (*default*)                               | Activates [OSS cluster API](https://redis.io/docs/latest/operate/rs/clusters/optimize/oss-cluster-api)                                                                                                                                |\n| oss-sharding                                                                          | true<br/>false                               | Use the OSS sharding policy instead of regex rules                                                                                                                                |\n| shard-key-regex \\<regex_rule\\>                                                       | string                                          | If clustering is enabled, this defines a regex rule (also known as a [hashing policy](https://redis.io/docs/latest/operate/rs/databases/durability-ha/clustering#custom-hashing-policy)) that determines which keys are located in each shard (defaults to `{u'regex': u'.*\\\\{(?<tag>.*)\\\\}.*'}, {u'regex': u'(?<tag>.*)'} `) |\n| bigstore                                                                              | true <br/> <br/> false (*default*)                        | If true, the database uses Auto Tiering to add flash memory to the database                                                                                                                                                |\n| bigstore-ram-size \\<size\\>                                                           | size in bytes, megabytes (MB), or gigabytes (GB) | Maximum RAM limit for  databases with Auto Tiering enabled                                                                                                                                                                           |\n| with-module name=\\<module_name\\>,version=\\<module_version\\>,args=\\<module_args\\> | strings                                         | Creates a database with a specific module                                                                                                                                                                                    |\n| eviction-policy                                                     | noeviction (*default*)<br/>allkeys-lru<br/>allkeys-lfu<br/>allkeys-random<br/>volatile-lru<br/>volatile-lfu<br/>volatile-random<br/>volatile-ttl | Sets [eviction policy](https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy)                                                                                                          |\n| proxy-policy                                                                          | all-nodes<br>all-master-shards<br>single        | Sets proxy policy |"
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns the task ID of the task that is creating the database.\n\nIf `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be created and then return the CRDB GUID."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]\n\nTo create an Active-Active database with two shards in each instance and with encrypted traffic between the clusters:\n\n[code example]\n\nTo create an Active-Active database with two shards and with RediSearch 2.0.6 module:\n\n[code example]\n\nTo create an Active-Active database with two shards and with encrypted traffic between the clusters:\n\n[code example]\n\nTo create an Active-Active database with 1 shard in each instance and not wait for the response:\n\n[code example]\n\nTo create an Active-Active database where one participating cluster uses certificate credentials instead of a username and password:\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "sh",
      "code": "crdb-cli crdb create --name <name>\n         --memory-size <maximum_memory>\n         --instance fqdn=<cluster1.example.com>,{ username=<username>,password=<password> | client_cert=<cert>,client_key=<key>[,trusted_ca=<ca>] }[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]\n         --instance fqdn=<cluster2.example.com>,{ username=<username>,password=<password> | client_cert=<cert>,client_key=<key>[,trusted_ca=<ca>] }[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]\n         [--port <port_number>]\n         [--wait | --no-wait]\n         [--default-db-config <configuration>]\n         [--default-db-config-file <filename>]\n         [--compression <0-6>]\n         [--causal-consistency { true | false } ]\n         [--password <password>]\n         [--replication { true | false } ]\n         [--encryption { true | false } ]\n         [--sharding { false | true } ]\n         [--shards-count <number_of_shards>]\n         [--shard-key-regex <regex_rule>]\n         [--oss-cluster { true | false } ]\n         [--oss-sharding { true | false } ]\n         [--bigstore { true | false }]\n         [--bigstore-ram-size <maximum_memory>]\n         [--eviction-policy { noeviction | allkeys-lru | allkeys-lfu | allkeys-random | volatile-lru | volatile-lfu | volatile-random | volatile-ttl }]\n         [--proxy-policy { all-nodes | all-master-shards | single }]\n         [--with-module name=<module_name>,version=<module_version>,args=<module_args>]",
      "section_id": "overview"
    },
    {
      "id": "examples-ex0",
      "language": "sh",
      "code": "$ crdb-cli crdb create --name database1 --memory-size 1GB --port 12000 \\\n           --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin \\\n           --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin\nTask 633aaea3-97ee-4bcb-af39-a9cb25d7d4da created\n  ---> Status changed: queued -> started\n  ---> CRDB GUID Assigned: crdb:d84f6fe4-5bb7-49d2-a188-8900e09c6f66\n  ---> Status changed: started -> finished",
      "section_id": "examples"
    },
    {
      "id": "examples-ex1",
      "language": "sh",
      "code": "crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --encryption true",
      "section_id": "examples"
    },
    {
      "id": "examples-ex2",
      "language": "sh",
      "code": "crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --with-module name=search,version=\"2.0.6\",args=\"PARTITIONS AUTO\"",
      "section_id": "examples"
    },
    {
      "id": "examples-ex3",
      "language": "sh",
      "code": "crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --encryption true --shards-count 2",
      "section_id": "examples"
    },
    {
      "id": "examples-ex4",
      "language": "sh",
      "code": "crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --no-wait",
      "section_id": "examples"
    },
    {
      "id": "examples-ex5",
      "language": "sh",
      "code": "crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 \\\n           --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin \\\n           --instance fqdn=cluster2.redis.local,client_cert=<client-cert>,client_key=<client-key>,trusted_ca=<trusted-ca>",
      "section_id": "examples"
    }
  ]
}
