What are you deploying?
Select your stack type so we can show you the most relevant instructions.
Prepare Your Code
Make sure your app runs locally
Start your development server and verify everything works. Fix any errors before deploying.
Set up environment variables (.env)
API keys and passwords should be in a .env file, NOT in your code.
Example .env.local for Next.js/React:
NEXT_PUBLIC_API_URL=https://api.example.com
DATABASE_URL=postgresql://localhost:5432/mydb
NEXTAUTH_SECRET=your-secret-key
Protect your secrets with .gitignore
Make sure your .gitignore file includes your .env files so they don't get pushed to GitHub.
Warning: If you push your .env to a public repo, hackers can see your passwords. This is the #1 security mistake beginners make!
Your .gitignore should include:
.env
.env.local
.env.production
.env*.local
Push Your Code to GitHub
All hosting platforms connect to GitHub. Follow these steps to upload your code.
Before you start, make sure you have:
- Git installed on your computer
- A GitHub account
Open Terminal in your project folder
On Mac: Right-click your project folder → "New Terminal at Folder"
On Windows: Right-click → "Open in Terminal" or use VS Code's terminal
Initialize Git (skip if already done)
git init
Add all your files
git add .
Create your first commit
git commit -m "Initial commit"
Create a new repository on GitHub
Create New RepositoryGive it a name (like "my-app"), then click "Create repository"
Tip: If you're vibe coding solo and not collaborating with others, set your repository to Private. This keeps your code hidden from the public. You can always change it to Public later if you want to share your project.
Connect your local project to GitHub
Replace YOUR_USERNAME and YOUR_REPO_NAME with your actual values:
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
Push your code to GitHub
git push -u origin main
If you see "error: src refspec main does not match any", try git push -u origin master instead
Your code is now on GitHub! You can view it at github.com/YOUR_USERNAME/YOUR_REPO_NAME
Deploy Your App
Choose how you want to deploy. Most beginners should start with Option A.
One-Click Deploy Platforms
These platforms connect to your GitHub repo and automatically deploy your app. No server setup required!
Vercel
Perfect for React, Next.js, Vue. Made by the Next.js team.
Netlify
Great for static sites. Has drag & drop option too!
Railway
Best for full-stack apps with databases. Supports Laravel, Django, Rails, Express.
Render
Free PostgreSQL database. Great for APIs and backend projects.
Cloudflare Pages
Truly unlimited bandwidth. Fastest global CDN.
Quick Comparison
| Platform | Best For | Database | Free Tier |
|---|---|---|---|
| Vercel | Frontend, Next.js | Via integrations | Generous |
| Netlify | Static sites | Via integrations | Generous |
| Railway | Full-stack | PostgreSQL, MySQL | $5/month credit |
| Render | Backends, APIs | PostgreSQL (90 days) | Generous |
| Cloudflare | Static, unlimited | D1 (SQLite) | Unlimited |
After You Deploy
Free SSL (HTTPS)
All these platforms give you free SSL automatically. Your site will be secure!
Auto Deploys
Push to GitHub, your site updates automatically. No manual work needed!
Environment Variables Reference
Click to see detailed .env examples for each stack
Each hosting platform has a dashboard where you can add your environment variables. Never put sensitive data directly in your code!
L Laravel
APP_NAME="My App"
APP_ENV=production
APP_KEY=base64:your-generated-key
APP_DEBUG=false
APP_URL=https://yourapp.com
DB_CONNECTION=mysql
DB_HOST=your-db-host.com
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
N Next.js / React
NEXT_PUBLIC_API_URL=https://api.example.com
DATABASE_URL=postgresql://localhost:5432/mydb
NEXTAUTH_SECRET=your-secret-key
# NEXT_PUBLIC_ variables are visible in browser
# Keep secrets WITHOUT the NEXT_PUBLIC_ prefix
D Django / Python
SECRET_KEY=your-django-secret-key
DEBUG=False
ALLOWED_HOSTS=yourapp.com,www.yourapp.com
DATABASE_URL=postgres://user:pass@host:5432/dbname
N Node.js / Express
PORT=3000
DATABASE_URL=mongodb://localhost:27017/myapp
JWT_SECRET=your-jwt-secret
STRIPE_KEY=sk_test_xxx
Stuck? Ask Claude!
If you run into deployment issues, Claude Code can help you debug errors and fix configuration problems.
Get Claude Code