# Deploy Remix 2 on forkrail

> Deploy Remix 2 Vite projects with streaming loaders and actions, `vercelPreset()` route bundles, `vercel.json` routing, and CDN response caching in your AWS account.

- Framework: Remix
- Category: Websites & full-stack
- Status: Production ready
- Adapter / Preset: Vite plugin + optional vercelPreset() from @vercel/remix
- Runtime: Node.js 24 (arm64)
- Detection: package.json (@remix-run/dev)
- Memory: 1,024 MB recommended for SSR
- URL: https://www.forkrail.com/frameworks/remix

## Capabilities

| Capability | Support | Details |
| --- | --- | --- |
| Streaming SSR | Supported | Full Remix 2 Vite loaders, actions, and deferred streams |
| CDN caching | Supported | Route headers with s-maxage / CDN-Cache-Control cached at router |
| Routing middleware | Supported | Root middleware.ts and vercel.json redirects/rewrites |
| Classic compiler | Not supported | Requires Remix Vite plugin (classic remix.config.js not supported) |

## 1. Remix Vite configuration

forkrail packages Remix 2 Vite builds directly without modifying your app code. Add `vercelPreset()` from `@vercel/remix` if you split routes by `maxDuration` or `memory`:

**vite.config.ts**

```ts
import { vitePlugin as remix } from '@remix-run/dev'
import { vercelPreset } from '@vercel/remix/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    remix({
      presets: [vercelPreset()],
    }),
  ],
})
```

## 2. Deploy to preview or production

**Deploy with forkrail CLI**

```bash
forkrail project my-remix-app --memory 1024
forkrail deploy
forkrail deploy --prod
```

> **Vite required & Node runtime:** Classic Remix projects using `remix.config.js` without Vite, and routes specifying `runtime: 'edge'`, are refused at build time. Migrate to the Remix Vite plugin and run routes on Node 24.

## Related documentation

- [Deployments & rollbacks](https://www.forkrail.com/docs/deployments-and-rollbacks.md)
- [Redirects, rewrites & headers](https://www.forkrail.com/docs/routing.md)
- [Environment variables](https://www.forkrail.com/docs/environment-variables.md)
