Set up a staging environment with Clerk
Staging environments enable you to internally test and demo changes to your application or website before deploying them to production. Currently, Clerk only offers Development and Production instances. Official support for Staging instances is still on the roadmap. However, you can set up a "staging environment" by creating a subdomain for a separate Clerk application.
Creating a separate Clerk application will prevent you from using live production environment data in your staging environment. If you are on a Pro, Enterprise, or Startup plan, Clerk will fully upgrade your staging application for free.
It is important to note that when you use a separate Clerk application for your staging environment, changes to this application will not be automatically mirrored in your main application for your production environment. You must manually make these changes yourself if you want them to be reflected in both applications.
Set up a staging Clerk application
The following steps will help you set up a new Clerk application with a staging-specific domain:
- Set up a subdomain - This will be your staging domain. For example, if your domain is
my-site.com
, you could usestaging.my-site.com
. - Create a new Clerk app - Your staging environment will connect to this app instead of your main one. See the Clerk quickstart guide to learn how to create a Clerk app.
- Deploy and configure your staging app's production instance - Using production API keys will make your staging app more secure. Follow the Deploy to production guide to do so.
- Contact Clerk support to upgrade your staging app for free - If you are on a Pro, Enterprise, or Startup plan, Clerk will fully upgrade your staging app for free.
Alternatives
Preview environments
While staging environments are typically long-lived, preview environments are typically generated on-demand for specific pull requests. See the guide on using Clerk in a preview environment to learn about your options.
Shared production credentials
If you would like to share settings and data between your production and staging environments, see the dedicated guide. This is not recommended because you will be sharing a user table between your production and staging environments.
Feedback
Last updated on