The Cloudflare Pages build environment supports a variety of languages, including Go, Node.js, Bun, Python, and Ruby. For the build image used by Cloudflare Workers, refer to Workers Builds build image.
If you need to use a specific version of a language (for example, Node.js or Ruby), specify it by setting the associated environment variable in your build configuration or adding the corresponding version file to your source code.
In the following tables, review the preinstalled versions for languages and tools included in the Cloudflare Pages' build image, and the environment variables and/or files available for overriding the preinstalled version:
| Tool | Default version | Supported versions | Environment variable | File |
|---|---|---|---|---|
| Go | 1.24.3 | Any version | GO_VERSION | |
| Node.js | 22.23.4 | Any version | NODE_VERSION | .nvmrc, .node-version |
| Bun | 1.4.4 | Any version | BUN_VERSION | |
| Python | 3.13.3 | Any version | PYTHON_VERSION | .python-version, runtime.txt |
| Ruby | 3.4.4 | Any version | RUBY_VERSION | .ruby-version |
| Tool | Default version | Supported versions | Environment variable | File |
|---|---|---|---|---|
| Go | 1.21.0 | Any version | GO_VERSION | |
| Node.js | 18.17.1 | Any version | NODE_VERSION | .nvmrc, .node-version |
| Bun | 1.4.4 | Any version | BUN_VERSION | |
| Python | 3.11.5 | Any version | PYTHON_VERSION | .python-version, runtime.txt |
| Ruby | 3.2.2 | Any version | RUBY_VERSION | .ruby-version |
| Tool | Default version | Supported versions | Environment variable | File |
|---|---|---|---|---|
| Clojure | ||||
| Elixir | 1.7 | 1.7 only | ||
| Erlang | 21 | 21 only | ||
| Go | 1.14.4 | Any version | GO_VERSION | |
| Java | 8 | 8 only | ||
| Node.js | 12.18.0 | Any version | NODE_VERSION | .nvmrc, .node-version |
| PHP | 5.6 | 5.6, 7.2, 7.4 only | PHP_VERSION | |
| Python | 2.7 | 2.7, 3.5, 3.7 only | PYTHON_VERSION | runtime.txt, Pipfile |
| Ruby | 2.7.1 | Any version between 2.6.2 and 2.7.5 | RUBY_VERSION | .ruby-version |
| Swift | 5.2.5 | Any 5.x version | SWIFT_VERSION | .swift-version |
| .NET | 3.1.302 |
| Tool | Default version | Supported versions | Environment variable |
|---|---|---|---|
| Bundler | 2.6.9 | Corresponds with Ruby version | |
| Embedded Dart Sass | 1.62.1 | Up to 1.62.1 | EMBEDDED_DART_SASS_VERSION |
| gem | 3.6.9 | Corresponds with Ruby version | |
| Hugo | 0.147.7 | Any version | HUGO_VERSION |
| npm | 10.9.9 | Corresponds with Node.js version | |
| pip | 26.2.2 | Corresponds with Python version | |
| pipx | 1.7.1 | ||
| pnpm | 10.11.1 | Any version | PNPM_VERSION |
| Poetry | 2.1.3 | ||
| Yarn | 4.9.1 | Any version | YARN_VERSION |
| Zola | 0.22.1 | Any version | ZOLA_VERSION |
| Tool | Default version | Supported versions | Environment variable |
|---|---|---|---|
| Bundler | 2.4.10 | Corresponds with Ruby version | |
| Embedded Dart Sass | 1.62.1 | Up to 1.62.1 | EMBEDDED_DART_SASS_VERSION |
| gem | 3.4.10 | Corresponds with Ruby version | |
| Hugo | 0.118.2 | Any version | HUGO_VERSION |
| npm | 9.6.7 | Corresponds with Node.js version | |
| pip | 26.2.2 | Corresponds with Python version | |
| pipx | 1.2.0 | ||
| pnpm | 8.7.1 | Any version | PNPM_VERSION |
| Poetry | 1.6.1 | ||
| Yarn | 3.6.3 | Any version | YARN_VERSION |
| Zola | 0.22.1 | Any version | ZOLA_VERSION |
| Tool | Default version | Supported versions | Environment variable |
|---|---|---|---|
| Boot | 2.5.2 | 2.5.2 | |
| Bower | |||
| Cask | |||
| Composer | |||
| Doxygen | 1.8.6 | ||
| Emacs | 25 | ||
| Gutenberg | (requires environment variable) | Any version | GUTENBERG_VERSION |
| Hugo | 0.54.0 | Any version | HUGO_VERSION |
| GNU Make | 3.8.1 | ||
| ImageMagick | 6.7.7 | ||
| jq | 1.5 | ||
| Leiningen | |||
| OptiPNG | 0.6.4 | ||
| npm | Corresponds with Node.js version | Any version | NPM_VERSION |
| pip | Corresponds with Python version | ||
| Pipenv | Latest version | ||
| sqlite3 | 3.11.0 | ||
| Yarn | 1.22.4 | Any version from 0.2.0 to 1.22.19 | YARN_VERSION |
| Zola | (requires environment variable) | Any version from 0.5.0 and up | ZOLA_VERSION |
To use a specific version of a framework, specify it in the project's package manager configuration file.
For example, your package.json might include:
{
"dependencies": {
"vite": "^6.0.0"
}
}When your build starts, if not already cached, the declared version is installed using your package manager.
To override default versions of languages and tools in the build system, set the desired version through environment variables in the Cloudflare dashboard or by adding version files to your project.
To set the version using environment variables:
- Find the environment variable name for the language or tool in the Supported languages and tools tables.
- In your Pages project in the Cloudflare dashboard, go to Settings > Variables and Secrets and add the build environment variable (for example,
NODE_VERSION).
Or, to set the version by adding a file to your project:
- Find the file name for the language or tool in the Supported languages and tools tables.
- Add the specified file name to the root directory of your project, and add the desired version number as the contents of the file.
For example, to pin Node.js 20.19.0, set a NODE_VERSION environment variable to 20.19.0 or add a .node-version or .nvmrc file to your project containing 20.19.0.
You can add the following environment variable to disable automatic dependency installation, and run a custom install command instead.
| Build variable | Value |
|---|---|
SKIP_DEPENDENCY_INSTALL |
1 or true |
The v3 build system updates the default tools, libraries, and languages to current LTS versions and receives rolling updates.
To migrate from the v2 build system to v3, configure your Pages project settings in the dashboard:
-
In the Cloudflare dashboard, go to the Workers & Pages page.
Go to Workers & Pages ↗ -
Select your Pages project.
-
Go to Settings > Build > Build system version and select Version 3 (latest).
If you were previously relying on the default versions of any languages or tools in the build system, your build may fail when migrating to v3. To fix this, specify the version you want to use by overriding the default versions.
The following features are not supported when using the v3 build system:
- Specifying Node.js versions as codenames (for example,
hydrogenorlts/hydrogen). - Detecting Yarn version from
yarn.lockfile version. - Detecting pnpm version from
pnpm-lock.yamlfile version. - Detecting Node.js and package managers from
package.json->"engines". pipenvandPipfilesupport.
Cloudflare Pages builds are run in a gVisor ↗︎ container.
| Build environment | Ubuntu |
| Architecture | x86_64 |
| Build environment | Ubuntu |
| Architecture | x86_64 |
| Build environment | Ubuntu |
| Architecture | x86_64 |
Build commands use the CA certificates installed in the build image at /etc/ssl/certs/ca-certificates.crt. Pages sets the following environment variables so that runtimes with their own bundled CA certificates use them as well, including older versions you select with a version override:
| Environment variable | Value |
|---|---|
SSL_CERT_FILE |
/etc/ssl/certs/ca-certificates.crt |
PIP_CERT |
/etc/ssl/certs/ca-certificates.crt |
REQUESTS_CA_BUNDLE |
/etc/ssl/certs/ca-certificates.crt |
NODE_OPTIONS |
--use-openssl-ca |
If you set any of these variables as an environment variable in your project, your value replaces the default. --use-openssl-ca is added to your own NODE_OPTIONS, unless it already contains --use-openssl-ca or --use-bundled-ca.
Projects using older build image versions migrate to v3 on the following schedule:
- v1 build image: Projects on the Pages v1 build image were automatically moved to v3 on 2026-09-15.
- v2 build image: Projects on the Pages v2 build image will be automatically moved to v3 on 2027-02-23.
Cloudflare provides six months' notice before a deprecation date via the Cloudflare Changelog, dashboard notifications, and email.
The v3 build image receives rolling updates to preinstalled software under the following policy, with no further major build image version changes.
Preinstalled software (languages and tools) is updated before reaching end-of-life (EOL). These updates apply only if you have not overridden the default version.
- Minor version updates: May be updated to the latest available minor version without notice. For tools that do not follow semantic versioning (for example, Bun or Hugo), updates that may contain breaking changes receive three months' notice.
- Major version updates: Updated to the next stable long-term support (LTS) version with three months' notice.
How you will be notified (for changes requiring notice):
- Cloudflare Changelog
- Dashboard notifications for projects that will receive the update
- Email notifications to project owners
To maintain a specific version and avoid automatic updates, override the default version.
To avoid unexpected build failures:
- Monitor announcements via the Cloudflare Changelog, dashboard notifications, and email.
- Plan for migration when you receive update notices.
- Pin specific versions of critical preinstalled software by overriding default versions.