Skip to content

Build image

Last updated View as MarkdownAgent setup

Cloudflare Pages' build environment has broad support for a variety of languages, such as Ruby, Node.js, Python, PHP, and Go.

If you need to use a specific version of a language, (for example, Node.js or Ruby) you can specify it by providing an associated environment variable in your build configuration, or setting the relevant file in your source code.

Supported languages and tools

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:

Languages and runtime

ToolDefault versionSupported versionsEnvironment variableFile
Go1.24.3Any versionGO_VERSION
Node.js22.16.0Any versionNODE_VERSION.nvmrc, .node-version
Bun1.2.15Any versionBUN_VERSION
Python3.13.3Any versionPYTHON_VERSION.python-version, runtime.txt
Ruby3.4.4Any versionRUBY_VERSION.ruby-version
ToolDefault versionSupported versionsEnvironment variableFile
Go1.21.0Any versionGO_VERSION
Node.js18.17.1Any versionNODE_VERSION.nvmrc, .node-version
Bun1.1.33Any versionBUN_VERSION
Python3.11.5Any versionPYTHON_VERSION.python-version, runtime.txt
Ruby3.2.2Any versionRUBY_VERSION.ruby-version
ToolDefault versionSupported versionsEnvironment variableFile
Clojure
Elixir1.71.7 only
Erlang2121 only
Go1.14.4Any versionGO_VERSION
Java88 only
Node.js12.18.0Any versionNODE_VERSION.nvmrc, .node-version
PHP5.65.6, 7.2, 7.4 onlyPHP_VERSION
Python2.72.7, 3.5, 3.7 onlyPYTHON_VERSIONruntime.txt, Pipfile
Ruby2.7.1Any version between 2.6.2 and 2.7.5RUBY_VERSION.ruby-version
Swift5.2.5Any 5.x versionSWIFT_VERSION.swift-version
.NET3.1.302

Tools

ToolDefault versionSupported versionsEnvironment variable
Bundler2.6.9Corresponds with Ruby version
Embedded Dart Sass1.62.1Up to 1.62.1EMBEDDED_DART_SASS_VERSION
gem3.6.9Corresponds with Ruby version
Hugo0.147.7Any versionHUGO_VERSION
npm10.9.2Corresponds with Node.js version
pip25.1.1Corresponds with Python version
pipx1.7.1
pnpm10.11.1Any versionPNPM_VERSION
Poetry2.1.3
Yarn4.9.1Any versionYARN_VERSION
Zola0.22.1Any versionZOLA_VERSION
ToolDefault versionSupported versionsEnvironment variable
Bundler2.4.10Corresponds with Ruby version
Embedded Dart Sass1.62.1Up to 1.62.1EMBEDDED_DART_SASS_VERSION
gem3.4.10Corresponds with Ruby version
Hugo0.118.2Any versionHUGO_VERSION
npm9.6.7Corresponds with Node.js version
pip23.2.1Corresponds with Python version
pipx1.2.0
pnpm8.7.1Any versionPNPM_VERSION
Poetry1.6.1
Yarn3.6.3Any versionYARN_VERSION
Zola0.22.1Any versionZOLA_VERSION
ToolDefault versionSupported versionsEnvironment variable
Boot2.5.22.5.2
Bower
Cask
Composer
Doxygen1.8.6
Emacs25
Gutenberg(requires environment variable)Any versionGUTENBERG_VERSION
Hugo0.54.0Any versionHUGO_VERSION
GNU Make3.8.1
ImageMagick6.7.7
jq1.5
Leiningen
OptiPNG0.6.4
npmCorresponds with Node.js versionAny versionNPM_VERSION
pipCorresponds with Python version
PipenvLatest version
sqlite33.11.0
Yarn1.22.4Any version from 0.2.0 to 1.22.19YARN_VERSION
Zola(requires environment variable)Any version from 0.5.0 and upZOLA_VERSION

Frameworks

To use a specific version of a framework, specify it in the project's package manager configuration file. For example, if you use Gatsby, your package.json should include the following:

"dependencies": {
	"gatsby": "^5.13.7",
}

When your build starts, if not already cached, version 5.13.7 of Gatsby will be installed using npm install.

Advanced Settings

Override default versions

To override default versions of languages and tools in the build system, you can either set the desired version through environment variables or by adding files to your project.

To set the version using environment variables, you can:

  1. Find the environment variable name for the language or tool in this table.
  2. Add the environment variable on the dashboard by going to Settings > Environment variables in your Pages project, or add the environment variable via Wrangler.

Or, to set the version by adding a file to your project, you can:

  1. Find the file name for the language or tool in this table.
  2. 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, if you were previously relying on the default version of Node.js in the v1 build system, to migrate to v2, you must specify that you need Node.js 12.18.0 by setting a NODE_VERSION = 12.18.0 environment variable or by adding a .node-version or .nvmrc file to your project with 12.18.0 added as the contents to the file.

Skip dependency install

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

v3 build system

The v3 build system updates the default tools, libraries and languages to their LTS versions, as of May 2025.

v2 to v3 Migration

To migrate to this new version, configure your Pages project settings in the dashboard:

  1. In the Cloudflare dashboard, go to the Workers & Pages page.

    Go to Workers & Pages ↗
  2. Select your Pages project.

  3. Go to Deployments > All deployments > and select the latest version.

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, you must specify the version you wish to use by overriding the default versions.

Limitations

The following features are not currently supported when using the v3 build system:

  • Specifying Node.js versions as codenames (for example, hydrogen or lts/hydrogen).
  • Detecting Yarn version from yarn.lock file version.
  • Detecting pnpm version detection based pnpm-lock.yaml file version.
  • Detecting Node.js and package managers from package.json -> "engines".
  • pipenv and Pipfile support.

Build environment

Cloudflare Pages builds are run in a gVisor container.

Build environment

Ubuntu 22.04.2

Architecturex86_64
Build environment

Ubuntu 22.04.2

Architecturex86_64
Build environment

Ubuntu 20.04.5

Architecturex86_64

Build Image Policy

Build Image Version Deprecation

If you are currently using the v1 or v2 build image, your project will be automatically moved to v3:

  • v1 build image: If you are using the Pages v1 build image, your project will be automatically moved to v3 on September 15, 2026.
  • v2 build image: If you are using the Pages v2 build image, your project will be automatically moved to v3 on February 23, 2027.

You will receive 6 months’ notice before the deprecation date via the Cloudflare Changelog, dashboard notifications, and email.

Going forward, the v3 build image will receive rolling updates to preinstalled software per the policy below. There will be no further build image version changes.

Preinstalled Software Updates

Preinstalled software (languages and tools) will be 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 (e.g., Bun or Hugo), updates that may contain breaking changes will receive 3 months’ notice.
  • Major version updates: Updated to the next stable long-term support (LTS) version with 3 months’ notice.

How you'll 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.

Best Practices

To avoid unexpected build failures:

Was this helpful?