NudgeCampaign v4 Setup Checklist
Status: Complete
Version: v4
Purpose: Step-by-step setup guide for new deployments
Prerequisites
- Docker Desktop installed and running
- At least 10GB free disk space
- Git repository cloned
Setup Steps
1. Environment Configuration
- Copy
.env.exampleto.env(if not exists) - Add API keys to
.env:-
OPENROUTER_API_KEY -
ANTHROPIC_API_KEY -
POSTMARK_SERVER_API_TOKEN -
STRIPE_SECRET_KEY(optional for MVP)
-
2. Docker Deployment
# Start all services
docker compose up -d
# Wait for services to initialize (30-60 seconds)
docker compose ps
3. n8n API Key Setup (CRITICAL)
This must be done manually on first deployment:
- Access n8n UI: http://localhost:5678
- Login with: admin / password
- Navigate to: Settings β API
- Click: Generate API Key
- Copy the generated key
- Add to
.envfile:N8N_API_KEY=your-generated-key-here
Current v4 API Key (for reference):
N8N_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwZTVkZTM5Ni04Mzg3LTQyYWQtYmZmMi0wZDExYWE5MTNmNzEiLCJpc3MiOiJuOG4iLCJhdWQiOiJwdWJsaWMtYXBpIiwiaWF0IjoxNzU0MjMwMTQ2fQ.PcuqTYftCXV2bD9wN76Ho9vAtLP4Wv_19a8Rew_tvrY
4. Import n8n Workflows
# After setting N8N_API_KEY in .env
./scripts/import-via-api.sh
5. Application Access
- Main App: http://localhost:3002
- n8n Workflows: http://localhost:5678 (admin/password)
- Supabase Studio: http://localhost:54323
- MailDev: http://localhost:1080
- Redis Commander: (optional, not configured)
6. Verification
- Can login to app at http://localhost:3002/login
- Navigation sidebar is visible
- All menu items load without 404
- n8n workflows are imported and active
- Can create a test campaign via chat
Important Notes
Database Configuration
- n8n now uses PostgreSQL (not SQLite) to avoid disk space issues
- All containers have memory limits to prevent resource exhaustion
- Database migrations run automatically on startup
Resource Limits
- App: 2GB memory limit
- PostgreSQL: 2GB memory limit
- n8n: 1GB memory limit
- Redis: 512MB with LRU eviction
Known Issues & Solutions
Issue: "SQLITE_FULL: database or disk is full"
Solution: n8n is configured to use PostgreSQL. If this occurs, check Docker disk usage with docker system df
Issue: n8n workflows don't import
Solution: Ensure N8N_API_KEY is set in .env and valid
Issue: Supabase Auth service restarts
Solution: This is expected - test auth system bypasses it
Troubleshooting Commands
# Check all services status
docker compose ps
# View logs for specific service
docker compose logs n8n
docker compose logs app
# Restart a specific service
docker compose restart n8n
# Clean rebuild (if needed)
docker compose down
docker system prune -f
docker compose up -d --build
Next Steps After Setup
- Create API key in n8n (if not done)
- Import workflows using
./scripts/import-via-api.sh - Test campaign creation via chat interface
- Configure Postmark for real email sending
- Set up production domain and SSL
Production Deployment
For production, additionally:
- Change all default passwords
- Use environment-specific .env files
- Configure proper SSL certificates
- Set up monitoring and backups
- Use managed database service
- Configure CDN for static assets