Quick solutions to common VT setup and runtime issues.
Error: docker-compose: command not found
# Install Docker Desktop (macOS/Windows)
# OR install Docker Compose separately
brew install docker-compose # macOS
sudo apt install docker-compose # LinuxError: validate-setup.sh: command not found
chmod +x validate-setup.sh
./validate-setup.shError: BETTER_AUTH_SECRET is not set
# Generate new secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Copy output to BETTER_AUTH_SECRET in apps/web/.env.localError: bun: command not found
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Restart terminal or run: source ~/.bashrcError: psql: command not found
# macOS
brew install postgresql@15
brew services start postgresql@15
# Ubuntu/Debian
sudo apt update && sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresqlError: Port 3000 already in use
# Find process using port
lsof -i :3000
kill -9 <PID>
# OR change port in docker-compose.yml
# ports: ["3001:3000"]Error: Database connection failed
# Check PostgreSQL status
docker-compose ps
# View database logs
docker-compose logs postgres
# Reset database
docker-compose down -v && docker-compose up -d postgresError: Invalid redirect URI
Configure OAuth provider with correct callback URLs:
- GitHub:
http://localhost:3000/api/auth/callback/github - Google:
http://localhost:3000/api/auth/callback/google
Error: Session expired
# Clear browser cookies/localStorage
# Hard refresh: Cmd+Shift+R (macOS) or Ctrl+F5 (Windows)Error: API key invalid
# Check API key format
# OpenAI: starts with sk-
# Anthropic: starts with sk-ant-
# Gemini: alphanumeric stringError: Model not available
# Check if you have access to the model
# Some models require special access or paid plans# Clear all caches
rm -rf node_modules apps/web/node_modules package-lock.json bun.lock
# Reinstall
bun install
# If still failing, try:
npm cache clean --force
bun pm cache rm# Clear TypeScript cache
rm -rf apps/web/.next apps/web/tsconfig.tsbuildinfo
# Regenerate types
cd apps/web && bun run typegen
# Restart dev server
bun dev# Regenerate schema
cd apps/web
bun run generate
# Reset database (loses data)
docker-compose down -v
docker-compose up --buildCan't Access http://localhost:3000
Docker setup:
# Check container status
docker-compose ps
# View app logs
docker-compose logs vtchat
# Restart services
docker-compose restartManual setup:
# Check if dev server is running
ps aux | grep "next dev"
# Restart dev server
bun dev# Check NEXT_PUBLIC_BASE_URL in .env.local
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Clear browser cache
# Hard refresh: Cmd+Shift+R# Clear Next.js cache
rm -rf apps/web/.next
# Use Turbopack for faster builds
bun dev --turbopack# Monitor Docker containers
docker stats
# Limit container resources in docker-compose.yml
# deploy:
# resources:
# limits:
# memory: 2G
# cpus: '1.0'# Docker containers
docker-compose ps
# Running processes
ps aux | grep -E "(node|bun|next)"
# Port usage
lsof -i :3000
lsof -i :5432
# Disk space
df -h# Docker logs
docker-compose logs vtchat
docker-compose logs postgres
# Application logs (manual setup)
tail -f apps/web/logs/*.log# Validate setup
./validate-setup.sh
# Check Node/Bun version
node --version
bun --version
# Check environment variables
cd apps/web && cat .env.local | grep -v PASSWORD# Stop everything
docker-compose down -v
# Clear all caches
rm -rf node_modules apps/web/node_modules apps/web/.next .next
# Clean Docker
docker system prune -f
docker volume prune -f
# Restart fresh
bun install
docker-compose up --build# Export data
docker exec vtchat-postgres pg_dump -U vtchat vtchat_dev > backup.sql
# Import later
docker exec -i vtchat-postgres psql -U vtchat vtchat_dev < backup.sql- Run
./validate-setup.sh - Check
docker-compose ps - View logs with
docker-compose logs - Clear browser cache and hard refresh
- GitHub Issues: github.com/vinhnx/vtchat/issues
- Discussions: github.com/vinhnx/vtchat/discussions
Include:
- Your setup method (Docker/manual)
- OS and versions (
docker --version,bun --version) - Full error messages
- Steps to reproduce
docker-compose logsoutput