---
title: "How to Deploy a Nest Application | Hostman Docs"
description: "Deploy your Google Nest apps on Hostman’s cloud platform with ease. Benefit from robust support to create smart home applications."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

App Platform supports three runtimes for Nest applications: **Node.js**, **Bun**, and **Deno**. Each runtime has its own package manager, build command, start command, and config file.

> [!NOTE]
> You can find the step-by-step deployment guide [here](https://hostman.com/docs/app-platform/backend-apps/).

## Application Build

### Node.js

Hostman uses the following environment when building a Nest application:

-   Node.js: 20, 22, or 24
-   npm
-   yarn

The application is built in the repository root or in the directory specified in the **Project directory path** field.

If the project has a `package.json` file and uses `yarn`, we will run:

```shell
apt remove -y cmdtest yarn
npm install --global yarn
cd /<DIRECTORY> && yarn install --check-files
```

In all other cases, if the a `package.json` file is present:

```shell
cd /<DIRECTORY> && npm install
```

`<DIRECTORY>` is the path to the directory with `package.json`. 

The default start command is:

```
npm run start:prod
```

Make sure that the `start:prod` command is defined in the `scripts` section of your `package.json`. For example:

```shell
"scripts": {
  "start:prod": "node dist/main.js"
}
```

### Deno

App Platform builds your app in the repository root, or in the directory you specify in the **Project directory path** field. The following Deno versions are available:

-   2.7.14
-   2.7.10
-   2.6.0

Deno apps don't require a separate build step. App Platform runs your app directly inside a Deno container, so `deno compile` isn't used in a typical deployment.

App Platform uses the following command to start your app:

```shell
deno run --allow-net --allow-env --allow-read --allow-sys --allow-ffi main.ts
```

Alternatively, the start command can be defined as a task:

```shell
deno task start
```

When App Platform runs `deno task start`, Deno executes the `start` task defined in `deno.json`. Define it like this:

```ts
"tasks": {
  "start": "deno run --allow-net --allow-env --allow-read --allow-sys --allow-ffi main.ts"
}
```

This example assumes your app entry point is `main.ts`. Update the path if your project uses a different file.

#### Permissions

Deno requires you to declare exactly which permissions your app needs. Pass the relevant flags when running your app:

-   `--allow-net`: outbound network requests
-   `--allow-read`: read access to the filesystem
-   `--allow-write`: write access to the filesystem
-   `--allow-env`: access to environment variables
-   `--allow-run`: spawn subprocesses
-   `--allow-ffi`: load native (FFI) libraries
-   `--allow-hrtime`: high-resolution timers
-   `--allow-sys`: read system info (OS, CPU, etc.)
-   `--allow-all` or `-A`: grant all permissions at once
-   `--watch`: restart the app automatically when files change

For example, if your app makes network requests, reads environment variables, and accesses the filesystem:

```shell
deno run --allow-net --allow-env --allow-read src/index.ts
```

### Bun

App Platform builds your app in the repository root, or in the directory you specify in the **Project directory path** field. Bun is used as both the package manager and runtime.

To build your app, App Platform runs:

```shell
bun build
```

To start your app, App Platform runs:

```shell
bun run start
```

This executes the start script defined in your `package.json`. Point it to your app's entry file:

```ts
"scripts": {
  "start": "bun run src/main.ts"
}
```

This example assumes your app entry point is `src/main.ts`. Update the path if your project uses a different file.

## Troubleshooting

### Deployment fails

If there are problems with deployment, first check the deployment log. You will be able to determine at what point something went wrong.

Often the problems are related to the start command. Make sure that all modules required to run the application are present in the `package.json` file.

### Please add build instructions to your script section in package.json

The problem is that the Node.js `npm run build` command accesses the `package.json` file, and if the value of the `build` directive is not specified, an error occurs.

To fix this, you need to add the necessary directives to the `scripts` section of the `package.json` file. Read more about using `scripts` [here](https://docs.npmjs.com/cli/v10/using-npm/scripts).
