Hosting is the process of deploying your application to the internet so that users can access it. This is a critical part of any web development project, ensuring your application is available to the world. TanStack Start is built on Vite, a powerful dev/build platform that allows us to make it possible to deploy your application to any hosting provider.
TanStack Start is designed to work with any hosting provider, so if you already have a hosting provider in mind, you can deploy your application there using the full-stack APIs provided by TanStack Start.
However, since hosting is one of the most crucial aspects of your application's performance, reliability, and scalability, we recommend using one of our Official Hosting Partners: Cloudflare or Netlify.
Warning
The page is still a work in progress. We'll keep updating this page with guides on deployment to different hosting providers soon!
Once you've chosen a deployment target, you can follow the deployment guidelines below to deploy your TanStack Start application to the hosting provider of your choice:
When deploying to Cloudflare Workers, you'll need to complete a few extra steps before your users can start using your app.
pnpm install @cloudflare/vite-plugin -D
pnpm install @cloudflare/vite-plugin -D
Add the cloudflare plugin to your vite.config.ts file.
// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { cloudflare } from '@cloudflare/vite-plugin'
import viteSolid from 'vite-plugin-solid'
export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: 'ssr' } }),
tanstackStart(),
viteSolid({ ssr: true }),
],
})
// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { cloudflare } from '@cloudflare/vite-plugin'
import viteSolid from 'vite-plugin-solid'
export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: 'ssr' } }),
tanstackStart(),
viteSolid({ ssr: true }),
],
})
pnpm add wrangler -D
pnpm add wrangler -D
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "tanstack-start-app",
"compatibility_date": "2025-09-02",
"compatibility_flags": ["nodejs_compat"],
"main": "@tanstack/solid-start/server-entry",
"vars": {
"MY_VAR": "Hello from Cloudflare"
}
}
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "tanstack-start-app",
"compatibility_date": "2025-09-02",
"compatibility_flags": ["nodejs_compat"],
"main": "@tanstack/solid-start/server-entry",
"vars": {
"MY_VAR": "Hello from Cloudflare"
}
}
{
"scripts": {
"dev": "vite dev",
"build": "vite build && tsc --noEmit",
"start": "node .output/server/index.mjs",
// ============ 👇 add this line ============
"deploy": "wrangler deploy"
}
}
{
"scripts": {
"dev": "vite dev",
"build": "vite build && tsc --noEmit",
"start": "node .output/server/index.mjs",
// ============ 👇 add this line ============
"deploy": "wrangler deploy"
}
}
pnpm run build && pnpm run deploy
pnpm run build && pnpm run deploy
Deploy your application to Cloudflare Workers using their one-click deployment process, and you're ready to go!
Install and add the @netlify/vite-plugin-tanstack-start plugin, which configures your build for Netlify deployment and provides full Netlify production platform emulation in local dev.
// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import netlify from '@netlify/vite-plugin-tanstack-start'
import viteSolid from 'vite-plugin-solid'
export default defineConfig({
plugins: [tanstackStart(), netlify(), viteSolid({ ssr: true })],
})
// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import netlify from '@netlify/vite-plugin-tanstack-start'
import viteSolid from 'vite-plugin-solid'
export default defineConfig({
plugins: [tanstackStart(), netlify(), viteSolid({ ssr: true })],
})
Add a netlify.toml file to your project root:
[build]
command = "vite build"
publish = "dist/client"
[build]
command = "vite build"
publish = "dist/client"
Deploy your application using their one-click deployment process, and you're ready to go!
Nitro is an abstraction layer that allows you to deploy TanStack Start applications to a wide range of providers.
⚠️ During TanStack Start 1.0 release candidate phase, we currently recommend using:
⚠️ @tanstack/nitro-v2-vite-plugin is a temporary compatibility plugin for using Nitro v2 as the underlying build tool for TanStack Start. Use this plugin if you experience issues with the Nitro v3 plugin. It does not support all of Nitro v3's features and is limited in its dev server capabilities, but should work as a safe fallback, even for production deployments for those who were using TanStack Start's alpha/beta versions.
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
export default defineConfig({
plugins: [
tanstackStart(),
nitroV2Plugin(/*
// nitro config goes here, e.g.
{ preset: 'node-server' }
*/),
viteSolid({ ssr: true }),
],
})
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
export default defineConfig({
plugins: [
tanstackStart(),
nitroV2Plugin(/*
// nitro config goes here, e.g.
{ preset: 'node-server' }
*/),
viteSolid({ ssr: true }),
],
})
⚠️ The nitro vite plugin is an official BETA plugin from the Nitro team for using Nitro v3 as the underlying build tool for TanStack Start. It is still in development and is receiving regular updates.
This package needs to be installed as follows:
"nitro": "npm:nitro-nightly",
"nitro": "npm:nitro-nightly",
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitro } from 'nitro/vite'
export default defineConfig({
plugins: [
tanstackStart(),
nitro(/*
// nitro config goes here, e.g.
{ config: { preset: 'node-server' } }
*/)
viteSolid({ssr: true}),
],
})
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitro } from 'nitro/vite'
export default defineConfig({
plugins: [
tanstackStart(),
nitro(/*
// nitro config goes here, e.g.
{ config: { preset: 'node-server' } }
*/)
viteSolid({ssr: true}),
],
})
Follow the Nitro deployment instructions. Deploy your application to Vercel using their one-click deployment process, and you're ready to go!
Follow the Nitro deployment instructions. Use the node command to start your application from the server from the build output files.
Ensure build and start npm scripts are present in your package.json file:
"build": "vite build",
"start": "node .output/server/index.mjs"
"build": "vite build",
"start": "node .output/server/index.mjs"
Then you can run the following command to build your application:
npm run build
npm run build
You can start your application by running:
npm run start
npm run start
Follow the Nitro deployment instructions. Depending on how you invoke the build, you might need to set the 'bun' preset in the Nitro configuration:
// vite.config.ts
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
// alternatively: import { nitro } from 'nitro/vite'
export default defineConfig({
plugins: [
tanstackStart(),
nitroV2Plugin({ preset: 'bun' })
// alternatively: nitro( { config: { preset: 'bun' }} ),
viteSolid({ssr: true}),
],
})
// vite.config.ts
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import { defineConfig } from 'vite'
import viteSolid from 'vite-plugin-solid'
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
// alternatively: import { nitro } from 'nitro/vite'
export default defineConfig({
plugins: [
tanstackStart(),
nitroV2Plugin({ preset: 'bun' })
// alternatively: nitro( { config: { preset: 'bun' }} ),
viteSolid({ssr: true}),
],
})
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.