This is a condensed guide for setting up the OBS Telegram Bot with Supabase.
- Go to supabase.com β Sign up
- Create new project β Name:
obs-telegram-bot - Set strong database password β Create project
- Project Settings β Database
- Copy "Connection string" β URI format
- Format:
postgresql://postgres:[PASSWORD]@db.[PROJECT].supabase.co:5432/postgres
Create .env file:
DATABASE_URL="postgresql://postgres:[PASSWORD]@db.[PROJECT].supabase.co:5432/postgres"
TELEGRAM_BOT_TOKEN="your_bot_token"npm install
npm run db:generate
npm run db:pushnpm run devVisit http://localhost:3000
npm install -g vercelvercel- Go to Vercel Dashboard β Your Project β Settings β Environment Variables
- Add:
DATABASE_URL(your Supabase URL)TELEGRAM_BOT_TOKEN(your bot token)
vercel --prod-
Configure OBS Studio:
- Tools β WebSocket Server Settings
- Enable server, port 4455, set password
-
Test Bot:
- Send
/startto your Telegram bot - Use
/connectto connect to OBS - Try
/scenes,/stream start, etc.
- Send
-
Monitor:
- Check Supabase dashboard for database stats
- Monitor Vercel for deployment logs
# Development
npm run dev
# Database
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to database
npx prisma studio # View database
# Deployment
vercel --prod # Deploy to productionConnection Issues:
- Verify DATABASE_URL includes password
- Check Supabase project status
- Ensure SSL is enabled
Bot Issues:
- Verify TELEGRAM_BOT_TOKEN
- Check Vercel environment variables
- Review Vercel function logs
That's it! Your OBS Telegram Bot should be running with Supabase in minutes.