Intermediate

Deployment

Deploy your Bolt.new projects to production with one click, configure custom domains, manage environment variables, and export code to GitHub.

One-Click Deployment to Netlify

Bolt.new integrates with Netlify for seamless deployment:

  1. Click the "Deploy" button in the toolbar
  2. Connect your Netlify account (first time only)
  3. Bolt builds your project and pushes it to Netlify
  4. You receive a live URL (e.g., your-app-name.netlify.app)
  5. Subsequent deploys update the same site automatically
💡
Good to know: Netlify's free tier includes 100GB bandwidth, 300 build minutes per month, and HTTPS by default. This is sufficient for most personal projects and prototypes.

Custom Domain Setup

After deploying to Netlify, you can connect a custom domain:

  1. Go to your Netlify dashboard → Site settings → Domain management
  2. Click "Add custom domain"
  3. Enter your domain name (e.g., myapp.com)
  4. Update your DNS records to point to Netlify:
    • A record: Point to 75.2.60.5
    • CNAME: Point www to your Netlify site URL
  5. Netlify automatically provisions a free SSL certificate

Environment Variables

For apps that use API keys, database URLs, or other secrets:

  • In Netlify: Go to Site settings → Environment variables
  • Add variables like SUPABASE_URL, SUPABASE_ANON_KEY, API_KEY
  • These are available at build time and in serverless functions
  • Never hardcode secrets in your Bolt.new code — use environment variables instead
Security note: Environment variables prefixed with VITE_ (for Vite-based projects) or NEXT_PUBLIC_ (for Next.js) are exposed to the client-side. Only use these prefixes for non-sensitive values like public API URLs. Keep secrets server-side only.

Database Deployment

If your app uses a database (Supabase, Firebase, etc.):

  • The database runs as a separate service — it doesn't deploy with your frontend
  • Ensure your database is on a production plan (not just local/dev mode)
  • Set database connection strings as environment variables in Netlify
  • Configure Row Level Security (RLS) if using Supabase for production

Exporting Code to GitHub

You can export your Bolt.new project to a GitHub repository for further development:

  1. Click the export or download option in Bolt.new
  2. Choose to push to a new or existing GitHub repository
  3. Authorize GitHub access if prompted
  4. Your complete project code, including dependencies, is pushed to the repo

Running Locally After Export

Once exported to GitHub, you can run the project locally:

# Clone the repository
git clone https://github.com/your-username/your-project.git
cd your-project

# Install dependencies
npm install

# Start the development server
npm run dev

CI/CD Considerations

For ongoing development after exporting from Bolt.new:

  • Netlify auto-deploy: Connect your GitHub repo to Netlify for automatic deploys on every push
  • Branch deploys: Configure Netlify to create preview URLs for pull requests
  • Build commands: Ensure your netlify.toml or build settings match your framework's build command
  • Testing: Add tests before deploying to production — Bolt-generated code should be tested like any other code

💡 Try It: Deploy a Project

Take one of the projects you built in previous lessons and deploy it to Netlify using Bolt.new's one-click deploy. Share the live URL and verify that everything works correctly in production.

Deploying regularly helps you catch issues early and maintain a production-ready workflow!