# Deploy Remix

Remix is detected from its dependencies and config, and runs as a Node.js container on port `3000`. The [generated image](/platform/deployments/builds#dockerfiles-generated-or-your-own) builds the app and runs `remix-serve` (or your `start` script) on Node 22; a repo with its own server file or Dockerfile is used as written.

## How it runs

Remix is a server-rendered frontend, so it runs under [the SSR policy](/create/scaling#the-ssr-policy): pinned to the **Micro** size, scaling 0-3, in a tier-1 region, always behind the edge CDN. Loaders and actions execute on the origin; the edge serves what can be cached.

- **Build.** `npm run build` produces the server and client bundles.
- **Port.** `remix-serve` and the common Express setups respect `PORT`, which is set for you.

## Configuration

Loaders and actions read [environment variables](/platform/environment-variables) from `process.env` at runtime, per environment. Anything that must reach the browser goes through a loader - Remix has no build-time public prefix, which fits the container rule: images are [built without your runtime variables](/platform/deployments/builds#environment-variables-at-build-time).

## Database

Provision [managed PostgreSQL or MySQL](/platform/databases) and read `DATABASE_URL` in your loaders' data layer. See [Connect an app](/platform/databases/connect).

## Related

- [Frameworks](/platform/frameworks): Everything supported and how detection works.
- [Scaling](/create/scaling): The SSR policy and scale to zero.
- [Builds](/platform/deployments/builds): What the generated image does with your code.
