Skip to Content

Frameworks

Full-stack

Remix

Remix on Vercel

Remix is a fullstack, server-rendered React framework. Its built-in features for nested pages, error boundaries, transitions between loading states, and more, enable developers to create modern web apps.

With Vercel, you can deploy server-rendered Remix and Remix V2 applications to Vercel with zero configuration. When using the Remix Vite plugin, static site generation using SPA mode is also supported.

Vercel Preset, when deploying to Vercel.


Getting started

To get started with Remix on Vercel:

  • If you already have a project with Remix, install Vercel CLI and run the vercel command from your project's root directory
  • Clone one of our Remix example repos to your favorite git provider and deploy it on Vercel with the button below:

Get started in minutes

Remix Boilerplate


Deploy a new Remix project with a template

Hydrogen v2


Hydrogen is Shopify's stack for headless commerce.

Or, choose a template from Vercel's marketplace:

Vercel deployments can integrate with your git providerto generate preview URLsfor each pull request you make to your Remix project.


@vercel/remix

The @vercel/remix package exposes useful types and utilities for Remix apps deployed on Vercel, such as:

To best experience Vercel features such as streaming, Vercel Functions, and more, we recommend importing utilities from @vercel/remix rather than from standard Remix packages such as @remix-run/node.

@vercel/remix should be used anywhere in your code that you normally would import utility functions from the following packages:

yarn

pnpm

When using the Remix Vite plugin (highly recommended), you should configure the Vercel Preset to enable the full feature set that Vercel offers.

npm

pnpm i @vercel/remix

To get started, navigate to the root directory of your Remix project with your terminal and install @vercel/remix with your preferred package manager:

bun

Vercel Vite Preset

To configure the Preset, add the following lines to your vite.config file:

import { vitePlugin as remix } from'@remix-run/dev';


installGlobals();

plugins: [

exportdefaultdefineConfig({

import tsconfigPaths from'vite-tsconfig-paths';

presets: [vercelPreset()],

import { installGlobals } from'@remix-run/node';

}),

],

remix({

tsconfigPaths(),

import { defineConfig } from'vite';

import { vercelPreset } from'@vercel/remix/vite';

Using this Preset enables Vercel-specific functionality such as rendering your Remix application with Vercel Functions.

Server-Side Rendering (SSR)

Server-Side Rendering (SSR) allows you to render pages dynamically on the server. This is useful for pages where the rendered data needs to be unique on every request. For example, checking authentication or looking at the location of an incoming request.

Remix routes defined in app/routes are deployed with server-side rendering by default.

The following example demonstrates a basic route that renders with SSR:

exportdefaultfunctionIndexRoute() {

Vercel Functions execute using Node.js. They enable developers to write functions that use resources that scale up and down based on traffic demands. This prevents them from failing during peak hours, but keeps them from running up high costs during periods of low activity.

TypeScript

);

}

return (

Remix API routes in app/routes are deployed as Vercel Functions by default.

This route is rendered on the server

The following example demonstrates a basic route that renders a page with the heading, "Welcome to Remix with Vercel":

TypeScript

exportdefaultfunctionServerless() {

return

Welcome to Remix with Vercel

;

}


To summarize, Server-Side Rendering (SSR) with Remix on Vercel:

  • Scales to zero when not in use
  • Scales automatically with traffic increases
  • Has framework-aware infrastructure to generate Vercel Functions

Response streaming

Streaming HTTP responses

with Remix on Vercel is supported with Vercel Functions. See the Streaming page in the Remix docs for general instructions.

The following example demonstrates a route that simulates a throttled network by delaying a promise's result, and renders a loading state until the promise is resolved:

import { Await, useLoaderData } from'@remix-run/react';

import { Suspense } from'react';

returnnewPromise((resolve) =>setTimeout(resolve, ms));

functionsleep(ms:number) {
}
constversion=process.versions.node;
}

});

