---
title: Does Vercel support Ruby on Rails applications?
description: Learn how to deploy a Ruby on Rails application on Vercel — either as a container image on Vercel Functions or as a headless backend API with a modern frontend.
url: "https://vercel.com/kb/guide/does-vercel-support-ruby-on-rails-applications"
published: 2025-11-03
last_updated: 2026-10-02
authors: Lee Robinson
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

Vercel supports Ruby on Rails applications in two ways: you can deploy your existing Rails HTTP server as a container image on Vercel Functions, or you can run Rails as a headless backend API with a modern frontend on Vercel.

## Pattern 1: Deploy a Rails server as a container image

Vercel Functions support deploying any HTTP server — including a full Rails application — from a [\`Dockerfile.vercel\` or \`Containerfile.vercel\`](/docs/functions/container-images). This means you can bring your existing Rails app to Vercel without restructuring it as a headless API.

To get started:

1. Add a `Dockerfile.vercel` (or `Containerfile.vercel`) to the root of your project.
   
2. Configure your Rails server to listen on `$PORT` (the default is `80`).
   
3. Push to your connected Git repository — Vercel builds the image, stores it in the Vercel Container Registry, and deploys it on [Fluid compute](https://vercel.com/changelog/bring-your-dockerfile-to-vercel-functions) with autoscaling and Active CPU pricing.
   

Every git push produces a preview deployment automatically.

See the [container images documentation](/docs/functions/container-images) and the [changelog announcement](https://vercel.com/changelog/bring-your-dockerfile-to-vercel-functions) for full details.

## Pattern 2: Rails as a headless backend API

Vercel also supports using your Ruby on Rails application as an API for a modern frontend deployed on Vercel. Developers often want to keep Rails for backend logic and APIs while adopting React or another modern framework for their UI — a headless architecture makes this possible.

With this approach, your Rails application stays in place as the backend, and your frontend on Vercel connects to it with zero-configuration support for [35+ frontend frameworks](https://vercel.com/templates).

> **NOTE:** The Ruby runtime is available in [Beta](https://vercel.com/docs/release-phases#beta) on all plans.

### Benefits of decoupling

Vercel helps you build and deploy the fastest frontends for your Rails applications. You can deploy your site with zero configuration to the best [frontend infrastructure](https://vercel.com/features/infrastructure).

- **Develop:** Connect to your favorite APIs, databases, and content management systems.
  
- **Preview:** Integrate with any GitHub, GitLab, or Bitbucket repository for [instant continuous deployment](https://vercel.com/features/previews).
  
- **Ship:** Deploy your site to every edge node worldwide for the fastest sites. Static files, Vercel Functions, the CDN, [and more](https://vercel.com/features/infrastructure).
  

Further, by moving to a modern frontend framework like [Next.js](https://vercel.com/solutions/nextjs), you can reduce the load on your backend through [Incremental Static Regeneration](https://vercel.com/blog/how-hashicorp-developers-iterate-faster-with-isr), saving you money on server-side compute.

### Migrating to Vercel

You can migrate your existing domain and DNS to Vercel [with zero downtime](https://vercel.com/guides/zero-downtime-migration-for-dns).

Vercel has been designed for incremental adoption. You can continue using your existing Ruby on Rails frontend and take over new pages on Vercel as needed. By starting small and incrementally adding more pages, you can prevent derailing feature work by avoiding a complete rewrite.

1. The first strategy is to configure your server or proxy such that everything under a specific subpath points to Vercel. For example, your existing website might be at `example.com`, and you might configure your proxy such that `example.com/store` serves your new frontend on Vercel.
   
2. The second strategy is to create your new frontend on Vercel which points to the root URL of your domain. Then, you can use [rewrites](https://vercel.com/docs/project-configuration#project-configuration/rewrites) to have some subpaths proxied to your existing app.
   

If you are using Next.js, learn about [incrementally adopting Next.js](https://nextjs.org/docs/migrating/incremental-adoption) for more details.

## More Next.js guides

- [How do I reduce my build time with Next.js on Vercel?](/kb/guide/how-do-i-reduce-my-build-time-with-next-js-on-vercel): Reduce Next.js build times on Vercel by pre-rendering fewer pages at build time, deferring generation with ISR and image optimization, and using faster build machines.
- [Integrating AWS Secrets Manager with Vercel Using Terraform](/kb/guide/integrating_aws_secrets_manager_with_vercel_using_terraform): Learn how to seamlessly integrate AWS Secrets Manager with Vercel for enhanced security and efficiency in your web deployments using Terraform with our comprehensive guide.
- [Can I redirect from a subdomain to a subpath?](/kb/guide/can-i-redirect-from-a-subdomain-to-a-subpath): Learn how to redirect from your subdomain to a subpath on Vercel with a vercel.json file or with Next.js