As far as I can tell, there is no complete list of environment variables that can be accessed in Cloudflare Pages runtimes, or used to manipulate them. Below is a list of the ones I have found. If you find or know of more, please email me: [email protected].
TZ=America/New_York
- setting this allows you to manipulate the build VM’s timezone. If you do not do this, you may have inconsistent timezone rendering between builds in frameworks like Liquid, as CF can build each deployment in a different data center.1CF_PAGES_COMMIT_SHA
- hash of current commitCF_PAGES_PAGES
- equal to 1 in all pages build environmentsCF_PAGES_BRANCH
- name of branch used to build deploymentCF_PAGES_URL
- url of deployment at time of buildNODE_VERSION
GO_VERSION
PYTHON_VERSION
RUBY_VERSION
EMBEDDED_DART_SASS_VERSION
HUGO_VERSION
PNPM_VERSION
YARN_VERSION
BUN_VERSION
why tf isn’t this documented?!?!!?!?!?!?!?!?! ↩︎