Runtime
What runs when nesly deploys your project, and where each part comes from.
When a project is deployed, the platform resolves one answer to the question "what will run": the processes, the port, the health check, the release command, the environment variables, the generated secrets, memory and CPU, and the addons the code needs. Every part says where it came from. See it before you deploy:
nesly app show # what will run, and the source of every part
nesly app show --json # the same, for scripts and AI agents
nesly app validate # check nesly.toml offline (--strict: unknown keys are errors)
nesly app show --deployment live # what the live deployment runs, as it was at its rollout
nesly app plan # which parts of what runs a deploy of this directory would change
nesly app accept start # take a value the platform proposed (app reject refuses it)Variables appear by name only: no command on this page prints a value. Exit codes: 0 resolved (or valid), 1 could not be resolved (or invalid), 2 a mistyped command. With app plan --detailed-exit-code, 2 means a deploy would change something and 0 that it would not.
Precedence
One order, the same for every field. The first source that says something wins:
- nesly.toml — The file in your repository. Reviewed with the code, it wins on every deploy.
- Your settings — What you set with the CLI (nesly build set …), the API or the console.
- What the platform measured — After a failed deploy, a value the platform measured (the port the app really listens on). It never replaces something you wrote.
- Procfile — The web, release and worker lines of a Procfile.
- Detection — What the platform recognised in your source.
- Framework default — A step a framework needs (Django's and Laravel's migrate as the release command).
- Platform default — What the platform does when nothing above says anything.
A field you remove from nesly.toml is not deleted: the next source down answers it. The file never creates or deletes anything (no addon, domain or disk), so no change to it can destroy data. Two things are always the platform's: PORT and, for .NET, ASPNETCORE_URLS.
Processes
- web — the one process that gets the traffic. A static site has none: its files are served as they are.
- worker — a background process (a queue consumer): same image and variables, no traffic, never sleeps. From
[[worker]],nesly build set --worker name="cmd"or a Procfile line. Your plan sets how many run (limits); one over the allowance is not started and the deploy log says so. - release — runs once per deployment, before it serves (a migration). Up to 15 minutes, 30 at most. If your command fails the deploy stops and the previous version keeps serving; a framework default the platform added only warns. It sees the app's variables plus
RELEASE=1(unless you setRELEASEyourself). One release runs at a time per project and environment: a second deploy waits for the running one, never stops it, and a deploy still waiting when a newer one reaches its release is skipped. Your migration must be safe to run again; the schema is yours. After fixing what a failed release needed outside the code,nesly deploy --retry <deployment-id>runs it again on the same image, with no build. - scheduled jobs —
nesly cron. - one-off commands —
nesly run.
The app listens on $PORT (8080) on 0.0.0.0. If it listens on a fixed port, write it as [web] port = 3000 in nesly.toml: traffic goes there and PORT says the same number; without it the platform looks for the port the app opened. Traffic moves to a new version only when it answers: with a [health] path, that path; without one, any answer below 500. A version that does not answer within 5 minutes fails and the previous one keeps serving. On shutdown the process gets SIGTERM and 300 seconds before SIGKILL. A container that scaled to zero takes 2–10 seconds to answer its first request.
Environment variables
- yours — what you set (environment variables). Yours always win.
- from addons — what an attached database, cache, mail or login addon injects (
DATABASE_URL…). A value can point at one:nesly env set MY_DB='${{postgres.DATABASE_URL}}'. - generated — secrets your app makes up for itself (below).
- platform —
PORT,ASPNETCORE_URLSand the project's address.
A variable your code reads that nothing provides is named in nesly app show, with the command that sets it. It never stops a deploy by itself; if the app cannot start without it, the deploy fails with the app's own words and the name. Only you have a third-party key: nesly env request KEY gives you a page to type it into.
Secrets the platform generates
When your framework needs one of these names, or your code reads it, and you have not set it, the platform generates a random value on the deploy and keeps it on the project: the same value on every deploy, a separate one for previews, never printed. A value you set is never replaced. Third-party keys are never generated.
| Name | Format |
|---|---|
| APP_KEY | base64: followed by 32 random bytes in base64 (Laravel's own format) |
| SECRET_KEY_BASE | 64 random bytes as hex, 128 characters (Rails' own format) |
| JWT_SECRET, JWT_KEY, JWT_REFRESH_SECRET, SESSION_SECRET, SESSION_KEY, SECRET_KEY, APP_SECRET, COOKIE_SECRET, ENCRYPTION_KEY, SIGNING_KEY, CSRF_SECRET, N8N_ENCRYPTION_KEY, UTILS_SECRET, CREDS_KEY | 32 random bytes as hex, 64 characters |
| CREDS_IV | 16 random bytes as hex, 32 characters (an encryption IV; a longer one is refused by the app) |
| AUTH_SECRET and NEXTAUTH_SECRET | 32 random bytes as hex; the two names carry the same value |
Memory and CPU
A process may use up to your plan's ceiling unless you set a lower limit: [resources] memory = "1Gi"in nesly.toml, or nesly build set --memory 1Gi. The limit is not reserved and not billed; what the process uses is. Under memory pressure on a node, apps are stopped before the platform's own services and start again elsewhere on the next request. The ceilings are 2,048 MB on Starter, 4,096 MB on Pro, 8,192 MB on Ultimate, 16,384 MB on Enterprise. A setting over the ceiling is saved at the ceiling and the answer says so; written in nesly.toml, it stops the deploy with both numbers. When the system stops a live process for using more than its limit, nesly ps says so (run-oom for the app, worker-oom for a worker) and names the setting. Workers and the release command get the same limit. CPU is up to one vCPU. You pay for what is used (GB-seconds, vCPU-seconds), not for the limit.
A process that needs more than its limit is stopped by the system with exit code 137. The deploy log andnesly diagnose say so, name the limit and the ceiling, and give the command that raises it. Nothing is retried on its own.
What the platform will not read
The platform reads nesly.toml, a Procfile, the names in .env.example and your Dockerfile. Everything below is listed under refused in nesly app show, with the reason:
| docker-compose.yml, compose.yaml | A development setup: volumes, published ports, other images. Not read, and not to be translated by hand. |
| render.yaml, railway.json, railway.toml, fly.toml, vercel.json, .do/app.yaml, app.json, heroku.yml | Another platform's file. Not read. |
| volumes and disks | There is no disk that survives a restart: files go to a bucket addon, data to a database. |
| published ports, host network | The platform gives the app $PORT. A service that does not speak HTTP uses nesly tcp. |
| privileged, cap_add, devices | That privilege does not exist here. |
| Dockerfile VOLUME and HEALTHCHECK | The Dockerfile builds the image; these two lines mean nothing here ([health] in nesly.toml is the one health check). |
| example values | A value in .env.example, compose or app.json is never used: the platform generates its own or asks you. |
The platform never changes your code, lockfile or configuration to fit; it builds its own copy. Addons are never added on their own: when the code needs a database, nesly app show names it and the command that adds it.
Files your app writes
A deployment has no disk of its own. Files your app writes while it runs are not kept when it restarts or when you deploy again: every start begins from the built image. Keep configuration in environment variables (nesly env set) and anything the app must remember in a bucket (nesly addon add bucket) or the database (nesly addon add postgres). An app whose installer saves its result to a file and then restarts itself will be back at the installer. When your app ends its own process and is started again,nesly diagnose says so, with the file the log shows it wrote, andnesly ps shows the restart and the exit code.
Rolling back
nesly rollback <deployment> brings back that deployment's image and how it ran — start, port, health check, workers, memory — with no new build and no release command. Variable values and addons are not rolled back: a rotated secret does not come back, and data does not move back in time. More: deployments, builds.