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
This value is true for pull request previews and false otherwise.
Note that these are the string values "true" and "false". Convert to booleans as needed.
This value is always true. Your code can check this value to detect whether it's running on Render.
The service's CPU count, based on its compute plan.
For example, this value is 0.5 for the 0.5c-512mb compute plan and 2 for the 2c-4g compute plan. Note that these are the string values "0.5" and "2". Convert to numbers as needed.
The Render DNS name used to discover all running instances of a scaled service. Has the format $RENDER_SERVICE_NAME-discovery.
For a web service or static site, this is the service's onrender.com hostname (such as myapp.onrender.com).
For other service types, this value is empty.
For a web service or static site, this is the service's full onrender.com URL (such as https://myapp.onrender.com).
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 $username/$reponame.
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 web, pserv, cron, worker, static.
For a web service or private service, this is the recommended number of concurrent web processes for handling requests. This is based on the CPU count for the service's compute plan.
For example, this value is 1 for the 0.5c-512mb compute plan and 2 for the 2c-4g compute plan. Note that these are the string values "1" and "2". Convert to numbers as needed.
This is only available at runtime. At build time or for other service types, this value is empty.
For a web service or private service created after December 8th 2025, this defaults to the recommended number of concurrent web processes for handling requests. This is based on the CPU count for the service's compute plan.
For example, this value is 1 for the 0.5c-512mb compute plan and 2 for the 2c-4g compute plan. Note that these are the string values "1" and "2". Convert to numbers as needed.
This is only available at runtime. At build time, for other service types, or for web and private services created before the cutoff date, this value is empty.
Other environment variables starting with RENDER_ might be present in your build and runtime environments.
However, variables not listed above are strictly for internal use and might change without warning.
Docker
Render does not provide additional environment variables on top of what's listed under All runtimes.
Elixir
prod
name
Go
on
/opt/render/project/go
Node.js
production (runtime only)
true
Python 3
true (build time only)
*
--preload --access-logfile - --bind=0.0.0.0:10000
true
/opt/render/project/src/.venv
Ruby
/opt/render/project/.gems
/opt/render/project/.gems/bin
true
/opt/render/project/.gems
/opt/render/project/.gems
2
builtin
production
10000
/tmp/puma-server.pid
production
true
true
Rust
/opt/render/project/.cargo
prod
10000 (runtime only)
/opt/render/project/.rustup
Optional environment variables
You can set these environment variables to modify the default behavior for your services.
All runtimes
For web services, specify the port that your HTTP server binds to.
The default port is 10000.
Elixir
Node.js
Set this to true to skip running yarn/npm install during build.