close
Skip to main content
TanStack Start is a full-stack framework powered by TanStack Router and Vite. It supports full-document SSR, streaming, server functions, and bundling.
1

Create a new TanStack Start app

Use the interactive CLI to create a new TanStack Start app.
terminal
2

Start the dev server

Change to the project directory and start the Vite dev server with Bun.
terminal
3

Update scripts in package.json

In the scripts field of your package.json, prefix the Vite CLI commands with bun --bun so that Bun runs the Vite CLI for dev, build, and preview.
package.json

Hosting

To host your TanStack Start app in production, use Nitro or a custom Bun server.
1

Add Nitro to your project

Add Nitro to your project to deploy your TanStack Start app to different platforms.
terminal
2

Update your vite.config.ts file

Add the Nitro plugin to your vite.config.ts file.
vite.config.ts
The bun preset is optional, but it configures the build output specifically for Bun’s runtime.
3

Update the start command

Make sure build and start scripts are present in your package.json file:
package.json
You do not need the custom start script when deploying to Vercel.
4

Deploy your app

Use one of the following guides to deploy your app to a hosting provider.
When deploying to Vercel, either add "bunVersion": "1.x" to your vercel.json file, or set the Bun version in the nitro config in your vite.config.ts file:
Do not use the bun Nitro preset when deploying to Vercel.
vite.config.ts

Vercel

Deploy on Vercel

Render

Deploy on Render

Railway

Deploy on Railway

DigitalOcean

Deploy on DigitalOcean

AWS Lambda

Deploy on AWS Lambda

Google Cloud Run

Deploy on Google Cloud Run

Templates

bun-tanstack-todo

Todo App with Tanstack + Bun

A Todo application built with Bun, TanStack Start, and PostgreSQL.
bun-tanstack-basic

Bun + TanStack Start Application

A TanStack Start template using Bun with SSR and file-based routing.
bun-tanstack-start

Basic Bun + Tanstack Starter

The basic TanStack starter using the Bun runtime and Bun’s file APIs.

→ See TanStack Start’s hosting documentation