Getting Started
Self-Hosting
Deploy your own instance of FangDash.
FangDash is designed to run on Cloudflare's infrastructure. Here's how to deploy your own instance.
What You Need
- A Cloudflare account (free tier works)
- A Twitch Developer application
- A PartyKit account (for multiplayer)
Deploy the API
The API runs on Cloudflare Workers with a D1 database.
- Create a D1 database in the Cloudflare dashboard
- Update
apps/api/wrangler.tomlwith your database ID - Set your secrets:
npx wrangler secret put BETTER_AUTH_SECRET --config apps/api/wrangler.toml
npx wrangler secret put TWITCH_CLIENT_ID --config apps/api/wrangler.toml
npx wrangler secret put TWITCH_CLIENT_SECRET --config apps/api/wrangler.toml- Deploy (from the repo root):
pnpm ship:apiDeploy the Web App
The web app deploys to Cloudflare Workers using OpenNext.
- Update
apps/web/.env.localwith your API URL - Deploy:
pnpm ship:webDeploy PartyKit
PartyKit handles multiplayer WebSocket connections.
- Set your PartyKit token:
export PARTYKIT_TOKEN=your-token- Deploy:
pnpm ship:partyDeploy Everything at Once
pnpm shipThis runs all three deploy commands in parallel.
Setting Up Twitch OAuth
- Go to the Twitch Developer Console
- Create a new application
- Set the OAuth Redirect URL to
https://your-api-domain/api/auth/callback/twitch - Copy the Client ID and Client Secret to your environment variables