Environment Variables


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

All Services

IS_PULL_REQUESTSet to true for Pull Request Previews. false for everything else.
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_NAMEThe unique slug for your 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 in All Services.

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

Rust

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

Optional Environment Variables

You may choose to configure optional environment variables to modify the default behavior for your services.

All Services

Environment VariableValue
PORTManually define the port to serve traffic from.

Node

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.