Spaces:
Sleeping
π― DEPLOY NOW - Everything Ready!
β What's Configured
I've set up everything to work exactly like your localhost, using your FREE API keys:
- β
Groq API:
gsk_3pLc...kvfC- For chat, transformations, insights - β
Gemini API:
AIzaS...ep_0- For embeddings, search, long context - β Database: test namespace/database (same as localhost)
- β All settings: Same retry/worker config as your working setup
π STEP 1: Copy Railway Variables
Go to Railway Dashboard β Your Service β Variables, and paste ALL of these:
SURREAL_URL=ws://127.0.0.1:8000/rpc
SURREAL_USER=root
SURREAL_PASSWORD=root
SURREAL_NAMESPACE=test
SURREAL_DATABASE=test
INTERNAL_API_URL=http://127.0.0.1:5055
API_URL=http://localhost:5055
SURREAL_COMMANDS_MAX_TASKS=5
SURREAL_COMMANDS_RETRY_ENABLED=true
SURREAL_COMMANDS_RETRY_MAX_ATTEMPTS=3
SURREAL_COMMANDS_RETRY_WAIT_STRATEGY=exponential_jitter
SURREAL_COMMANDS_RETRY_WAIT_MIN=1
SURREAL_COMMANDS_RETRY_WAIT_MAX=30
GROQ_API_KEY=<YOUR_GROQ_KEY_HERE>
GOOGLE_API_KEY=<YOUR_GEMINI_KEY_HERE>
Note: We'll update API_URL after first deploy.
π STEP 2: Push Code
cd c:\sem6-real\studyrocket\notebookllm\open-notebook
git add .
git commit -m "Add Railway deployment with FREE tier (Groq + Gemini)"
git push origin main
π STEP 3: Wait for Deploy
Railway will:
- Build the Docker image (~5-10 minutes)
- Start all services (SurrealDB, API, Worker, Frontend)
- Run migrations (0 β 18)
- Expose your app on a public URL
Watch the logs in Railway dashboard for:
β Ready in XXXms
INFO: Application startup complete
Migrations completed successfully. Database is now at version 18
π STEP 4: Update API_URL
- Find your Railway domain in the dashboard (e.g.,
https://se-production-1a2b.up.railway.app) - Update the
API_URLvariable:API_URL=https://se-production-1a2b.up.railway.app - Railway will auto-redeploy (~1 minute)
β STEP 5: Test Everything
Visit your app: https://your-railway-domain.up.railway.app
Test these features:
- β Create a notebook
- β Upload a document (tests embeddings)
- β Search documents (tests Gemini embeddings)
- β Chat with documents (tests Groq LLM)
- β Generate insights (tests transformations)
- β Create notes
Skip for now:
- βΈοΈ Podcast generation (you'll configure later)
π What You'll Have
Working Features (FREE):
- β Chat using Groq Llama 3.1 70B
- β Document embeddings using Gemini
- β Semantic search using Gemini
- β Transformations using Groq
- β Insights using Groq
- β Long context (1M tokens!) using Gemini
- β All for $0/month (AI costs)
Railway Costs:
- First month: FREE ($5 credit)
- After: $5-10/month (just hosting)
π§ Models Available
In the UI, you can select from:
Groq Models (FREE):
llama-3.1-70b-versatile- Best for complex tasksllama-3.1-8b-instant- Fast for simple tasksmixtral-8x7b-32768- Alternative option
Gemini Models (FREE):
gemini-1.5-flash- Fast, FREEgemini-1.5-pro- 1M context, FREE tiertext-embedding-004- Embeddings
π If Something Goes Wrong
Build Fails
β Check Railway logs for error message β Ensure all files are committed (especially migrations/18.surrealql)
Services Won't Start
β Check SURREAL_URL=ws://127.0.0.1:8000/rpc (not localhost!)
β Verify both API keys are set correctly
Can't Access App
β Wait 2-3 minutes after deploy
β Check API_URL is set to your Railway domain
β Try incognito/private browser window
Features Don't Work
β Groq models: Check chat works in UI β Gemini embeddings: Try uploading a document β If API key issues: Regenerate keys at provider dashboards
π Your Setup Summary
| Component | Configuration | Status |
|---|---|---|
| Database | SurrealDB (embedded) | β Ready |
| API | FastAPI on port 5055 | β Ready |
| Frontend | Next.js on port 8080 | β Ready |
| Worker | Background tasks | β Ready |
| LLM | Groq Llama 3.1 | β FREE |
| Embeddings | Gemini | β FREE |
| Hosting | Railway | β $5-10/mo |
| Podcasts | Not configured | βΈοΈ Later |
π Next Steps After Deploy
- β Test all features (except podcasts)
- β Upload some test documents
- β Try searching and chatting
- β Generate some insights
- βΈοΈ Configure podcasts later when needed
π° Cost Tracking
Track your FREE tier usage:
- Groq: https://console.groq.com/dashboard
- Gemini: https://console.cloud.google.com/apis/dashboard
- Railway: https://railway.app/dashboard
All providers show FREE tier limits and usage!
π Ready to Deploy!
Everything is configured. Just run:
git add .
git commit -m "Railway deployment ready with FREE tier keys"
git push origin main
Then watch Railway build and deploy! π
Questions? Everything should work exactly like your localhost setup, but on Railway! The same models, same features (minus podcasts), all working with your FREE API keys.