| name | clerk-deploy-integration |
| description | Configure Clerk for deployment on various platforms.
Use when deploying to Vercel, Netlify, Railway, or other platforms,
or when setting up production environment.
Trigger with phrases like "deploy clerk", "clerk Vercel",
"clerk Netlify", "clerk production deploy", "clerk Railway".
|
| allowed-tools | Read, Write, Edit, Bash(vercel:*), Bash(netlify:*), Grep |
| version | 1.14.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","clerk","deployment","etl"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Clerk Deploy Integration
Overview
Deploy Clerk-authenticated applications to Vercel, Netlify, Railway, and other hosting platforms. Covers environment variable configuration, domain setup, and webhook endpoint configuration.
Prerequisites
- Clerk production instance with
pk_live_ / sk_live_ keys
- Production domain configured
- Hosting platform account
Instructions
Step 1: Vercel Deployment
vercel env add NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY production
vercel env add CLERK_SECRET_KEY production
vercel env add CLERK_WEBHOOK_SECRET production
vercel env add NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY preview
vercel env add CLERK_SECRET_KEY preview
Configure Clerk Dashboard for Vercel:
- Go to Dashboard > Domains and add your production domain
- Set Home URL:
https://myapp.com
- Set Sign-in URL:
https://myapp.com/sign-in
- Set Sign-up URL:
https://myapp.com/sign-up
- Set After sign-in URL:
https://myapp.com/dashboard
Step 2: Netlify Deployment
netlify env:set NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY pk_live_...
netlify env:set CLERK_SECRET_KEY sk_live_...
For Netlify Functions (serverless API routes):
import { createClerkClient } from '@clerk/backend'
const clerk = ({ : process..! })
() {
token = event..?.(, )
(!token) {
{ : , : .({ : }) }
}
{
session = clerk..(token, token)
{
: ,
: .({ : session. }),
}
} {
{ : , : .({ : }) }
}
}