exportasyncfunctionloader({ request }) {

// Don't let the promise resolve for 1 second
returndefer({
TypeScript
const { version } =useLoaderData();

exportdefaultfunctionDeferredRoute() {

return (
}
);

To summarize, Streaming with Remix on Vercel:

  • Offers faster Function response times, improving your app's user experience
  • Allows you to return large amounts of data without exceeding Vercel Function response size limits
  • Allows you to display Instant Loading UI from the server with Remix's defer() and Await

Learn more about Streaming

Cache-Control headers

Vercel's CDN caches your content at the edge to serve data to your users as fast as possible. Static caching works with zero configuration.

By adding a Cache-Control header to responses returned by your Remix routes, you can specify a set of caching rules for both client (browser) requests and server responses. A cache must obey the requirements defined in the Cache-Control header.

Remix supports header modifications with the headers function, which you can export in your routes defined in app/routes.

The following example demonstrates a route that adds Cache Control headers which instruct the route to:

  • Return cached content for requests repeated within 1 second without revalidating the content
  • For requests repeated after 1 second, but before 60 seconds have passed, return the cached content and mark it as stale. The stale content will be revalidated in the background with a fresh value from your loader function

To summarize, using Cache-Control headers with Remix on Vercel:


});

exportasyncfunctionloader() {

'Cache-Control':'s-maxage=1, stale-while-revalidate=59',

// Fetch data necessary to render content

TypeScript

Allow you to serve content from the cache while updating the cache in the background with stale-while-revalidate

exportconstheaders:HeadersFunction= () => ({

Allow you to cache responses for server-rendered Remix apps using Vercel Functions

importtype { HeadersFunction } from'@vercel/remix';

See our docs on cache limits to learn the max size and lifetime of caches stored on Vercel.

Analytics

Vercel's Analytics features enable you to visualize and monitor your application's performance over time. The Analytics section in your project's dashboard offers detailed insights into your website's visitors, with metrics like top pages, top referrers, and user demographics.

To use Analytics, navigate to the Analytics section in your project dashboard sidebar on Vercel and select Enable in the modal that appears.

To track visitors and page views, we recommend first installing our @vercel/analytics package by running the terminal command below in the root directory of your Remix project:

pnpm i @vercel/analytics

Add the following component to your root file:


return (

);

TypeScript

import { Analytics } from'@vercel/analytics/react';

}

exportdefaultfunctionApp() {

To summarize, Analytics with Remix on Vercel:

  • Enables you to track traffic and see your top-performing pages
  • Offers you detailed breakdowns of visitor demographics, including their OS, browser, geolocation and more

Learn more about Analytics

Using a custom app/entry.server file

By default, Vercel supplies an implementation of the entry.server file which is configured for streaming to work with Vercel Functions. This version will be used when no entry.server file is found in the project, or when the existing entry.server file has not been modified from the base Remix template.

However, if your application requires a customized app/entry.server.jsx or app/entry.server.tsx file (for example, to wrap the component with a React context), you should base it off of this template:

Our Services

import { RemixServer } from'@remix-run/react';

Digital Marketing

import { handleRequest,type EntryContext } from'@vercel/remix';

exportdefaultasyncfunction (
request,
responseStatusCode:number,
TypeScript

) {

let remixServer = ;

responseHeaders:Headers,
request:Request,
remixContext:EntryContext,

responseHeaders,

);

}
responseStatusCode,
returnhandleRequest(
remixServer,

Using a custom server file

It's usually not necessary to define a custom server.js file within your Remix application when deploying to Vercel. In general, we do not recommend it.

If your project requires a custom server file, you will need to install @vercel/remix and import createRequestHandler from @vercel/remix/server. The following example demonstrates a basic server.js file:


build,

mode:process.env.NODE_ENV,

getLoadContext() {

TypeScript

import { createRequestHandler } from'@vercel/remix/server';

};

},

return {

nodeLoadContext:true,

exportdefaultcreateRequestHandler({

import*as build from'@remix-run/dev/server-build';

More resources

Last updated September 16, 2026

Learn more about deploying Remix projects on Vercel with the following resources:

TanStack Start

See our Frameworks documentation page to learn about the benefits available to all frameworks when you deploy on Vercel.

Cross-link map: Remix on Vercel (/docs/frameworks/full-stack/remix)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesRemix without limits (historical)React Router on Vercel — Deploy React Router applications with SSR or SPA mode, then configure the Vercel preset, streaming, caching, and analytiSupport for Remix with ViteFull-stack frameworks on Vercel — Vercel supports a wide range of the most popular backend frameworks, optimizing how your application builds and runs noCreate React App on Vercel — Deploy Create React App projects to Vercel and add Preview Deployments, Web Analytics, Speed Insights, and ObservabilityThis page links to (5)Vercel Web Analytics — With Web Analytics, you can get detailed insights into your website's visitors with new metrics like top pages, top refeVercel CDN overview — Vercel's CDN is a globally distributed platform that handles routing, caching, security, and compression for every deploVercel CLI Overview — Learn how to use the Vercel command-line interface \(CLI\) to manage and configure your Vercel Projects from the commandFrameworks on Vercel — Vercel supports a wide range of the most popular frameworks, optimizing how your application builds and runs no matter wStreaming — Learn how to stream responses from Vercel Functions.Pages that link here (1)By site: vercel-docs (1)Full-stack frameworks on Vercel — Vercel supports a wide range of the most popular backend frameworks, optimizing how your application builds and runs no

Was this helpful?