PROHOSTIVA
Documentation menuClaude Code to production
Deploy

How to deploy a Claude Code website to production

Claude Code builds your site on your computer. How to get it online: what changes in production, the hosting options, and step-by-step with ProHostiva.

The short version

Claude Code writes real code on your computer, but it doesn't host anything: what runs at localhost is only visible to you. Putting it in production means three things: get the code somewhere a host can read it (GitHub or a ZIP), change the few things that work differently on a server, and deploy. It can be any kind of project, from one HTML page to a Next.js, Python or PHP app. Hosts care about what's in the folder, not which tool wrote it.

OptionGood forWhat to know
ProHostivaAny supported project, front end or server, with HTTPS and your domain in one placeA paid plan. We check your project for free first, and can publish it and connect your domain for you.
Front-end platforms (Vercel, Netlify, Cloudflare Pages…)Static sites, React or Vue apps, Next.jsFree tiers (read their terms for commercial use). Long-running servers, Python and PHP are limited or not offered.
App platforms (Render, Railway, Fly.io…)Servers, background jobs and their own databasesMore to configure yourself: build, start command, port and DNS.
Your own server (a VPS)Full control, if you're comfortable running a serverClaude Code can set one up over SSH, but from then on updates, security, backups and HTTPS are yours to look after.

Not sure your project is ready?

Run the free production readiness check on your project whichever host you pick. It runs the real production build and tells you, in plain language, what to fix: exposed keys, missing settings, oversized files. No account needed.

What changes between your computer and production

Most problems with AI-built projects come from things that only work on the computer they were built on:

WhatOn your computerIn production
PortA fixed number such as 3000, 5173 or 8000Read from the PORT environment variable the host sets
Secrets and API keysA .env fileThe host's environment variables. The .env file stays out of the repository and the ZIP.
DatabaseSQLite, or Postgres running in Docker on your machineA hosted database (Supabase, Neon, a managed Postgres…) reached through a URL in an environment variable
Uploaded filesA folder on your diskExternal storage. On ProHostiva, containers keep nothing between deployments.
How it runsnpm run dev or a development serverA production build, then a start command

Let Claude Code prepare it

Claude Code is good at this kind of change. Open your project and paste a prompt like this one:

Prepare this project for production hosting. The host builds from the
repository root, runs one container, sets the PORT environment variable
and provides secrets as environment variables. Please:
- make the app listen on PORT
- move every secret and API key into environment variables, and list
  their names (without values) in .env.example
- make sure .env is in .gitignore
- make sure there is a production build and a start command
- make the home page / return a normal page without a login
Don't deploy anything. Change the code and tell me what you changed.

Read the summary it gives you, and run the project once more on your computer before you deploy.

CLAUDE.md is never served

On a plain HTML or PHP site, every file in the project folder is published, but AI-assistant instruction files are not: CLAUDE.md, CLAUDE.local.md, AGENTS.md and GEMINI.md return "not found" in any folder, and the .claude folder and other dotfiles are never served either. Any other notes you keep in the project folder are still public, and a website built from your own Dockerfile serves whatever that Dockerfile copies.

Project layouts to watch for

  • Separate front-end and back-end folders (such as frontend/ and backend/). Claude Code often splits an app this way. ProHostiva builds the top level of a repository or ZIP, so put each part in its own repository and deploy them as two websites, or ask Claude Code to make the backend serve the built front end so it's one app.
  • A Docker Compose file with a database next to the app (docker-compose.yml). Multi-container setups aren't supported: deploy the app on its own and use a hosted database.
  • A Dockerfile at the top level is always used when it's there. If Claude Code wrote it for development (with a dev server or mounted folders), ask it to make it production-ready or remove it, and we'll build the project ourselves.

Deploy it with ProHostiva

1. Put the code on GitHub (or make a ZIP)

GitHub is best if you'll keep working on the site with Claude Code: each change is a push and one click. If you have git and the GitHub CLI (gh) set up, you can ask Claude Code to “create a private GitHub repository for this project and push it”. Otherwise create the repository on github.com and push it yourself. For a site you finish once, a ZIP is fine: see Deploying from a ZIP.

2. Check it (free)

Paste the repository's address into Check my project, or upload the ZIP (for a private repository, download it from GitHub as a ZIP). Anything the report flags can usually be fixed by giving it to Claude Code: copy the finding into your session.

3. Create the website and publish

  1. Start a new website

    In your dashboard, click Host a website, then choose GitHub repository and connect GitHub, or upload the ZIP. See Deploying from GitHub.

  2. Check what we detected

    We show the framework, the runtime version and the build and start commands (and that the project was made with Claude Code, if there's a CLAUDE.md). Change a command only if you know it's different.

  3. Add environment variables

    Everything in your .env.example goes under Developer settings → Environment variables, with production values. Tick Secret for anything private.

  4. Publish

    Name the website, choose its address and click Publish website. We build it in an isolated container, check that the home page answers, and put it online at yourname.prohostiva.com.

4. Connect your domain

Go to Domains, add your domain, add the two DNS records we show at your domain provider and click Verify DNS. HTTPS is set up for you. The full walkthrough is in Connecting your own domain.

5. Updating the site later

Keep working with Claude Code as before, then push to GitHub and click Publish latest version on the website's page. Nothing goes live until you click, and if a new version fails to build or start, the current one stays online.

Rather we did it?

Not technical, or short on time? Create your account and email support@prohostiva.com with your GitHub repository (or the ZIP) and your domain. We'll publish the website and connect the domain for you. Setup help is free on every plan.

Before you send people to it

  • Rotate any key that was ever committed. Deleting it from the code isn't enough if it's in the Git history; create a new one at the service and set it as an environment variable.
  • Allow your domain. Frameworks and APIs often only accept known addresses: Django's ALLOWED_HOSTS, an API's CORS origins, and sign-in redirect URLs at Google, GitHub, Supabase or Auth0.
  • Switch services to production. Stripe live keys and a webhook pointing at your domain, a production database rather than your test one, real email sending settings.
  • Run your database migrations. They're never run automatically on deploy, so new tables don't appear on their own.

Common problems

  • It works on my computer but the build fails: often a file that exists on your disk but was never committed, or a missing lockfile. Ask Claude Code to check git status, commit what's missing, and push again.
  • Health check failed: the app listens on a fixed port instead of PORT, or the home page redirects to a login. See Troubleshooting.
  • "We couldn't find a website or app here": the project is in a subfolder. See the layouts above.
  • Database connection errors: the database URL still points at localhost. Use your hosted database's URL in an environment variable.
  • A blank page (React, Vue, Svelte): a missing VITE_ variable. Add it and deploy again.