Deploy a Remix Application

Getting an application running on Fly is essentially working out how to package it as a deployable image. Once packaged it can be deployed to the Fly infrastructure to run on the global application platform.

In this guide we'll learn how to deploy a Remix application on Fly.

We'll be using the standard web application generated by Remix. This is a bare-bones app with no database. If you're feeling ambitious, check out the Remix tutorial for building and deploying an SQLite-backed app on Fly.io.

Generate the Remix app

If you just want to see how Fly deployment works, follow these steps.

We'll assume you have NodeJS installed already and can run npm. We recommend using npm over yarn, as npm is what Remix references in their documentation.

First, install flyctl, your Fly app command center, and sign up to Fly if you haven't already.

Now let's generate a shiny, new Remix app.

When asked where you want to deploy, pick Fly.io.

npx create-remix@latest
R E M I X

💿 Welcome to Remix! Let's get you set up with a new project.

? Where would you like to create your app? ./hello-remix
? Where do you want to deploy? Fly.io
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes
...

cd hello-remix
fly launch
Creating app in /Users/me/hello-remix
Scanning source code
Detected a Remix app
? App Name (leave blank to use an auto-generated name): hello-remix
? Select organization: flyio (flyio)
? Select region: mad (Madrid, Spain)
Created app hello-remix in organization soupedup
? Would you like to deploy now? Yes
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Remote builder fly-builder-little-glitter-8329 ready
...
1 desired, 1 placed, 1 healthy, 0 unhealthy [health checks: 2 total, 2 passing]
--> v0 deployed successfully

That's it! Run fly open to see your deployed app in action.

Try a few other commands:

  • fly logs - Tail your application logs
  • fly status - App deployment details
  • fly deploy - Deploy the application after making changes