#Update Production Deployment Settings
4 messages · Page 1 of 1 (latest)
@old frigate - In my Convex production project's Settings --> Authentication --> Production Deployment Settings, the domain shows the dev environment to Clerk as read-only text. How do I update this domain to my production environment in Clerk?
Let me check the knowledge base for you. One moment! :books:
To configure a different Clerk instance between your Convex development and production deployments, you can use environment variables configured on the Convex dashboard.
Here are the steps to follow:
- First, change your
auth.config.tsfile to use an environment variable:
export default {
providers: [
{
domain: process.env.CLERK_JWT_ISSUER_DOMAIN,
applicationID: "convex",
},
],
};
-
Open the Settings for your dev deployment on the Convex dashboard and add the variables there. You can switch to the new configuration by running
npx convex dev. -
Similarly on the Convex dashboard, switch to your production deployment in the left side menu and set the values for your production Clerk instance there. You can switch to the new configuration by running
npx convex deploy.
You can also manage the deployment environment variables using the Convex CLI commands:
npx convex env list
npx convex env get <name>
npx convex env set <name> <value>
npx convex env remove <name>
For more details, you can refer to the following resources:
- Configuring dev and prod instances (https://docs.convex.dev/auth/clerk#configuring-dev-and-prod-instances)
- Read and write environment variables (https://docs.convex.dev/cli#read-and-write-environment-variables)
- Dashboard > Deployments (https://docs.convex.dev/dashboard/deployments)
- Dashboard > Deployments > Settings (https://docs.convex.dev/dashboard/deployments/deployment-settings)