# Deploy Fastify on Light Cloud

> Fastify is a fast, low-overhead web framework for Node.js. Light Cloud detects it from fastify in the dependencies of package.json. It runs as a container that scales with traffic and down to zero when idle.

## Fastify at a glance

- **Detected from:** `fastify` in the `dependencies` of `package.json`
- **Runs as:** Container that scales with traffic and to zero when idle
- **Node.js:** Node 22, 24 or 26 (default 24), read from `.nvmrc`, `.node-version` or `engines.node`. Static builds run on Node 22.
- **Start command:** Your `start` script, run with the package manager from the lockfile (npm, yarn or pnpm)
- **Port:** 3000

## How to deploy Fastify

1. **Bring the code.** Pick a repository, upload a folder, or ask Claude Code or GitHub Copilot to put it online.
2. **Fastify, detected.** The files are read and the build is filled in. Every setting can be changed by hand.
3. **Built into a container.** An image is built and started, listening on the port the app expects.
4. **Live.** A light-cloud.io URL in minutes, a preview URL for every branch, and logs and metrics beside it.

## More on Node.js

- [Node.js](https://light-cloud.com/runtimes/nodejs): Node 22, 24 or 26
- [Next.js](https://light-cloud.com/frameworks/nextjs): React, server-rendered
- [React](https://light-cloud.com/frameworks/react): Single-page apps
- [Vue](https://light-cloud.com/frameworks/vue): Single-page apps
- [Astro](https://light-cloud.com/frameworks/astro): Content sites
- [Nuxt](https://light-cloud.com/frameworks/nuxt): Vue, server-rendered
- [SvelteKit](https://light-cloud.com/frameworks/sveltekit): Svelte, full-stack
- [Express](https://light-cloud.com/frameworks/express): Minimal Node APIs
- [NestJS](https://light-cloud.com/frameworks/nestjs): Structured Node backends
- [Angular](https://light-cloud.com/frameworks/angular): Single-page apps
- [Svelte](https://light-cloud.com/frameworks/svelte): Compiled UI
- [SolidJS](https://light-cloud.com/frameworks/solidjs): Fine-grained reactive UI
- [Qwik](https://light-cloud.com/frameworks/qwik): Resumable apps
- [Remix](https://light-cloud.com/frameworks/remix): React, full-stack
- [Gatsby](https://light-cloud.com/frameworks/gatsby): Static React sites
- [Docusaurus](https://light-cloud.com/frameworks/docusaurus): Documentation sites
- [Eleventy](https://light-cloud.com/frameworks/eleventy): Static site generator
- [Hono](https://light-cloud.com/frameworks/hono): Small web APIs
- [AdonisJS](https://light-cloud.com/frameworks/adonisjs): Full-featured Node MVC

## Add a database

- [PostgreSQL](https://light-cloud.com/databases/postgresql): Shared or dedicated

## Questions

### How do I deploy Fastify?

Connect the repository, upload the folder, or ask Claude Code or GitHub Copilot to deploy it. Light Cloud reads the files, builds Fastify and returns a live URL in minutes, with a preview URL for every branch.

### How much does it cost to host Fastify?

The Free plan runs up to 3 server apps with $1 of usage a month and no card. A container is billed by the hour only while it runs, so an idle app costs nothing and a quiet one uses about $0.10 a month. Paid plans start at $5 a month with $5 of usage included.

### Can a Fastify app use a database?

Yes. Create a PostgreSQL database in the same project and set its connection string as DATABASE_URL. Databases come with paid plans, from $5 a month.

### Can I use my own Dockerfile instead?

Yes. A Dockerfile at the root of the repository always wins over detection: it is built as is and runs as a container.

Docs: https://docs.light-cloud.com/platform/frameworks/fastify
Page: https://light-cloud.com/frameworks/fastify
Deploy Fastify: https://console.light-cloud.com/new?repo=https://github.com/light-cloud-templates/fastify-api-starter
Start free, no card: https://console.light-cloud.com/signup
