Shipping: Deploy Your Vibe-Coded App to the Internet
Local apps don't count. How to get your project deployed on Vercel, Railway, or Cloudflare with a real domain, environment variables handled safely, and a deploy pipeline that updates on every push.
Key takeaways
- Deploy early โ a live URL from week one keeps deploys boring
- Connect GitHub to your host so every push auto-deploys
- Environment variables live in your host's dashboard, never in code
- Test the production build locally before you debug it in the cloud
Deploy before you're 'ready'
The single best shipping habit is deploying in week one, when the app barely does anything. Deploys fail on configuration โ environment variables, build commands, framework versions โ and those problems are much easier to solve when the app is tiny. From then on, every push is a small, low-stakes update instead of a terrifying launch day.
Picking a host
For a typical vibe-coded web app, three hosts cover nearly everyone. Vercel is the smoothest for Next.js โ connect your GitHub repo and it deploys on every push with zero config. Railway is the pick when your app is more than a website: background workers, databases, and long-running servers deploy as easily as the frontend. Cloudflare offers a very generous free tier and shines for global, high-traffic apps on Workers.
All three follow the same pattern: sign in with GitHub, select the repo, set environment variables, deploy. Your AI agent can walk you through host-specific configuration โ just tell it which host you chose.
Environment variables and secrets
API keys, database URLs, and other secrets must never be committed to your repository. Locally they live in a .env file that's listed in .gitignore; in production you enter them in your host's dashboard. If a key does end up in a commit, treat it as leaked: rotate it (generate a new one) rather than just deleting the file โ the old value lives on in git history.
# .env must appear in .gitignore
cat .gitignore | grep .env
# and must not be tracked
git ls-files | grep -i .env # should print nothingWhen the deploy fails but local works
The classic gap: development mode is forgiving, production builds are strict. Run your framework's production build locally (for Next.js, `npm run build`) before pushing โ it surfaces the type errors and missing variables the deploy would hit. When a cloud build fails, paste the full deploy log into your agent; build logs are among the things AI debugs best.
Domains and the finish line
Every host gives you a free subdomain, which is fine for testing. A custom domain costs about $10/year, takes ten minutes to connect in your host's dashboard, and instantly makes the project feel โ and look โ real. HTTPS is automatic on all the hosts above. After that, your ship checklist is short: production build passes, secrets are in the dashboard, the live URL works on your phone, and you've clicked every button on the deployed site once.