Docs / Self-hosting

Deploy

Run your own T Chat on Vercel with a Neon database and any OpenAI-compatible model.

Requirements

  • A Vercel account (the Hobby plan is enough).
  • A Neon Postgres database, added from the Vercel Storage tab.
  • An API key for an OpenAI-compatible model provider. DeepSeek is the default.

Environment variables

NameRequiredPurpose
DATABASE_URLYesNeon connection string. Set automatically by the Vercel integration.
DEEPSEEK_API_KEYYesProvider API key. Server-side only.
ADMIN_PASSWORDYesConsole password, 8 or more characters. Use a long random one.
AI_BASE_URLNoProvider base URL. Default https://api.deepseek.com.
AI_MODELNoModel name. Default deepseek-chat.

Steps

  1. Import the repository into Vercel and set the Framework Preset to Next.js.
  2. Add the Neon integration, then the variables above.
  3. Deploy, then attach your domain under Settings → Domains.
  4. Open /login, sign in and create your first member.

Running locally

bash
npm install
vercel env pull .env.local
npm run dev

Local runs use the same database as the variables you pull, so users you create are real.