Default Environment Variables

Render provides additional environment variables to services at runtime, as well as during builds and deploys.

By runtime

All runtimes

Environment VariableValue
IS_PULL_REQUESTSet to true for Pull Request Previews. false for everything else.
RENDER_DISCOVERY_SERVICEThe Render DNS name used to discover all instances in multi-instance services. Of the form $RENDER_SERVICE_NAME-discovery.
RENDER_EXTERNAL_HOSTNAMEThe Render host for a web service or static site. Of the form foobar.onrender.com. Empty for all other service types.
RENDER_EXTERNAL_URLThe Render URL for a web service or static site; of the form https://foobar.onrender.com. Empty for all other service types.
RENDER_GIT_BRANCHThe Git branch for a service or deploy.
RENDER_GIT_COMMITThe commit SHA for a service or deploy.
RENDER_GIT_REPO_SLUG$username/$reponame
RENDER_INSTANCE_IDA unique identifier for an instance. Useful for multi-instance services.
RENDER_SERVICE_IDA unique identifier for a service. Used in the Render API.
RENDER_SERVICE_NAMEA unique, human-readable identifier for a service.
RENDER_SERVICE_TYPEOne of web, pserv, cron, worker, static.
RENDERAlways set to true.

Other environment variables beginning with RENDER_ may be included in your build and runtime environments. However, variables not listed above are strictly for internal use and can change without warning.

Docker

Render does not provide additional environment variables on top of what’s listed under All runtimes.

Elixir

Environment VariableValue
MIX_ENVprod
RELEASE_DISTRIBUTIONname

Go

Environment VariableValue
GO111MODULEon
GOPATH/opt/render/project/go

Node

Environment VariableValue
NODE_ENVproduction at runtime
NODE_MODULES_CACHEtrue

Python 3

Environment VariableValue
CItrue at buildtime
FORWARDED_ALLOW_IPS*
GUNICORN_CMD_ARGS--preload --access-logfile - --bind=0.0.0.0:10000
PIPENV_YEStrue
PYTHON_VERSION3.7.10
VENV_ROOT/opt/render/project/src/.venv

Ruby

Environment VariableValue
BUNDLE_APP_CONFIG/opt/render/project/.gems
BUNDLE_BIN/opt/render/project/.gems/bin
BUNDLE_DEPLOYMENTtrue
BUNDLE_PATH/opt/render/project/.gems
GEM_PATH/opt/render/project/.gems
MALLOC_ARENA_MAX2
PASSENGER_ENGINEbuiltin
PASSENGER_ENVIRONMENTproduction
PASSENGER_PORT10000
PIDFILE/tmp/puma-server.pid
RAILS_ENVproduction
RAILS_SERVE_STATIC_FILEStrue
RAILS_LOG_TO_STDOUTtrue

Rust

Environment VariableValue
CARGO_HOMEopt/render/project/.cargo
ROCKET_ENVprod
ROCKET_PORT10000 at runtime
RUSTUP_HOME/opt/render/project/.rustup

Optional environment variables

You can set these environment variables to modify the default behavior for your services.

All runtimes

Environment VariableValue
PORTFor web services, specify your HTTP server’s port. The default port is 10000.

Node.js

Environment VariableValue
SKIP_INSTALL_DEPSUsers can set this to true to skip running yarn/npm install during build.
NODE_VERSIONSee Specifying a Node Version for more options.

Setting environment variables

Render supports environment variables, configuration files, and secrets and lets you manage them at different levels of granularity to simplify your deployment processes.

See Environment Variables and Secrets.