---
title: What the deploy zip holds
description: Learn what a deploy's zip contains, what the turnzero command leaves out, how the image build installs it, and the limits a deploy checks.
slug: /concepts/what-the-deploy-zip-holds
order: 4
visibility: public
redirects_from: []
---

# What the deploy zip holds

The [turnzero CLI](/cloud/concepts/turnzero-command/) builds a deployment ZIP from your application folder. A server ZIP needs `package.json` at its root. Turn Zero Cloud builds its image and runs `npm start` on Node.js 24. A serverless ZIP can omit `package.json` and a start script.

Run `turnzero hash --origin https://dev.turnzero.ai --list` in the application folder to preview every file in the ZIP ([What the command leaves out](#what-the-command-leaves-out)).

## What the zip contains

The zip contains:

- for a server, Node.js code that listens on `PORT`; for serverless functions, the files under `functions/`;
- any built [web client](/cloud/guides/serve-a-web-client/) files under `client/`, which follow the app's audience rules;
- the `migrations/` folder, where the application has a database;
- the `lib/` folder with the library packages the application declares as `file:` dependencies;
- an optional `manifest.json` copy. Deployment uses the manifest previously recorded by `submit_manifest`. If the ZIP's copy differs, `manifest_notice` lists the fields that differ and says the recorded manifest will be used. The comparison skips `application`. The notice also lists each `lib/<name>/package.json` whose `turnzero.entry` and `version` match no entry of the recorded `packages`, and each the deploy left unread or could not compare, even without `manifest.json` in the zip. A `manifest.json` copy larger than 1 MiB or nested deeper than 64 levels is refused (below);
- the package manifests, `package.json` and its lockfile, where there is one.

When you deploy a folder, the command takes all its files except the ones described below. That includes a README, build output, and tests such as `test/me.test.mjs`. For a server, the build copies those files into its image. Including a test file does not run it.

A server build makes an ordinary file executable when its Unix ZIP entry records an execute bit. Hosted functions receive shipped files without execute permission and cannot start child processes. Use a server if your application needs to run a shipped program. At server startup, use `chmod` before running a program that lacks execute permission. That includes programs in ZIPs made by the current `turnzero` command.

For a server, the ZIP's root is the folder containing `package.json`. Where there is anything to install, the image build runs `npm install --omit=dev` there and links the copied library packages among the dependencies. It then runs `npm start`, so the `start` script is the entry point.

A lockfile is optional, for `turnzero deploy --origin https://dev.turnzero.ai` and `deploy_files` alike. Where the zip holds `package-lock.json`, the install takes the versions it records wherever they still meet the ranges in `package.json`. Without one, the install resolves each dependency from its range in `package.json` at each build, so two deploys can install different versions. The build can skip installation when there are no runtime dependencies or workspaces and no other npm checks to perform; see [What the image build installs](#what-the-image-build-installs).

A missing lockfile does not prevent deployment. The `deploy_files` response asks you to include the folder's `package-lock.json` if it exists. Where `package.json` declares something to install and no lockfile was sent, the answer says the deploy still works but each build resolves the ranges again. A tool with no shell cannot make the lockfile; it can pin its direct dependencies by writing exact versions, such as `"1.3.0"` in place of `"^1.3.0"`, in `package.json`.

The `engines` field in `package.json` does not select the runtime. A deployed server runs on Node.js 24 whether you deploy through the CLI or MCP ([What the application runs under](/cloud/concepts/the-settings-a-deployed-copy-receives/#what-the-application-runs-under)). Hosted functions run on the Deno-based Supabase Edge Runtime ([Deploy functions](/cloud/guides/deploy-functions/)).

## What the command leaves out

The command leaves out every `node_modules` and `.git` entry and every `.env` and `.env.*` file, wherever it stands and whatever the case of its name. So dependencies and environment files stay on your machine. Apart from the AI coding agents' files and the `.deployignore` paths below, it leaves out nothing else, because a file left out may be one your code loads at run time. It refuses a symbolic link by name.

To leave a file out, add `.deployignore` at the root of the folder you deploy. Use one `.gitignore`-style rule per line. For example, `/test/me.test.mjs` leaves out that one file at the stated path. Use `/test/` instead to leave out the root's whole `test` folder. The command keeps root `package.json` and `manifest.json` if they exist. It reads only the root ignore files. It uses `.gitignore` only to report which included files it matches, since Git often ignores the build output a deploy needs.

`deploy_files` builds the zip from the files your AI assistant names alone, leaving out the same names as the command, so it never asks for a file the command always leaves out. It reads no `.deployignore`: your AI assistant sends only the files it means to deploy.

`deploy_files` puts each file in the zip as the platform received it, changing no byte: a file's text, or the bytes a base64 file decodes to. A `sha256` your AI assistant computes matches only where its copy holds the same bytes. Line endings, a trailing newline, or a byte-order mark most often make the two differ.

A value your code reads from a `.env` file reaches a deployed copy another way. A secret is stored with `store_secret` and bound in the manifest's `settings`. A value that is not secret, such as a page title, goes in the manifest's `settings` as `{"value": "<text>"}` ([Bound settings](/cloud/concepts/the-manifest/#bound-settings)).

The CLI also excludes the AI coding agents' own files and folders: `.claude`, `.mcp.json`, `.codex`, `.cursor`, `.gemini`, `.continue`, `.roo`, `.kiro`, `.amazonq`, and `.aider.conf.yml`. These files can contain AI-tool credentials.

Run `turnzero hash --origin https://dev.turnzero.ai --list` from the deploy folder. It lists each file with its size, names the exclusions, and uploads nothing. Rerun it after changing `.deployignore`. Read any warnings about credentials or a ZIP at the root. Keep ZIPs outside the deploy folder. `turnzero deploy --origin https://dev.turnzero.ai --path` uploads a ZIP you supply as it is. [What it prints](/cloud/concepts/what-the-turnzero-command-reads-and-prints/#what-it-prints) explains the output. The [storage upload route](/cloud/getting-started/ways-to-deploy/#upload-a-zip-without-the-turnzero-command) also uses the ZIP you supply. Check its contents and leave out credentials before uploading.

## The two project layouts

Run the deployment command from the application folder. If the application has `package.json`, use the folder that contains it. For a static site without `package.json`, use the folder that contains `client/`.

The layouts below show where `package.json` sits when you use library packages.

- **With an `app/` folder.** Where the application sits in `app/` beside the project's library folder, `system/`, run the command's lines in `app/`, so the zip contains the contents of `app/` alone and leaves `system/` out.
- **With no `app/` folder.** If `system/` sits beside the root `package.json`, it is included in the ZIP. The image build installs from `package.json` and the copies under `lib/`, never from `system/`.

Either way, the zip includes the application's own copy of each package under `lib/`, which `package.json` declares as a `file:` dependency ([Use the feature package library](/cloud/guides/use-the-library/)).

In this [database-backed service](/cloud/getting-started/build-a-database-backed-service/#1-lay-out-the-project), run the command from `app/`. Its contents become the ZIP's root:

```text
notes-service/
  system/                      the library entries as taken, never zipped
  app/                         the zip's root
    package.json
    package-lock.json
    manifest.json
    .gitignore
    AGENTS.md
    migrations/0001_notes.sql
    src/db.mjs
    src/server.mjs
    src/main.mjs
    test/notes.test.mjs
    lib/database/              the package's package.json and lib/, copied from system/
```

## Names and limits

Every entry of the zip is a relative path inside its root, with `/` between its segments, and extraction creates a folder for each directory entry, such as one added by `zip -r`. A deploy refuses an entry that is absolute, contains a backslash or a NUL, names a drive, or leaves the root through `..`, since the image build cannot write it.

A deploy also refuses a zip that uses the same path for both a file and a folder. It refuses an entry name longer than 4,096 bytes or with more than 128 segments in its path. Each is refused `artifact_layout_invalid`, with a detail naming the entry, and for a backslash a pointer to the `tar.exe` command of [step 3 (Build and upload the artifact) of Deploy from your computer](/cloud/getting-started/deploy-an-application/#3-build-and-upload-the-artifact).

A zip is also refused with `artifact_layout_invalid` if it has more than 65,535 entries, or its entry names have more than 500,000 path segments in total.

The ZIP upload has a 32 MiB limit (33,554,432 bytes) on Turn Zero Cloud. It counts the bytes of the finished ZIP. The upload grant can set a smaller limit. An upload past either limit is refused with HTTP 413 `request_too_large`.

The image build separately admits at most 128 MiB of declared entry data. Count the larger of each entry's compressed and uncompressed sizes, including folder entries. A root `manifest.json` deeper than 64 levels also gives `artifact_layout_invalid`. The detail names the bound.

Bytes that are not a zip are refused `artifact_unreadable`. A root `package.json` or `manifest.json` larger than 1 MiB is refused `artifact_layout_invalid`. A server ZIP also needs a root `package.json` that parses as a JSON object, plus a `start` script or root `server.js`. If the detail names an enclosing folder, zip that folder's contents. A serverless ZIP needs at least one file under root `client/` or `functions/`. It can omit `package.json`, the start script and `server.js`.

A web client's files have bounds of their own, after the zip's. A zip whose `client/` folder holds more than 2,000 files the platform serves, one over 25 MiB, or more than 50 MiB together is refused `artifact_layout_invalid`. The detail names the bound. A name the platform does not serve, such as `.DS_Store`, is skipped and counts toward none ([Serve a web client](/cloud/guides/serve-a-web-client/#3-keep-names-and-sizes-within-the-limits)).

A zip whose root `package.json` or `manifest.json`, or a nested `package.json` the deploy reads, inflates past the size its entry declares is refused `artifact_unreadable` too. The image build stops at any entry that does, naming it.

The deploy reads the zip before it adds a version, so none of these refusals counts against the day's deploys. Windows PowerShell's `Compress-Archive` writes `\` between segments, which these rules refuse, so a zip you build yourself on Windows comes from `tar.exe`.

## What the image build installs

The image build installs runtime dependencies with `npm install --omit=dev`. It excludes development dependencies even if `.npmrc` says otherwise. Other npm settings, such as a private registry, still apply.

The image build removes the install scripts, such as `postinstall` and `prepare`, from the root `package.json`. It also removes them from the `package.json` of each folder matched by `workspaces` in the root file. The image contains those copies. Every other dependency runs its own install scripts as npm runs them, a `lib/` package declared as a `file:` dependency among them. The shell those scripts run under is the build's own.

A `workspaces` pattern may use literal segments, `*` within a segment, and `**` segments, plus `!` patterns that exclude folders. Put the `!` patterns after all the other patterns. An exclusion pattern must not match the text of a positive pattern. A `*` never matches a folder name's leading `.`, and a `**` never passes through a folder whose name opens with `.`, so `packages/*` and `**` skip `.cache`. A segment that spells the dot itself, such as `.c*`, still matches it.

A deploy refuses any other pattern by name, such as one using `?`, braces, brackets, parentheses, a backslash, a leading `#`, more than one leading `!`, or a `..` segment. It also refuses a pattern longer than 4,096 bytes or deeper than 128 segments, the bound on an entry's name, and more than 256 patterns or 5,000,000 matching steps.

The image build skips `npm install` where it would install and run nothing: `package.json` declares no dependencies other than `devDependencies`, and no workspaces. The skip also needs a zip root containing no `node_modules` or `.npmrc`, and a `package.json` with no `os`, `cpu`, `libc`, or `devEngines` field, which npm's install checks. Its `scripts`, where present, must be an object. A skipped install changes nothing else: the image still starts with `npm start`.

### Native modules

Native modules in the root or a workspace member must ship prebuilt; the image build does not run their `binding.gyp` files. A deploy refuses one that ships no `.node` file, as `artifact_layout_invalid`, naming the first such entry. A native module in the root ships its `.node` file anywhere in the zip outside `node_modules` and the workspace members' folders. A native module in a workspace member ships its `.node` file in that member's folder, excluding any nested workspace member's folder. A `lib/` package's `binding.gyp` builds on the platform's Linux builders, as npm builds it.

Build the `.node` file your app loads for Linux x64 with glibc. The ZIP check looks for the file. The image build separately tries to load native modules selected for its runtime.

### The notices a deploy returns

A deploy returns `artifact_notice`, listing each install script and `binding.gyp` of the root's or a workspace member's that the build will not run or rebuild. The deploy reads a `package.json` below the root only up to 64 KiB, and at most 50 of them. The notice lists any workspace `package.json` it did not read. The image build still removes install scripts from those files. Where one builds something your application needs, run it locally and ship its output in the zip.

For serverless apps, `deploy_files` can return `artifact_notice` on a deploy or with `check_only: true`. It flags a literal relative import or export whose target is missing from the function source selected from the ZIP. The notice is advisory.

A deploy returns `client_notice` where `client/` holds a file beyond the page's shell, `index.html`, `app.js`, and `styles.css`, or a name the platform skips. It counts the files the platform will serve, and names up to twenty beyond the shell. It then names up to twenty skipped files, and counts the rest of each list.

Visitors who meet the app's audience rules can fetch the files the notice says it will serve. For invited or workforce apps, visitors must sign in unless the path is session-free. Read the notice after each deploy ([Serve a web client](/cloud/guides/serve-a-web-client/)).

Notices do not block deployment. See `manifest_notice` under [What the zip contains](#what-the-zip-contains).

## Related

- [Deploy from your computer](/cloud/getting-started/deploy-an-application/) runs the deploy that sends this zip, and its step 3 gives the `tar.exe` line for a zip you build on Windows.
- [The turnzero command](/cloud/concepts/turnzero-command/) builds the zip and prints what it left out.
- [Use the feature package library](/cloud/guides/use-the-library/) copies a library package into `lib/` and declares it.
- [Serve a web client](/cloud/guides/serve-a-web-client/) says which files a web client ships in the zip.
- [A deployed app's settings](/cloud/concepts/the-settings-a-deployed-copy-receives/) describes the image the zip runs on.
- [Deploys](/cloud/troubleshooting/deploys/) starts from a refused or failed deploy.
