Configuration
Build overrides, environment variables, secrets and scaling — what each does and when it takes effect.
Configuration lives on the function, in the console's Settings tab or
through UpdateFunction. There is no configuration file in your repository:
nothing in your source tree is read as settings.
Only the settings that apply to your function's kind are shown, and the ones that do not apply are refused by the API rather than stored. See which settings apply.
Build settings
| Setting | Applies to | What it does |
|---|---|---|
| Port | Node.js, Go | The port your app listens on, exported as $PORT. Default 8080. |
| Entrypoint | Node.js, Go | Overrides the detected start command. Argv form — never shell-joined. |
| System packages | Node.js, Go | Debian packages installed into the runtime image. |
| Static directory | Static | Which directory in the tree is the site root. |
| Main package | Go | Which command to build, e.g. ./cmd/api. |
Port
The platform's readiness probe watches the port you configure. An app that
ignores $PORT and hardcodes another one starts cleanly, logs nothing wrong,
and never becomes ready — so a deploy that hangs and then times out on
activation is almost always this.
System packages
This is the declarative escape hatch that replaces writing a Dockerfile.
ffmpeg
imagemagickNames only. They are validated as Debian package names — at least two
characters, starting with a letter or digit, otherwise lowercase letters,
digits, +, - and . — so no version pins, no apt options, no URLs, nothing
that could smuggle a second argument into the shared builder. At most 32
packages, and duplicates are refused.
The list is sorted and deduplicated before use, so reordering it does not miss the build cache.
For Go, declaring any package switches the runtime image from distroless to
debian:stable-slim, since distroless has no apt.
Environment variables
Plain environment variables are stored as-is and returned to anyone who can read
the function. They are right for NODE_ENV=production or a feature flag, and
wrong for anything you would not want in a console screenshot.
Static functions cannot have them.
Secrets
Secrets are the parallel map for values that must not be readable back. They are encrypted at rest and write-only: the API returns the names of a function's secrets and never the values.
- Setting a secret merges it in; the console cannot round-trip a value it can never read, so secrets are merged rather than replaced wholesale.
- Clearing one removes it by name.
- At deploy time, secrets are layered over plain environment variables and
win on collision — so moving a value from
envto a secret takes effect without having to remember to delete the plain one first.
Environment and secret changes are not live until you redeploy. A running version's environment is fixed when its App is created, so saving settings changes nothing that is currently serving. Use Redeploy to apply them — it produces a new version from the same source snapshot without rebuilding.
Scaling
Passed through to the platform. Ignored for static functions, which have nothing to scale.
| Setting | What it means |
|---|---|
| Min instances | 0 scales to zero: nothing runs until a request arrives. |
| Max instances | Upper bound on replicas. |
| Concurrency | In-flight requests per instance before another is started. |
| Idle timeout | How long an instance stays warm after its last request. |
| Activation timeout | How long a request may wait on a cold start. |
Leaving a value unset means the platform's own default for it. Activation timeout is the exception with a documented default here: the edge gives up after 30 seconds when nothing is configured — long enough for an image pull plus a sandboxed start, short enough that a broken function fails visibly instead of hanging a browser.
Setting min instances above zero keeps instances warm and removes cold starts, at the cost of running all the time. Scale-to-zero is the default because most functions are idle most of the time.
Editing files
A function's workspace is its working tree, and the console's Code tab edits it directly. A deploy freezes the workspace into an immutable snapshot and builds that, so editing in the browser and uploading an archive are the same thing seen from two directions.
Two limits worth knowing:
- The editor loads and saves files up to 2 MiB.
- An uploaded source archive may be up to 64 MiB.
Once a repository is connected the editor becomes read-only, because every push replaces the workspace.