An app built with Claude Code is ordinary source code, so it can run on any platform that fits its architecture: a static or edge host for frontend-only apps, a PaaS for a single backend service, containers for multi-service systems and serverless functions for spiky, event-driven workloads. Pick the simplest option that matches your runtime, data residency and team skills, and let Claude Code write the deployment config while a human reviews it.
On this page
Claude Code does not come with a hosting platform. That is an advantage: the agent writes normal code in your repository, in whatever stack you chose, and you can deploy it anywhere. It also means the deployment decision is yours. This article compares the four main options, explains when each one fits and shows how to use the agent to produce deployment configuration without handing it the keys to production.
Start with what you actually built
Before comparing hosts, describe the app in one sentence of architecture. Is it a single-page app with a hosted backend such as Supabase or Firebase? A Next.js app with server rendering and API routes? A Python or Node API plus a separate frontend? A system with a worker queue, a database and scheduled jobs? Ask Claude Code to produce this summary from the repository, including runtime versions, required environment variables and external services. The answer usually narrows the choice to one or two options.
Also note the non-functional constraints: where user data may be stored, expected traffic, whether you need long-running processes or WebSockets, and who will be on call. A team of two should not run a Kubernetes cluster.
The four deployment options compared
| Option | Typical platforms | Fits best | Watch out for |
|---|---|---|---|
| Static or edge hosting | Vercel, Netlify, Cloudflare Pages | SPAs, Next.js and Astro sites, apps using a hosted backend | Function time limits, vendor-specific features, region choice |
| Platform as a service | Render, Railway, Fly.io, Heroku, Scalingo | One web service plus a managed database | Cold starts on small tiers, egress costs, limited networking |
| Containers | Docker on a VM, AWS ECS, Google Cloud Run, Azure Container Apps, Kubernetes | Multi-service systems, workers, specific system dependencies | Operational effort, image security, patching |
| Serverless functions | AWS Lambda, Google Cloud Functions, Supabase Edge Functions | Event-driven and spiky workloads, webhooks, scheduled tasks | Cold starts, timeouts, local testing, distributed debugging |
For most Claude Code projects started by small teams, static or edge hosting plus a managed backend is the right first choice. Containers become worthwhile once you have background workers, custom binaries or strict requirements about where code runs. Google Cloud Run and similar services are a good middle ground: you ship a container but do not manage servers.
Letting Claude Code write the deployment setup
The agent is good at producing Dockerfiles, platform configuration files and CI workflows, provided you give it constraints. A useful prompt names the target platform, the runtime version, the build command, health check path, required environment variables and the rule that secrets must never be written to files. Ask for a multi-stage Dockerfile with a non-root user and a pinned base image, then ask it to explain each line. Store these rules in your CLAUDE.md so every session follows them; our guide on writing CLAUDE.md and AGENTS.md files shows how.
Keep a clear boundary: Claude Code writes and tests configuration locally or in CI, while production credentials live in the platform's secret store and deployments are triggered by the pipeline, not by the agent from a developer laptop. Restrict which shell commands the agent may run without approval, especially cloud CLIs that can modify live resources.
A deployment path that works for most teams
- Ask Claude Code to document the architecture, runtime, build steps and environment variables in a
DEPLOY.md. - Choose the simplest platform from the table that supports your runtime and data residency needs.
- Have the agent generate platform config or a Dockerfile and a CI workflow that runs tests, builds and deploys to staging on every merge.
- Create staging and production with separate databases and secrets, entered manually in the platform's secret manager.
- Add health checks, error tracking and uptime monitoring before the first real user arrives.
- Promote to production through a manual approval step in the pipeline, and practise a rollback once.
Our article on CI/CD for vibe-coded apps goes deeper into the pipeline itself, including which checks to run on agent-written pull requests.
Pitfalls specific to agent-built code
Agents often hard-code local assumptions: localhost URLs, file paths, a SQLite file that disappears on the next container restart or an in-memory session store that breaks as soon as you run two instances. Ask Claude Code to search for these explicitly before the first deployment. A second pitfall is dependency sprawl; agents add packages readily, which increases image size and attack surface, so run a dependency audit in CI. Third, check database migrations. If the agent changed tables through ad hoc scripts, consolidate them into a migration tool before production, otherwise environments drift.
Finally, remember mobile. If the Claude Code project includes an iOS or Android app, deploying the backend is only half the release. Store submission, signing and review are a separate track, and AppSubmitter can accompany that process until the app is live.
Getting it right the first time
Deployment is where prototypes become products, and it rewards boring, repeatable choices. If your team is new to agentic workflows, the neooutput Claude Code workshops include exercises on generating and reviewing deployment configuration safely, and the neooutput AI Code Engineers can set up hosting, pipelines and monitoring for you. Either way, aim for a setup where a new release is a merged pull request and a rollback is one click.
Frequently asked questions
Does Claude Code have its own hosting?
No. Claude Code writes and edits code in your repository; you deploy that code to the platform of your choice, just like any other software project.
Should Claude Code have access to production credentials?
It is safer not to. Let the agent write and test configuration, keep production secrets in the platform's secret store and deploy through a CI pipeline with an approval step.
Is Docker necessary for a Claude Code app?
Not always. Frontend apps with a hosted backend deploy well to static or edge hosts without containers. Docker becomes useful once you have custom system dependencies, workers or multiple services.
Which option is cheapest to start with?
Static or edge hosting with a managed backend usually has the lowest starting cost and effort. Compare current plans, because pricing and free tiers change often.