Skip to content

Hyperdrive

Last updated View as MarkdownAgent setup

Manage Hyperdrive database configurations using Wrangler.

To manage mTLS client certificates and CA chain certificates used by Hyperdrive, refer to Certificate commands.

hyperdrive create

Create a Hyperdrive config

npx wrangler hyperdrive create [NAME]
  • [NAME]string required

    The name of the Hyperdrive config

  • --connection-stringstring

    The connection string for the database you want Hyperdrive to connect to - ex: protocol://user:password@host:port/database

  • --service-idstring

    The Workers VPC Service ID of the origin database

  • --origin-hoststring alias: --host

    The host of the origin database

  • --origin-portnumber alias: --port

    The port number of the origin database

  • --origin-schemestring alias: --schemedefault: postgresql

    The scheme used to connect to the origin database

  • --databasestring

    The name of the database within the origin database

  • --origin-userstring alias: --user

    The username used to connect to the origin database

  • --origin-passwordstring alias: --password

    The password used to connect to the origin database

  • --access-client-idstring

    The Client ID of the Access token to use when connecting to the origin database

  • --access-client-secretstring

    The Client Secret of the Access token to use when connecting to the origin database

  • --caching-disabledboolean

    Disables the caching of SQL responses

  • --max-agenumber

    Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled

  • --swrnumber

    Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled

  • --ca-certificate-idstring alias: --ca-certificate-uuid

    Sets custom CA certificate when connecting to origin database. Must be valid UUID of already uploaded CA certificate.

  • --mtls-certificate-idstring alias: --mtls-certificate-uuid

    Sets custom mTLS client certificates when connecting to origin database. Must be valid UUID of already uploaded public/private key certificates.

  • --sslmodestring

    Sets sslmode for connecting to database. For PostgreSQL: 'require, verify-ca, verify-full'. For MySQL: 'REQUIRED, VERIFY_CA, VERIFY_IDENTITY'.

  • --origin-connection-limitnumber

    The (soft) maximum number of connections that Hyperdrive may establish to the origin database

  • --bindingstring

    The binding name of this resource in your Worker

  • --update-configboolean

    Automatically update your config file with the newly added resource

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

hyperdrive delete

Delete a Hyperdrive config

npx wrangler hyperdrive delete [ID]
  • [ID]string required

    The ID of the Hyperdrive config

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

hyperdrive get

Get a Hyperdrive config

npx wrangler hyperdrive get [ID]
  • [ID]string required

    The ID of the Hyperdrive config

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

hyperdrive list

List Hyperdrive configs

npx wrangler hyperdrive list

    Global flags

    • --vboolean alias: --version

      Show version number

    • --cwdstring

      Run as if Wrangler was started in the specified directory instead of the current working directory

    • --configstring alias: --c

      Path to Wrangler configuration file

    • --envstring alias: --e

      Environment to use for operations, and for selecting .env and .dev.vars files

    • --env-filestring

      Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

    • --experimental-provisionboolean aliases: --x-provisiondefault: true

      Experimental: Enable automatic resource provisioning

    • --experimental-auto-createboolean alias: --x-auto-createdefault: true

      Automatically provision draft bindings with new resources

    • --install-skillsboolean default: false

      Install Cloudflare skills for detected AI coding agents before running the command

    • --profilestring

      Use a specific auth profile

    hyperdrive planetscale signature


    Experimental

    Generate a signed authorization for creating a Cloudflare-billed PlanetScale database

    npx wrangler hyperdrive planetscale signature

      Global flags

      • --vboolean alias: --version

        Show version number

      • --cwdstring

        Run as if Wrangler was started in the specified directory instead of the current working directory

      • --configstring alias: --c

        Path to Wrangler configuration file

      • --envstring alias: --e

        Environment to use for operations, and for selecting .env and .dev.vars files

      • --env-filestring

        Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

      • --experimental-provisionboolean aliases: --x-provisiondefault: true

        Experimental: Enable automatic resource provisioning

      • --experimental-auto-createboolean alias: --x-auto-createdefault: true

        Automatically provision draft bindings with new resources

      • --install-skillsboolean default: false

        Install Cloudflare skills for detected AI coding agents before running the command

      • --profilestring

        Use a specific auth profile

      hyperdrive update

      Update a Hyperdrive config

      npx wrangler hyperdrive update [ID]
      • [ID]string required

        The ID of the Hyperdrive config

      • --namestring

        Give your config a new name

      • --connection-stringstring

        The connection string for the database you want Hyperdrive to connect to - ex: protocol://user:password@host:port/database

      • --service-idstring

        The Workers VPC Service ID of the origin database

      • --origin-hoststring alias: --host

        The host of the origin database

      • --origin-portnumber alias: --port

        The port number of the origin database

      • --origin-schemestring alias: --scheme

        The scheme used to connect to the origin database

      • --databasestring

        The name of the database within the origin database

      • --origin-userstring alias: --user

        The username used to connect to the origin database

      • --origin-passwordstring alias: --password

        The password used to connect to the origin database

      • --access-client-idstring

        The Client ID of the Access token to use when connecting to the origin database

      • --access-client-secretstring

        The Client Secret of the Access token to use when connecting to the origin database

      • --caching-disabledboolean

        Disables the caching of SQL responses

      • --max-agenumber

        Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled

      • --swrnumber

        Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled

      • --ca-certificate-idstring alias: --ca-certificate-uuid

        Sets custom CA certificate when connecting to origin database. Must be valid UUID of already uploaded CA certificate.

      • --mtls-certificate-idstring alias: --mtls-certificate-uuid

        Sets custom mTLS client certificates when connecting to origin database. Must be valid UUID of already uploaded public/private key certificates.

      • --sslmodestring

        Sets sslmode for connecting to database. For PostgreSQL: 'require, verify-ca, verify-full'. For MySQL: 'REQUIRED, VERIFY_CA, VERIFY_IDENTITY'.

      • --origin-connection-limitnumber

        The (soft) maximum number of connections that Hyperdrive may establish to the origin database

      Global flags

      • --vboolean alias: --version

        Show version number

      • --cwdstring

        Run as if Wrangler was started in the specified directory instead of the current working directory

      • --configstring alias: --c

        Path to Wrangler configuration file

      • --envstring alias: --e

        Environment to use for operations, and for selecting .env and .dev.vars files

      • --env-filestring

        Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

      • --experimental-provisionboolean aliases: --x-provisiondefault: true

        Experimental: Enable automatic resource provisioning

      • --experimental-auto-createboolean alias: --x-auto-createdefault: true

        Automatically provision draft bindings with new resources

      • --install-skillsboolean default: false

        Install Cloudflare skills for detected AI coding agents before running the command

      • --profilestring

        Use a specific auth profile

      Was this helpful?