Thomas Osayi

November 22, 2026 · 8 min read · Thomas Osayi

How to export a Bolt project to GitHub, run it locally and deploy it

Step by step: connect a Bolt project to GitHub, download it as a zip, run it on your own machine, move secrets into environment variables and deploy to Vercel.

Getting your code out of Bolt is the moment an experiment becomes a real project. Once the code lives in a GitHub repository, you can run it on your own laptop, hand it to a developer, deploy it wherever you like and keep a full history of every change. Until then, the only copy sits inside one browser tool.

The good news is that Bolt makes exporting straightforward. The less obvious part is everything after the export: running it locally, rebuilding the secrets, and getting a production deploy that behaves like the preview. Here is the full path, based on Bolt's support documentation at the time of writing and on what I check when someone hands me a Bolt repo.

What are my options for getting code out of Bolt?

There are two: connect the project to GitHub, which keeps syncing, or download a zip, which is a one-time snapshot.

GitHub integration

Best for: anyone who will keep working on the app, alone or with a developer.

Bolt commits each change that does not break the project, and it pulls in commits made outside Bolt. You get version history, branches and a repository any host can deploy from.

Zip download

Best for: a quick backup, a one-off handover, or dropping the project onto a host for a test deploy.

You get the source code as it is right now. Nothing syncs afterwards, so if you keep prompting in Bolt the zip goes stale immediately.

My default advice is to do both. Connect GitHub for the ongoing work and download a zip as an offline backup before any big change. It takes two minutes and removes a lot of risk.

How do I connect a Bolt project to GitHub?

Open the project, click the GitHub icon in the top right corner, authorize the GitHub App, and create a repository.

The steps in Bolt's docs, at the time of writing:

  • Open your project in Bolt and click the GitHub icon in the top right corner.
  • Click "Log in to GitHub", then "Authorize" so StackBlitz, the company behind Bolt, can access your account.
  • Click "Install the GitHub App" and choose either "All repositories" or "Only select repositories".
  • Click "Install & Authorize" and follow the prompts.
  • Back in the project, open the GitHub icon again, type a repository name and click "Create repository", then "Start building".

The new repository is private by default. You can make it public later in GitHub's settings, but for a product with any backend logic, private is the right choice.

This needs an individual GitHub account. If your company uses a GitHub organization, Bolt has a separate setup article for organizations. If you need to change which repositories Bolt can see later, open the GitHub icon and choose "Configure the GitHub App".

How does Bolt's GitHub sync work once it is connected?

Sync runs both ways: Bolt pushes commits as you work, and it checks GitHub roughly every 30 seconds for changes made elsewhere.

That two-way sync is what makes the integration useful. A developer can fix something in their editor, push to the main branch, and you will see the change in Bolt shortly after. You can keep prompting for layout and copy while someone else handles the backend.

A few rules from the docs worth knowing:

  • Projects start on the main branch. You can create a branch from the GitHub icon with "Create branch" and switch with "Switch branch".
  • You cannot merge branches inside Bolt. Open a pull request on GitHub instead.
  • If GitHub has a newer version when Bolt tries to push, you see a "GitHub conflict" message with two choices: "Pull and resend last message" or "Pull and discard last message".
  • Only the project owner can manage the integration. Collaborators' changes sync the next time the owner opens the project.
  • Sync pauses on mobile. Open the project on a desktop to resume.

How do I download a Bolt project as a zip?

On desktop, click the project title in the top left corner and choose Download; Bolt saves the source code as a zip file.

Vercel's guide describes the same menu as Export, then Download, so the label may shift slightly as Bolt updates its interface. The download is not available from a phone.

Before you rely on the zip as a backup, open it and check what is inside. You should see a package.json, a src folder, config files such as vite.config.ts or next.config.js, and probably a supabase folder if the app uses Supabase. What you will not find are the values from Bolt's Secrets panel. Vercel's guide states plainly that those are not included in the export, which is correct behavior: secrets should never ship inside source code.

If the project uses Bolt Cloud's built-in database, treat the data separately. A code export is not a data export. Check Bolt's database pages for how to back up or migrate the data itself before you assume it moves with the code.

How do I run an exported Bolt project on my own computer?

Install Node.js, clone the repository or unzip the download, run npm install, add a .env file with your keys, and run npm run dev.

In practice:

  • Install a current long-term support release of Node.js from nodejs.org.
  • Clone the repo with git clone and the repository URL from GitHub, or unzip the download into a folder.
  • Open a terminal in that folder and run npm install, then npm run dev.
  • Open the local address the terminal prints, usually http://localhost:5173 for Vite projects or http://localhost:3000 for Next.js.

Most Bolt projects are Vite plus React. If the app talks to Supabase or another service, it will crash or show empty screens until you create a .env file in the project root. Look through the code for import.meta.env (Vite) or process.env (Next.js) to find every variable name it expects, such as VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY. Copy the values from the service dashboards, not from old chat messages.

