Vercel
How to integrate Keyshade with Vercel
Keyshade seamlessly integrates with Vercel to manage your secrets and environment variables securely across all deployment environments, eliminating the need to manually configure environment variables in your Vercel dashboard.
This guide walks you through setting up the Keyshade-Vercel integration step by step.
Already familiar with Keyshade? Jump to Setting up the Integration
Coming Up
Here's what this guide covers:
Create a Keyshade project with your secrets and variables
Set up the Vercel integration in the Keyshade dashboard
💡 If you're not familiar with how Keyshade works, we recommend starting with What is Keyshade?
Prerequisites
Before setting up the integration, ensure you have:
A Vercel account and a deployed project
A Keyshade account with a workspace
Your project's source code ready for deployment
Deploy Your Project to Vercel
First, deploy your project to Vercel without adding environment variables during the deployment process.
Push your code to a Git repository (GitHub, GitLab, or Bitbucket)
Go to Vercel Dashboard
Click "New Project"
Import your Git repository
Configure build settings if needed
Important: Skip adding environment variables during deployment
Click "Deploy"
For detailed deployment instructions, check out the official Vercel deployment documentation.
Create a Keyshade Project
Before setting up the integration, you need a Keyshade project with your secrets and environment variables.
Go to the Keyshade Dashboard
Click "Create Project"
Name your project (e.g.,
my-vercel-app
)Note: You can skip adding secrets and variables during project creation as we'll add them after setting up the integration
💡 Pro Tip: Create your Keyshade project first, as you'll need to select it during the integration setup.
Gather Vercel Configuration Details
Before creating the integration, you'll need to collect some information from your Vercel dashboard.
Get Your Vercel API Token
Go to Vercel Dashboard
In the upper-right corner of your dashboard, click your profile picture, then select Settings
Navigate to "Tokens" in the left sidebar
Click "Create Token"
Give your token a name (e.g.,
Keyshade Integration
)Choose the appropriate scope (Personal or Team)
Set an expiration date
Click "Create"
Important: Copy and save the token immediately! You won't be able to see it again
For more details on API tokens, see the Vercel API documentation.
Find Your Project ID
Go to your project in the Vercel dashboard
Navigate to "Settings" tab
In the "General" section, you'll find your Project ID
Copy the Project ID (it starts with
prj_
)
Create the Vercel Integration
Now you're ready to set up the integration in Keyshade.
Step 1: Access Integrations
Go to your Keyshade Dashboard
Navigate to "Integrations" in the sidebar
Click "Create Integration"
Select "Vercel" from the available integrations
Step 2: Configure Integration Settings
Fill in the integration details:
Integration Name
Give your integration a descriptive name (e.g.,
My App Vercel Integration
)
Vercel Configuration
Token: Paste the Vercel API token you created earlier
Project ID: Enter your Vercel project ID (starts with
prj_
)
Step 3: Link Keyshade Project
Project: Select the Keyshade project you created earlier
Private Key: If you haven't saved your project's private key in Keyshade, you'll need to provide it here
Step 4: Map Environments
Map your Keyshade environments to Vercel environments:
Available Vercel Environments:
Development: For local development and preview deployments
Preview: For preview deployments (branch deployments)
Production: For production deployments
Custom: For any custom environments you've configured
⚠️ Note: Custom environments require a Vercel Pro or Enterprise plan. If you're on a supported plan, you'll need to manually copy the
environmentId
from your Vercel dashboard.Unlike standard environments (development, preview, production), Keyshade will prompt you to enter the
environmentId
when selecting a custom environment during integration setup.Refer to Vercel’s documentation on custom environments for guidance on creating and managing them.
Mapping Examples:
Keyshade
development
→ Verceldevelopment
Keyshade
staging
→ Vercelpreview
Keyshade
production
→ Vercelproduction
Step 5: Create Integration
Review your configuration
Click "Create Integration"
Wait for the integration to be successfully created
Once the integration is complete, you can verify that it worked by visiting your Vercel project’s Environment Variables section. You should see a variable named KS_PRIVATE_KEY
.
ℹ️ What is
KS_PRIVATE_KEY
? This value is automatically injected by Keyshade. It's essential for your app to securely access any protected data managed by Keyshade.
If you don’t see the variable or the integration fails, try restarting the setup and double-checking your environment mappings.
Add Your Secrets and Variables
💡 Secrets vs Variables:
Secrets are sensitive credentials like API keys or tokens. These are encrypted at rest.
Variables are non-sensitive configs like ports, flags, or feature toggles. These are stored as-is.
Now that the integration is set up, add your secrets and environment variables to your Keyshade project.
Go to your Keyshade project dashboard
Click the "Secrets" tab to add your secrets.
Click the "Variables" tab to add your variables.
Example Secrets:
DATABASE_PASSWORD
,API_KEY
,STRIPE_SECRET_KEY
Example Variables:
LOG_LEVEL
,FEATURE_FLAG_ENABLED
,NEXT_PUBLIC_API_URL
Verify the Integration
To confirm the integration is working:
Check your Vercel deployment logs for successful environment variable injection
Verify that your application can access the environment variables
Test your application functionality that depends on the secrets/variables
Managing the Integration
Updating Environment Variables
Go to your Keyshade project dashboard
Update secrets/variables as needed
Redeploy your Vercel project to apply changes
Modifying Environment Mappings
Go to "Integrations" in Keyshade
Find your Vercel integration
Right-click and choose "Edit" to modify environment mappings
Save changes and redeploy
Removing the Integration
Go to "Integrations" in Keyshade
Find your Vercel integration
Right-click and choose "Delete" to remove the integration
Manually add environment variables in Vercel if needed
Troubleshooting
Common Issues
Integration creation fails:
Verify your Vercel API token is valid and has the correct permissions
Ensure the Project ID is correct and matches your Vercel project
Check that your Keyshade project exists and you have access to it
Environment variables not injected:
Confirm the integration is active and properly configured
Verify environment mappings are correct
Check that secrets/variables are added to the correct Keyshade environment
Ensure you've redeployed after setting up the integration
Deployment failures:
Review Vercel deployment logs for specific error messages
Verify that all required environment variables are present in Keyshade
Check for any syntax errors in your environment variable values
Reach Out to Us
Still stuck? We’re here to help.
📧 Email us at: [email protected]
💬 Join our community on Discord
Don't hesitate to reach out — we're happy to help with setup, debugging, or general questions.
You're All Set 🎊
Your Vercel deployments are now securely powered by Keyshade — no manual environment variable configuration, no secrets in your repository, and seamless environment management across all deployment stages.
Using AWS Lambda? Check out our AWS Lambda Integration Guide to securely manage secrets in your serverless functions.
Last updated
Was this helpful?