- One chat for every model. OpenAI, Anthropic, Google, xAI, Perplexity, Fireworks, Azure — and anything else the Vercel AI SDK supports.
- Tools, MCP, and the web built in. Function calling, MCP server support, and web browsing without extra setup.
- Self-host or hosted. One-click Vercel, the official Docker image, or AWS CloudFormation — or skip setup with the hosted plan at fyzz.chat.
OpenAI · Anthropic · Google · xAI · Perplexity · Fireworks · Azure
Note
Fyzz Chat needs a PostgreSQL database wherever you deploy it.
docker run -p 3000:3000 \
-e BETTER_AUTH_SECRET=... \
-e BETTER_AUTH_URL=https://your-domain.com \
-e DATABASE_URL=postgres://... \
-e DIRECT_DATABASE_URL=postgres://... \
-e OPENAI_API_KEY=... \
ghcr.io/fyzz-chat/fyzz-chat:latestTo build your own image, run bun run build:standalone and use the resulting standalone output.
bun install
cp .env.sample .env # then fill in the values (OPENAI_API_KEY at minimum)
docker compose up -d database # start a local Postgres on port 5433
bun db:migrate # apply Prisma migrations to the local DB
bun dev # start the dev server on http://localhost:3000To preview transactional emails: bun run dev:email (port 3001).
Don't want to self-host? fyzz.chat runs the same project, fully managed — zero setup, automatic updates. Self-hosting stays free and supported; the hosted plan is just there if you'd rather not manage infrastructure.
Two ways to self-host:
- Deploy from the repository as a Next.js project.
- Use the Docker image (a containerized version of the Next.js project).
Fyzz Chat uses Prisma with PostgreSQL. Before the app can start, run the migrations (with DATABASE_URL set):
bun run db:deploy
# or
bunx prisma migrate deployRequired:
BETTER_AUTH_SECRET— random string, at least 32 characters.BETTER_AUTH_URL— public URL of your application.DATABASE_URL— pooled Postgres URL.DIRECT_DATABASE_URL— direct (non-pooled) Postgres URL.OPENAI_API_KEY— create one here.
Authentication (optional):
ANONYMOUS_LOGIN— allow single-click anonymous logins.AUTHORIZED_EMAIL_DOMAINS— comma-separated allow-list of email domains.GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET— enable Google sign-in.
Additional model providers (optional):
ANTHROPIC_API_KEY— Anthropic (create)XAI_API_KEY— xAI (create)GOOGLE_GENERATIVE_AI_API_KEY— Google AI (create)PERPLEXITY_API_KEY— Perplexity (create; you may need to create an API group first)FIREWORKS_API_KEY— Fireworks (create)
Without these, the app still runs but only OpenAI models are available.
File uploads to S3 + CloudFront (optional):
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION,AWS_UPLOADS_BUCKETAWS_CLOUDFRONT_KEY_PAIR_IDAWS_CLOUDFRONT_PRIVATE_KEY— private key with|as line breaks (deprecated).AWS_CLOUDFRONT_PRIVATE_KEY_BASE64— base64-encoded private key. Convert withcat key.pem | base64 > base64_key.pem.AWS_CLOUDFRONT_DISTRIBUTION_DOMAIN— falls back toAWS_UPLOADS_BUCKETif your bucket name matches the distribution domain.
Warning
If any AWS_ variable is missing, uploads are persisted in the database instead of S3.
Two ready-made stacks live in aws/ — they create an ECS cluster with RDS PostgreSQL, an Application Load Balancer, and the necessary networking.
cloudformation-ec2.json— ECS on EC2.cloudformation-fargate.json— ECS on Fargate.
To visualize either template, open the AWS CloudFormation Infrastructure Composer, choose Create project → Template tab → JSON, and paste the contents.
Prerequisites — store secrets in AWS Secrets Manager:
- Go to Secrets Manager → Store a new secret → Other type of secret → Plaintext.
- Create
fyzz-chat/better-auth-secret(random string, 32+ chars). - Create
fyzz-chat/openai-api-keywith your OpenAI key. - Note the ARNs — you'll pass them as stack parameters.
Deploy:
- CloudFormation → Create stack → With new resources (standard).
- Upload the chosen template, name the stack
fyzz-chat. - Fill in:
BetterAuthSecretArn— ARN from above.OpenaiApiKeySecretArn— ARN from above.BetterAuthUrl— your public URL (e.g.https://your-domain.com).
- Review and create. Stack creation takes ~10–15 minutes.
Note
Deleting the stack does not delete the database. Disable deletion protection and remove it manually if you want it gone.
Run database migrations:
- ECS → Clusters → your cluster → Tasks tab → Run new task.
- Configure: task definition family
fyzz-chat-migration, launch type Fargate. - Networking: VPC
fyzz-chat-vpc, security groupfyzz-chat-ecs-sg. - Create and wait for completion.
Enable HTTPS (optional):
- Certificate Manager → Request a certificate for your domain.
- Add the DNS validation records and wait for validation.
- CloudFormation → your stack → Update, set the
CertificateArnparameter, and complete the update.
The template auto-redirects HTTP to HTTPS once a certificate is attached.
Install Bun:
curl -fsSL https://bun.sh/install | bash
# Windows:
powershell -c "irm bun.sh/install.ps1 | iex"Then follow Local development above. Other package managers (npm, yarn, pnpm) work too.
| Script | What it does |
|---|---|
bun dev |
Start the dev server |
bun build |
Build for production |
bun build:standalone |
Build for Docker / standalone deploy |
bun start |
Run the production build |
bun db:migrate |
Apply Prisma migrations (development) |
bun db:deploy |
Apply Prisma migrations (production) |
bun test |
Run unit tests |
bun test:integration |
Run integration tests |
bun check-write |
Lint + format with Biome |
bun type-check |
Type-check with TypeScript |
bun dev:email |
Preview transactional emails (port 3001) |
Next.js · Bun · Prisma · Vercel AI SDK · Better Auth · tRPC · Tailwind CSS · shadcn/ui · Biome
If Fyzz Chat is useful to you, consider starring the repo — it helps others find it.