Deploy Bolt.new Apps
Deploy AI-generated Bolt.new applications to production
Overview
Take your Bolt.new AI-generated web app from prototype to production on Chita Cloud with full infrastructure support.
What is Bolt.new?
Bolt.new (by StackBlitz) is an AI tool that generates complete web applications from prompts. It creates working React, Vue, or vanilla JavaScript apps instantly.
Why Deploy to Production?
Bolt.new is perfect for prototyping, but production needs:
- Always-on hosting (Bolt.new is preview-only)
- Custom domains with SSL
- Backend services (PostgreSQL, Redis)
- Environment variable management
- Professional infrastructure
Deployment Steps
Step 1: Generate Your App in Bolt.new
- Go to bolt.new
- Describe your app in the prompt
- Bolt AI generates working code
- Test and refine in the preview
- Iterate until satisfied
Step 2: Export Your Code
Method A: Download Project
- Click the menu (≡) in Bolt.new
- Select "Download Project"
- Save ZIP file to your computer
Method B: Push to GitHub (Recommended)
- Click "Connect to GitHub" in Bolt.new
- Authorize StackBlitz
- Create repository
- Bolt pushes code automatically
Step 3: Prepare for Deployment
If you downloaded ZIP:
- Extract the ZIP
- Check for
package.jsonor build configuration - Create GitHub repository:
cd your-bolt-project git init git add . git commit -m "Bolt.new generated app" git remote add origin git@github.com:yourusername/repo.git git push -u origin main
Step 4: Deploy to Chita Cloud
From GitHub:
- Go to app.chitacloud.com
- Click "Deploy" button
- Select "GitHub Repository"
- Choose your Bolt.new repository
- Select
mainbranch - Framework auto-detected:
- Vite + React
- Next.js
- Vue.js
- Vanilla JS
From ZIP Upload:
- Click "Deploy" button
- Select "Upload ZIP"
- Upload your Bolt.new ZIP
- Choose Node.js runtime
- Click "Deploy"
Step 5: Configure Build
Bolt.new apps typically use:
Vite (React/Vue):
- Build command:
npm run build(auto-detected) - Output directory:
dist - Port: Auto-configured
Next.js:
- Build command:
npm run build - Start command:
npm start - Port: 3000
Step 6: Add Backend Services
Bolt.new generates frontends. Add backend services:
PostgreSQL Database:
- Go to "Add-ons" tab
- Add PostgreSQL (100MB free or from €7/month)
- Use
DATABASE_URLenvironment variable in API calls
Redis Cache:
- Included in all paid plans ✅
- Use
REDIS_URLfor session management
Database guide: PostgreSQL | Cache setup: Redis
Step 7: Add API Keys
If your Bolt app uses external APIs:
- Go to "Environment Variables" tab
- Add API keys:
OPENAI_API_KEYSUPABASE_URLSTRIPE_PUBLISHABLE_KEY- etc.
- Update your code to use
process.env.VARIABLE_NAME
Secure management: Environment Variables
Step 8: Custom Domain
- Go to "Domains" tab
- Add your domain
- Configure DNS
- SSL issued automatically
Common Bolt.new Frameworks
React + Vite
// package.json (Bolt-generated)
{
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}Chita Cloud auto-detects and builds correctly.
Next.js App
// Bolt-generated Next.js works as-is
export default function Home() {
return <div>Hello from Chita Cloud!</div>
}Server-side rendering supported.
Vue 3 + Vite
Fully supported with auto-detection of Vue framework.
Adding Backend to Frontend
Bolt.new generates frontends. Add backend:
Option 1: Serverless Functions (Node.js)
Create /api directory:
// api/hello.js
export default function handler(req, res) {
res.json({ message: 'Hello from backend!' });
}Option 2: Separate Backend Service
Deploy a separate Go/Python backend:
- Create backend repository
- Deploy as separate service
- Connect via environment variables
Pricing Example
Bolt.new App on Chita Cloud:
| Service | Cost | Details |
|---|---|---|
| Bolt.new Pro | $20/month | AI code generation |
| Chita Cloud Starter | €16/month | Frontend hosting + Redis |
| PostgreSQL 1GB | €7/month | Optional backend database |
| Total | €23-43/month | Full stack |
Compare to Vercel Pro ($20) + Redis ($25) + Database ($25) = Save ~€40/month
Best Practices
Environment Variables
Never hardcode secrets in Bolt-generated code:
// ❌ Bad
const apiKey = "sk-abc123...";
// ✅ Good
const apiKey = process.env.OPENAI_API_KEY;API Routes
For apps needing backend, add API directory:
your-app/
├── src/
├── api/ # Add this
│ └── hello.js
├── package.json
└── vite.config.jsBuild Optimization
Ensure Vite config is production-ready:
// vite.config.js
export default {
build: {
minify: 'terser',
sourcemap: false
}
}Troubleshooting
Build Fails
Check package.json has all dependencies:
npm install # Locally to verifyEnvironment Variables Not Working
Use import.meta.env in Vite apps:
// Vite apps
const apiKey = import.meta.env.VITE_API_KEY;
// Next.js apps
const apiKey = process.env.NEXT_PUBLIC_API_KEY;API Calls Fail
Enable CORS if calling external APIs:
// Add to your API route
res.setHeader('Access-Control-Allow-Origin', '*');