Cloudflare Docs
Pages
View GitHub RSS Feed
Visit Pages on GitHub
Set theme to dark (⇧+D)

Language support and tools

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.

In the following table, review the preinstalled versions for tools included in the Cloudflare Pages build environment, and how to override them as relevant:

LanguageDefault 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
LanguageDefault versionSupported versionsEnvironment variableFile
Go1.20.3Any versionGO_VERSION
Node.js18.16.0Any versionNODE_VERSION.nvmrc, .node-version
Python3.10.5Any versionPYTHON_VERSION.python-version, runtime.txt
Ruby3.2.2Any versionRUBY_VERSION.ruby-version

Many common tools have been preinstalled in the Cloudflare Pages build environment. The environment variable available for overriding the preinstalled version is specified in the following table, as available:

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
ToolDefault versionSupported versionsEnvironment variable
Bundler2.4.10Corresponds with Ruby version
Embedded Dart Sass1.62.1Any versionEMBEDDED_DART_SASS_VERSION
gem3.4.10Corresponds with Ruby version
Hugo0.111.3Any versionHUGO_VERSION
npm9.5.1Corresponds with Node.js versionNPM_VERSION
pip22.0.4Corresponds with Python version
pipx1.2.0
pnpm8.2.0Any versionPNPM_VERSION
Poetry1.4.2
Yarn3.5.1Any versionYARN_VERSION

If you want to set a specific version of a framework your Cloudflare Pages project is using, note that Pages will respect your package manager of choice during your build process. For example, if you use Gatsby, your package.json should indicate a version of the gatsby npm package, which will be installed using npm install as your project builds on Cloudflare Pages.

​​ Build environment

Cloudflare Pages builds are run in a gVisor container.

Operating systemUbuntu 20.04.5
Architecturex86_64
Operating systemUbuntu 22.04.2
Architecturex86_64