Self-Host Sudar at $0

Run Studio and Learn on Vercel (free tier) and Sudar Intelligence on Railway, Render, or Fly.io (free tiers available). No server cost for the front ends. Paid tiers only if you need always-on or more resources.

Live demos: Sudar Studio, Sudar Learn.

Why $0 is possible

Sudar is open source. Vercel hosts the Next.js apps for free. Railway, Render, and Fly.io offer free tiers for the Python Intelligence service. You bring your own Postgres-compatible database and AI API keys (usage-based). Open-weight models and Edge-TTS keep per-learner cost very low; under $0.02/month in our reference setup.

Prerequisites

  • GitHub repo: https://github.com/Dhanikesh-Karunanithi/Sudar
  • Vercel account (sign in with GitHub)
  • Postgres-compatible database (shared by Studio and Learn, managed cloud or self-operated)
  • Sudar Intelligence hosted somewhere (Railway / Render / Fly.io) for production

Step 1: Deploy Sudar Studio

  1. Go to vercel.com/new and import the repo Dhanikesh-Karunanithi/Sudar.
  2. Set Root Directory to sudar-studio (monorepo).
  3. Add environment variables from sudar-studio/.env.example: database and auth connection settings, NEXTAUTH_URL, NEXTAUTH_SECRET, SUDAR_INTELLIGENCE_URL, at least one AI key, NEXT_PUBLIC_LEARN_APP_URL (you’ll set this after deploying Learn).
  4. Deploy. Then set NEXTAUTH_URL to the actual Vercel URL and redeploy if needed.

Step 2: Deploy Sudar Learn

  1. Create another Vercel project from the same repo.
  2. Set Root Directory to sudar-learn.
  3. Add env vars from sudar-learn/.env.example: database connection settings, NEXTAUTH_URL (your Learn URL), NEXTAUTH_SECRET, SUDAR_INTELLIGENCE_URL, NEXT_PUBLIC_APP_URL (same as NEXTAUTH_URL).
  4. Deploy.

Step 3: Deploy Sudar Intelligence

Vercel only runs Node.js. The Python FastAPI service in sudar-intelligence/ must be hosted elsewhere. Recommended: Railway.

  1. Sign up at railway.app. New Project → Deploy from GitHub repo, root sudar-intelligence.
  2. Build: pip install -r requirements.txt. Start: uvicorn src.api.main:app --host 0.0.0.0 --port $PORT.
  3. Set variables: Postgres connection settings (see .env.example), at least one of TOGETHER_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY, CORS_ORIGINS (your Studio and Learn URLs), ENVIRONMENT=production.
  4. Generate a domain in Railway. Copy the URL (e.g. https://sudar-intelligence.up.railway.app).
  5. In both Vercel projects, set SUDAR_INTELLIGENCE_URL to that URL and redeploy.

Alternatives: Render (New Web Service, root sudar-intelligence, same build/start commands) or Fly.io (Docker or fly launch in sudar-intelligence). Free tiers may spin down after inactivity; Railway and Render paid tiers give always-on.

Step 4: Wire URLs

  • In Studio (Vercel): set NEXT_PUBLIC_LEARN_APP_URL to your Learn URL.
  • In Learn: ensure NEXTAUTH_URL and NEXT_PUBLIC_APP_URL match the Learn deployment URL.
  • Redeploy both if you changed anything.

Full step-by-step and env reference: docs/VERCEL_DEPLOYMENT.md and docs/INTELLIGENCE_DEPLOYMENT.md in the repo.