Deploying a Claude Code app to Vercel
Yes, and for most things Claude Code produces this is the right answer. Ask the agent to install the Vercel CLI and run it, or push to GitHub and import the repository. A front end goes live in minutes on a free tier. The one thing to understand before you start is what Vercel is: excellent infrastructure that runs whatever you give it. It does not supply user accounts or a database, on purpose, because those are your application's concern. If your app needs to know who is signing in, that part is still yours to build wherever you deploy it.
Last checked against Anthropic's documentation on . Claude changes often. If something here no longer matches the help centre, the help centre is right.
Deploying to Vercel from Claude Code
-
Ask the agent to prepare the project
Claude Code can run commands, so it can install the Vercel CLI, add the config file and fix the build script itself. Say what you want deployed rather than doing the setup by hand.
-
Move every secret to an environment variable
Anything hardcoded gets committed and appears in build logs. Have the agent find them and list what needs setting in the Vercel dashboard before the first deploy, not after.
-
Deploy a preview first
A preview deployment is free and disposable, and it surfaces the environment differences that a local run cannot. Do this before wiring a production domain.
-
Replace anything that writes to disk
Serverless functions get an ephemeral filesystem, so writes vanish between invocations. If the app saves to a local file, it needs a real database before this deploy is real.
-
Add auth and a database if the app needs them
This is the part Vercel does not do for you. Pick an auth provider and a managed database, and expect this step to be larger than the deployment was.
Does it work? Yes, and easily
There is no incompatibility to work around. Claude Code runs commands, and deploying to Vercel is commands, so the agent can do the whole thing: install the CLI, write vercel.json, fix the build script and run the deploy. Anthropic's description of the tool covers this exactly:
Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.
Claude Code overview, Claude Code documentation
Running commands and integrating with your development tools is precisely what a deploy is. If your app is a front end, a static site or a set of API routes, stop reading and go and do it. Vercel's free tier is generous, the developer experience is genuinely excellent, and nothing on this page will serve you better.
The one thing Vercel deliberately does not give you
This is a scope decision rather than a gap, and it is the correct decision for the product Vercel is. Vercel runs your code extremely well. It does not decide what your code is.
| Vercel provides | Still yours to build | |
|---|---|---|
| Hosting and CDN | Yes, excellent | Nothing |
| Custom domains and TLS | Yes, automatic | Nothing |
| Preview per branch | Yes | Nothing |
| A database | Storage products you integrate | Schema, queries, migrations |
| User accounts and sign-in | No | All of it, or an auth provider you wire in |
| Sessions that survive restarts | No | Yours |
| Per-row ownership and permissions | No | Yours, in every query |
| File uploads | No | A blob store plus the plumbing |
For a marketing site, a docs site, a dashboard over an API you already have, or anything with no login, the right-hand column is empty and Vercel is close to perfect. For an app where two people see different things, that column is the actual project, and the deploy was the easy part you have already finished.
Which of the two shapes do you have
One question settles it, and it is worth answering honestly before writing any more code: does the app need to know who is looking at it?
- No. Portfolio, landing page, calculator, documentation, a dashboard reading a public API, a demo. Use Vercel. It is free at this size, faster to set up than anything else, and you keep your own domain. Nothing below applies to you.
- Yes. A rota, a signup sheet, a tracker, an internal tool, anything where somebody signs in and sees their own rows. The deploy is ten minutes and the identity layer is the rest of the project, whichever host you pick.
The second case is not an argument against Vercel. It is an argument that where you deploy was never the decision that mattered.
The other trade, and its real cost
Homespun is where the same agent that built the thing can host it. People sign in with their email, so the app can tell who is who and every row remembers who created it; permissions are set per collection, so some people can approve and others can only submit; and the agent keeps read and write access to the collections it is allowed, so it can keep working on the data instead of handing you a page and walking away. It is free today, and there is no paid plan to buy.
So the comparison for the second shape above, stated so the costs are as visible as the benefits:
| Vercel | Homespun | |
|---|---|---|
| Time to a deployed front end | Minutes | About a minute |
| Time to sign-in working | Hours to days, you build it | None, it is there |
| Database with per-row ownership | You design and run it | Included, permissions per collection |
| Your own custom domain | Yes | No, a subdomain |
| Any framework or runtime | Effectively yes | No, a web app on our runtime |
| You own and can move the stack | Yes | No |
| Cost at small scale | Free tier, plus database and auth bills | Free today, no paid plan to buy |
| Best for | Anything public, and anything you intend to own | A small app for specific people, quickly |
Three rows there are ours to lose: no custom domain, no choice of runtime, and you do not own the stack. If any of those matters to you, Vercel is the better answer and this is not a close call. The trade is worth it only when getting a working multi-user app this week matters more than owning the infrastructure it runs on.
What actually breaks on the first Vercel deploy
Agent-written apps hit these more often than hand-written ones, because the local shortcuts were never a deliberate choice anyone remembers making.
- Writes to the local filesystem. Serverless functions have an ephemeral filesystem. Saving to a JSON file works perfectly on your laptop and silently loses everything in production.
- A long-running process. Functions are invoked and torn down. Anything holding state in memory, a WebSocket server, or a background loop needs a different shape.
- Hardcoded localhost. Usually in an API base URL or an OAuth redirect, and it fails only on the path you did not test.
- Missing environment variables. The build succeeds and the app fails at runtime, because the values were in your shell and never in the dashboard.
- Function timeouts. The free tier caps execution time, so a slow request that was merely annoying locally becomes an error.
Claude Code can fix every one of these if you paste the deployment log back to it, which is by some distance the fastest way through this list.
Questions people ask next
Can Claude Code deploy to Vercel?
Yes. Claude Code runs commands, so it can install the Vercel CLI, write the config, fix the build script and run the deploy itself. You can also push to GitHub and import the repository in the Vercel dashboard. There is nothing about agent-written code that Vercel treats differently.
Is Vercel free for a Claude Code app?
The hobby tier is free and comfortably covers a small personal project. Costs appear when you add the things Vercel does not include, since a managed database and an auth provider each have their own pricing, and heavy usage moves you onto a paid plan.
Does Vercel give my app user accounts and a database?
No, and that is deliberate. Vercel runs your code and gives you hosting, domains, TLS and previews. Authentication and data modelling are your application's concern, so you either build them or wire in an auth provider and a managed database yourself.
Should I use Vercel or a platform with accounts built in?
It depends on one thing: whether the app needs to know who is looking at it. If it does not, Vercel is the better answer and it is not close. If it does, the deploy is the easy part and the identity layer is the project, so a platform that already supplies sign-in and a permissioned database can save most of the work, at the cost of your own domain and control of the stack.
Why does my Claude Code app break after deploying to Vercel?
Most often it writes to the local filesystem, which is ephemeral on serverless functions, or it expects a long-running process that does not exist there. Missing environment variables, hardcoded localhost URLs and function timeouts account for nearly all the rest. Pasting the deployment log back to Claude Code is usually the quickest fix.
Primary sources
Every claim about Claude on this page comes from Anthropic's own documentation, quoted rather than summarised so you can check it yourself.