Environment Variables

Render makes the following environment variables available to all services at runtime, as well as during builds and deploys.

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_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.