Production
Deployment Guide
Complete guide to deploying NotebookLLM to production using Vercel and various backend platforms.
Deployment Options
Vercel (Recommended)
Best for Next.js frontend with zero-config deployments and automatic SSL.
Railway
Great for full-stack deployment with PostgreSQL and Redis support.
Coolify
Self-hosted option for full control over your infrastructure.
Prerequisites
Required Accounts
- Supabase (database & auth)
- Qdrant Cloud (vector database)
- Google AI Studio (Gemini API)
Required Tools
- Git
- Node.js 18+
- pnpm (recommended)
Frontend Deployment (Vercel)
Step 1: Connect Repository
- Go to vercel.com and sign up
- Click "Add New..." → "Project"
- Import your GitHub repository
- Select the
frontenddirectory as root
Step 2: Configure Environment Variables
Add these environment variables in the Vercel dashboard:
# Supabase (Required) NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key # Backend API NEXT_PUBLIC_API_URL=https://your-backend.railway.app # Features NEXT_PUBLIC_GOOGLE_DRIVE_ENABLED=false NEXT_PUBLIC_NOTE_TAKING_ENABLED=true NEXT_PUBLIC_ASK_ENABLED=true NEXT_PUBLIC_STUDIO_ENABLED=true # App NEXT_PUBLIC_APP_NAME=NotebookLLM NEXT_PUBLIC_APP_URL=https://your-app.vercel.app NEXT_PUBLIC_LOGIN_PAGE=false
Step 3: Deploy
- Click "Deploy" in Vercel dashboard
- Wait for build to complete
- Your app will be available at
https://your-app.vercel.app
Backend Deployment
Railway Deployment (Recommended)
Step 1: Create Railway Project
- Go to railway.app and sign up
- Click "New Project" → "Deploy from GitHub repo"
- Select your repository
Step 2: Configure Environment Variables
# Database DATABASE_URL=postgresql://user:pass@host:5432/db # Supabase SUPABASE_URL=https://your-project.supabase.co SUPABASE_SERVICE_ROLE_KEY=your-service-role-key SUPABASE_JWT_SECRET=your-jwt-secret # Vector Database QDRANT_HOST=https://your-cluster.cloud.qdrant.io QDRANT_API_KEY=your-qdrant-key # LLM Providers GEMINI_API_KEY=your-gemini-key COHERE_API_KEY=your-cohere-key # Google OAuth (for Google Drive) GOOGLE_CLIENT_ID=your-client-id GOOGLE_CLIENT_SECRET=your-client-secret # Security ENVIRONMENT=production CORS_ORIGINS=https://your-app.vercel.app # SMTP (for emails) SMTP_FROM_EMAIL=noreply@yourdomain.com
Step 3: Deploy
- Click "Deploy" in Railway dashboard
- Wait for build and startup to complete
- Note your Railway app URL (e.g.,
https://your-app.up.railway.app)
Docker Deployment
Build Image
# Build the backend image cd backend docker build -t notebookllm-backend .
Run Container
docker run -d \ --name notebookllm-backend \ -p 8000:8000 \ --env-file .env.production \ notebookllm-backend
Docker Compose
# docker-compose.yml
version: '3.8'
services:
api:
build: ./backend
ports:
- "8000:8000"
env_file:
- .env.production
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stoppedDatabase Setup
Supabase Setup
- Create project at supabase.com
- Go to SQL Editor and run the migration files in
backend/migrations/versions/ - Go to Settings → API to get your URL and keys
- Configure authentication providers if needed
Qdrant Setup
- Create cluster at cloud.qdrant.io
- Note your cluster URL and API key
- Create a collection named
notebookllmwith:- Vector size: 768
- Distance metric: Cosine
Health Checks
Verify your deployment is working correctly:
| Endpoint | Purpose |
|---|---|
/api/v1/health | Full system health check |
/api/v1/health/liveness | Liveness probe |
/api/v1/health/readiness | Readiness probe |
# Test health endpoint curl https://your-backend.railway.app/api/v1/health
Environment-Specific Configuration
Production Checklist
- Set
ENVIRONMENT=production - Set
DEBUG=false - Configure
CORS_ORIGINSto your frontend domain - Enable
ENABLE_RATE_LIMITING=true - Configure SMTP for transactional emails
- Set up custom domain (optional)
- Enable SSL/HTTPS
Monitoring & Observability
Langfuse (LLM Observability)
Configure Langfuse to monitor LLM calls and RAG performance:
# Environment variables LANGFUSE_PUBLIC_KEY=pk-xxx LANGFUSE_SECRET_KEY=sk-xxx LANGFUSE_HOST=https://cloud.langfuse.com LANGFUSE_ENABLED=true
Troubleshooting
CORS Errors
Ensure CORS_ORIGINS in backend includes your Vercel frontend URL.
401 Unauthorized
Check that SUPABASE_JWT_SECRET matches your Supabase project settings.
Qdrant Connection Failed
Verify QDRANT_HOST and QDRANT_API_KEY are correct.
Rate Limiting Issues
Check API key limits for Gemini/Cohere. Consider upgrading your plan for higher limits.