Default Environment Variables
Render automatically sets the values of certain environment variables for your service.
Unless otherwise noted, these environment variables are available at both build time and runtime.
Environment variable values are always strings.
In your application logic, perform any necessary conversions for variable values that represent other data types, such as "false"
or "10000"
.
By runtime
All runtimes
Environment Variable | Value |
---|---|
|
This value is Note that these are the string values |
|
This value is always |
|
The Render DNS name used to discover all running instances of a scaled service. Has the format |
|
For a web service or static site, this is the service’s For other service types, this value is empty. |
|
For a web service or static site, this is the service’s full For other service types, this value is empty. |
|
The Git branch for a service or deploy. |
|
The commit SHA for a service or deploy. |
|
Has the format |
|
The unique identifier of the current service instance. Useful for scaled services with multiple instances. |
|
The service’s unique identifier. Used in the Render API. |
|
A unique, human-readable identifier for a service. |
|
The current service’s type. One of |
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 |
---|---|
|
|
|
|
Go
Environment Variable | Value |
---|---|
|
|
|
|
Node
Environment Variable | Value |
---|---|
|
|
|
|
Python 3
Environment Variable | Value |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Ruby
Environment Variable | Value |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rust
Environment Variable | Value |
---|---|
|
|
|
|
|
|
|
|
Optional environment variables
You can set these environment variables to modify the default behavior for your services.
All runtimes
Environment Variable | Value |
---|---|
|
For web services, specify the port that your HTTP server binds to. The default port is |
Node.js
Environment Variable | Value |
---|---|
|
Set this to |
|
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.