Default Environment Variables
Render provides additional environment variables to services at runtime, as well as during builds and deploys.
By runtime
All runtimes
Environment Variable | Value |
---|---|
IS_PULL_REQUEST | Set to true for Pull Request Previews. false for everything else. |
RENDER_DISCOVERY_SERVICE | The Render DNS name used to discover all instances in multi-instance services. Of the form $RENDER_SERVICE_NAME-discovery . |
RENDER_EXTERNAL_HOSTNAME | The Render host for a web service or static site. Of the form foobar.onrender.com . Empty for all other service types. |
RENDER_EXTERNAL_URL | The Render URL for a web service or static site; of the form https://foobar.onrender.com . Empty for all other service types. |
RENDER_GIT_BRANCH | The Git branch for a service or deploy. |
RENDER_GIT_COMMIT | The commit SHA for a service or deploy. |
RENDER_GIT_REPO_SLUG | $username/$reponame |
RENDER_INSTANCE_ID | A unique identifier for an instance. Useful for multi-instance services. |
RENDER_SERVICE_ID | A unique identifier for a service. Used in the Render API. |
RENDER_SERVICE_NAME | A unique, human-readable identifier for a service. |
RENDER_SERVICE_TYPE | One of web , pserv , cron , worker , static . |
RENDER | Always 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 Variable | Value |
---|---|
MIX_ENV | prod |
RELEASE_DISTRIBUTION | name |
Go
Environment Variable | Value |
---|---|
GO111MODULE | on |
GOPATH | /opt/render/project/go |
Node
Environment Variable | Value |
---|---|
NODE_ENV | production at runtime |
NODE_MODULES_CACHE | true |
Python 3
Environment Variable | Value |
---|---|
CI | true at buildtime |
FORWARDED_ALLOW_IPS | * |
GUNICORN_CMD_ARGS | --preload --access-logfile - --bind=0.0.0.0:10000 |
PIPENV_YES | true |
PYTHON_VERSION | 3.7.10 |
VENV_ROOT | /opt/render/project/src/.venv |
Ruby
Environment Variable | Value |
---|---|
BUNDLE_APP_CONFIG | /opt/render/project/.gems |
BUNDLE_BIN | /opt/render/project/.gems/bin |
BUNDLE_DEPLOYMENT | true |
BUNDLE_PATH | /opt/render/project/.gems |
GEM_PATH | /opt/render/project/.gems |
MALLOC_ARENA_MAX | 2 |
PASSENGER_ENGINE | builtin |
PASSENGER_ENVIRONMENT | production |
PASSENGER_PORT | 10000 |
PIDFILE | /tmp/puma-server.pid |
RAILS_ENV | production |
RAILS_SERVE_STATIC_FILES | true |
RAILS_LOG_TO_STDOUT | true |
Rust
Environment Variable | Value |
---|---|
CARGO_HOME | opt/render/project/.cargo |
ROCKET_ENV | prod |
ROCKET_PORT | 10000 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 Variable | Value |
---|---|
PORT | For web services, specify your HTTP server’s port. The default port is 10000 . |
Node.js
Environment Variable | Value |
---|---|
SKIP_INSTALL_DEPS | Users can set this to true to skip running yarn/npm install during build. |
NODE_VERSION | See 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.