You can deploy your Astro project to Fly.io, a platform for running full stack apps and databases close to your users.
Project Configuration
Section titled “Project Configuration”Your Astro project can be deployed to Fly.io as a static site, or as a server-side rendered site (SSR).
Static Site
Section titled “Static Site”Your Astro project is a static site by default. You don’t need any extra configuration to deploy a static Astro site to Fly.io.
Adapter for SSR
Section titled “Adapter for SSR”To enable on-demand rendering in your Astro project and deploy on Fly.io, add the Node.js adapter.
How to deploy
Section titled “How to deploy”Generating your Astro Dockerfile
Section titled “Generating your Astro Dockerfile”If you don’t already have a Dockerfile, fly launch will generate one for you, as well as prepare a fly.toml file. For pages rendered on demand, this Dockerfile will include the appropriate start command and environment variables.
You can instead create your own Dockerfile using Dockerfile generator and then run using the command npx dockerfile for Node applications or bunx dockerfile for Bun applications.
Official Resources
Section titled “Official Resources”- Check out the official Fly.io docs