Add .env to .gitignore if it is not there already. Then run npm run build once locally. The preview in Bolt is forgiving, and a local production build is the fastest way to see the type errors and missing imports a real host will reject.

How do I deploy an exported Bolt app?

Import the GitHub repository into a host such as Vercel or Netlify, add your environment variables, and deploy; every push to main then redeploys automatically.

With Vercel, the flow is: create a new project, import the repository, confirm the detected framework (Vite or Next.js), paste every environment variable into the project settings, and click Deploy. Vercel also offers Vercel Drop for a quick test: you drag the zip onto vercel.com/drop without unzipping it and get a live URL. That is handy for a demo, but the GitHub import is what you want for a real product, because it redeploys on every push.

After the first deploy, three things usually need attention:

  • Auth redirect URLs. If you use Supabase Auth, add the new production domain under the allowed redirect URLs, or sign-in will bounce users back to localhost or the Bolt preview.
  • Client-side routing. A Vite single-page app may return 404 on page refresh for routes like /dashboard. If you see it, add a rewrite in vercel.json so all routes serve index.html.
  • Webhooks and callbacks. Stripe, email providers and OAuth apps need the new production URL registered.

If the build fails, read the build log from the top. "Vercel build failed? The most common Next.js deploy errors and fixes" covers the usual messages, and most apply to Vite projects too.

What usually breaks after moving a Bolt app off Bolt?

Missing secrets, preview-only URLs and database rules that were never tightened are the three problems I look for first.

Here is an illustration with a made-up project. A small bakery owner builds a pre-order app in Bolt with Supabase. She connects GitHub, imports the repo into Vercel and deploys. The site loads, but the menu is empty and sign-in sends people back to the Bolt preview URL.

The fixes are mundane: add VITE_SUPABASE_URL and the anon key to Vercel's environment variables and redeploy, then add the production domain to Supabase's redirect allow list. While checking the database, though, it turns out the orders table has row level security switched off, so anyone with the public key could read every customer's phone number. That is the one that matters. "Is your Lovable or Bolt app leaking data? Check Supabase row level security" explains how to check yours.

Other common surprises:

  • Secret keys that were pasted into frontend code during prompting. Search the repo for sk_ and service_role before you deploy.
  • Hardcoded preview URLs inside fetch calls.
  • Build errors that the Bolt preview ignored.

When should I bring in a developer?

Bring one in when the app works in Bolt but you cannot get a clean production build, or when payments, auth or data access need to be verified before real users arrive.

The export itself is easy enough to do yourself, and I would encourage it. Where help pays off is in the step after, making sure the deployed app is actually safe and reliable. A developer with the repo can run the build, read the logs, check the database rules and test the payment flow end to end in a day or two.

My Quick Fix starts at $60 for one specific bug in about two days. Fix Plus Features starts at $200 for up to three fixes and one small feature. Finish and Launch starts at $600 over about ten days, for apps whose core features already work: I deploy, connect your domain, fix what blocks launch and check security. The GitHub repository is all I need to start. "Your Lovable or Bolt app works locally. Here is what breaks at launch." lists what I check in that review.

The bottom line

Connect your Bolt project to GitHub from the GitHub icon, keep a zip as a backup, and never use Disconnect to fix a sync hiccup. Run the code locally with npm install and npm run dev, recreate every secret as an environment variable, and run a production build before you deploy. Then import the repo into a host, update auth redirects and webhooks for the new domain, and check your database rules before anyone signs up.

Questions, answered in one line

How do I export my Bolt project to GitHub?

Open the project, click the GitHub icon in the top right, log in, install the GitHub App, then enter a repository name and click Create repository.

Does Bolt sync changes from GitHub back into the project?

Yes, according to Bolt support docs it checks GitHub about every 30 seconds and pulls in changes made outside Bolt.

Can I download a Bolt project as a zip?

Yes, on desktop you click the project title in the top left and choose Download, which saves the source code as a zip file.

Why does my exported Bolt app fail to build on Vercel?

The most common cause is a missing environment variable, because values from Bolt secrets are not included in the export.

Can someone help move my Bolt app to production?

Thomas Osayi takes Bolt apps whose core features work through deployment and launch from $600, and fixes single bugs from $60.

Sources

About the author

Thomas Osayi is a full-stack developer in Los Angeles studying computer science at Loyola Marymount University. He founded and built SQWAD, a SaaS platform Shopify brands use to run creator programs, and builds custom Next.js websites, SaaS MVPs and fixes for AI-built apps for businesses and founders.

See his work · Services and prices

Related articles

Fix, finish and launch your AI-built app

Built your app with Lovable, Bolt, v0, Replit or Cursor and got stuck? I fix the bugs, connect auth and payments, clean up the code and deploy it to production.

See the service