# Deploy Deno

> Deploy Deno 2 apps with Falak — deno.json detection, dependency install on the builder, a supervised deno task start, and Deno installed on demand.

Source: https://falak.sh/docs/deploy/deno/

Falak deploys Deno apps from a repository with a `deno.json` or `deno.jsonc`. Deno is installed on each server the first time a Deno site targets it.

## Prerequisites

- A server of type **app**, **web** or **worker**.
- `deno.json` (or `deno.jsonc`) with a **`start` task**.
- Your app listens on `Deno.env.get("PORT")`.

```ts title="main.ts"
const port = Number(Deno.env.get('PORT') ?? 8000);
const hostname = Deno.env.get('HOST') ?? '127.0.0.1';

Deno.serve({ port, hostname }, () => new Response('Hello from Deno on Falak'));
```

```json title="deno.json"
{
  "tasks": {
    "start": "deno run --allow-net --allow-env main.ts"
  }
}
```

## Deploy

1. **+ Create → Git repository**, pick the repository.
2. Choose the **Generic Node** preset and set the runtime to **Deno**.
3. Pick servers and a domain, then **Deploy**.

## How it runs

| Aspect | Value |
|---|---|
| Deno version | 2.9.7 (`FALAK_DENO_VERSION`), official release binaries |
| Detection | `deno.json` / `deno.jsonc` in the repository root (comments and trailing commas allowed) |
| Build | `deno install` (`--frozen` when `deno.lock` exists), then `deno task build` if defined |
| Web process | `deno task start` in the current release |
| Environment | Site variables + `PORT`, `HOST=127.0.0.1` |

## Limits

- Deno at runtime is covered by unit and feature tests but **not yet by Falak's end-to-end test suite**. Report issues you hit.
- `Deno.serve` is not auto-instrumented; use `withFalakRequest` from `@falak/apm-node`. See [APM for Node, Bun and Deno](/docs/observability/apm-node/).

## Next steps
