Docs

Staging alternatives

Shared production credentials

Caution

If you would like to share settings and data between your production and staging environments, you can use a subdomain of your production domain to set up a staging environment.

Limitations of shared production credentials

The limitations of using shared production credentials to set up a staging environment with Clerk include:

  • You will be combining staging data with live production data.
  • When you enable Clerk features to test in staging, they will be enabled in your Production environment as well.

Set up staging with shared production credentials

  1. Add your subdomain to your hosting provider - Ensure that your subdomain is associated with your staging branch so that it will point to new staging deployments. This process will vary based on your provider. The following are some guides from popular hosting providers:
  2. Add your CNAME record to your domain provider - Depending on the provider, the verification process can take hours or days.
  3. Add your production instance's API keys to your staging deployment - In your staging deployment's environment variables, add your production instance's API keys. To find them, visit the API Keys page in the Clerk Dashboard and ensure that the instance at the top of the Dashboard is set to Production. The following are environment variable guides from some popular providers:

Feedback

What did you think of this content?

Last updated on