Key idea
Lovable can sync your project to a GitHub repository, and ComputeSphere builds from GitHub. So the route is: connect the project to GitHub in Lovable, check which kind of app it is, and create a ComputeSphere service from that repository. Lovable keeps working as your editor, and its backend can stay where it is.
1. Sync the project to GitHub
Lovable's GitHub integration creates a repository for your project and keeps the two in sync both ways. In Lovable, open Project settings → Git → GitHub (or, from the chat, +, then Project → GitHub), and choose Connect next to the GitHub account or organization where the repository should go.
Things Lovable's documentation says to know:
- The repository it creates is private by default.
- It syncs one branch at a time, normally
main. Changes pushed to that branch sync back into Lovable. - Don't delete the repository: that stops the sync. Renaming it keeps it running.
- Only workspace or project admins and owners can connect a project.
If you'd rather not connect GitHub, Lovable also offers Download codebase. Then create a repository yourself and push the folder, as in Deploy a vibe-coded app. You lose the sync, so prefer the connection.
2. Check which kind of app it is
Lovable's documentation describes two kinds of project, and they deploy differently:
| Your project | How to tell | On ComputeSphere |
|---|---|---|
| React + Vite (projects created before 13 May 2026) | vite.config.ts and an index.html in the root; the build writes a dist folder | A static site: files served from the edge, no spherelet running |
| TanStack Start (created from 13 May 2026, or upgraded) | @tanstack/react-start in package.json | A web service: it renders pages and runs server functions, so it needs a server |
3. Know what's public and what's secret
A Lovable project keeps browser settings in a committed .env file. Lovable's documentation is explicit: values starting with VITE_, such as VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY, are built into the page and visible to anyone. They're meant to be public, and the build reads them from that file, so you don't need to set them on ComputeSphere. Lovable also says not to add .env to .gitignore, because its previews need it.
What must stay private, such as a payment or AI provider key, belongs in Lovable's Secrets, used by its Edge Functions on Lovable's backend. Before you deploy, check that no private key has a VITE_ name or sits in the code: anything there is shipped to every visitor.
If your app uses Lovable's built-in backend (Cloud), it keeps using it from ComputeSphere: the frontend calls the same address with the same publishable key. ComputeSphere doesn't host databases, so moving your data is a separate job; Lovable documents it under deploying outside Lovable.
4. Create the service
A React + Vite project: a static site
Connect GitHub to ComputeSphere
Your repository is private, so ComputeSphere needs read access to it. Follow lesson 5.3.1: add a GitHub connection and give the ComputeSphere app access to only this repository.
You should seeYour GitHub connection listed under Connections.
Start a static site
In your project, choose New service, then Static Site. Name it and choose or create an Environment.
You should seeThe New service form with Service information, Environment, Configuration and Build settings.
Point it at the repository
Under Configuration, choose Private (Connections), your connection, your repository and the branch Lovable syncs (usually
main). For a public repository, Public and its URL work too.You should seeYour repository and branch filled in.
Set the build
Wait a moment after choosing the repository, then fill in Build settings: Build command
npm run build, Publish directorydist, Install commandnpm ci. These match Lovable's own instructions for building outside Lovable.You should seeBuild command npm run build and Publish directory dist.
Deploy
Choose Deploy. When the service shows Running, open its URL and click through a few pages, then reload one: deep links serve your app too, so client-side routes work.
You should seeRunning, and a URL ending in computesphere.app that shows your app.
A TanStack Start project: a web service
This needs a running server. TanStack Start's hosting guide covers a Node.js server: the build produces .output/server/index.mjs, started with node .output/server/index.mjs. Lovable's documentation says that outside Vercel, Netlify and Cloudflare you choose the target with nitro: { preset: "<name>" } in vite.config.ts; follow TanStack's guide for the Node.js preset.
Then create a Web Service from the repository as in Deploy a vibe-coded app: Managed build, runtime Node.js, Build command npm ci && npm run build, Start command node .output/server/index.mjs, and Port set to the port the server prints at start-up, which you'll see in the service's runtime log. The static path above is the one we ran on ComputeSphere for this guide; for this one, read the runtime log on your first deploy.
5. Keep shipping
You keep editing in Lovable; each change syncs to the branch. Pushing doesn't deploy on its own here: when you're ready, open the service, choose Redeploy, keep Build & deploy, and confirm. ComputeSphere builds the latest commit.
What can go wrong
| What you see | Usual cause | Fix |
|---|---|---|
| The repository isn't in the list | The ComputeSphere app can't see it | In GitHub, add the repository to the ComputeSphere app's access (lesson 5.3.1) |
| The build fails at install | The lockfile doesn't match package.json, or the project uses another package manager | Read the first error under Builds; set Install command to match (for example npm install) |
| A blank page | The build ran, but the browser can't reach the backend | Open the browser console; check .env is committed with the VITE_ values |
| A TanStack Start app deployed as a static site loads, then its features fail | Server code isn't running | Deploy it as a web service |
| A private key turns up in the page's source | It has a VITE_ name or sits in frontend code | Rotate it at the provider, then move it to Lovable's Secrets and an Edge Function |
| Pages work in the Lovable preview but not here | The preview injects settings the deployed build doesn't get | Compare what the code reads with what's in .env |