For the complete Render documentation index, fetch https://render.com/llms.txt. Every docs page is also available as Markdown at https://render.com/docs/{slug}.md.

  • Docs
  • Changelog
Sign in
Get started

Default Environment Variables

View as Markdown
Open in ChatGPT
Open in Claude

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

See Setting Your Elixir and Erlang Versions.

See Setting Your Elixir and Erlang Versions.

Node.js

Set this to true to skip running yarn/npm install during build.

See Setting Your Node.js Version.

See Setting Your Bun Version.

Python 3

See Setting Your Python Version.

See Setting Your Poetry Version.

See Setting Your uv Version.

Rust

See Specifying a Rust Toolchain.

How to set environment variables

See Environment Variables and Secrets.

View as Markdown
Open in ChatGPT
Open in Claude
Default Environment Variables
  • By runtime
    • All runtimes
    • Docker
    • Elixir
    • Go
    • Node.js
    • Python 3
    • Ruby
    • Rust
  • Optional environment variables
    • All runtimes
    • Elixir
    • Node.js
    • Python 3
    • Rust
  • How to set environment variables
    • Home
    • Your first deploy
    • Free instances
    • Platform features by plan
    • Use with coding agents
    • FAQ
    • Templates
      • Migrate from…
        • Heroku
        • Railway
    • Compute plans
    • SandboxesBeta
      • Service types
        • Which to use?
        • Static sites
        • Web services
        • Private services
        • Background workers
        • Cron jobs
        • Workflows
        • Multi-service architectures
      • Data storage
        • Render Postgres
        • Render Key Value (Redis®-compatible)
        • Persistent disks
    • How deploys work
    • Supported languages
    • Git providers (GitHub, etc.)
    • Build pipeline
    • Deploy hooks
    • Monorepo support
    • Troubleshooting deploys
      • Previewing changes
        • Single-service previews
        • Preview environments (multi-service)
      • Docker deploys
        • Overview
        • Deploy a registered image
        • Using secrets
      • Runtime
        • Native runtimes
        • Environment variables & secrets
        • Default environment variables
    • Intro to sandboxes
    • Limits & pricing
      • How to…
        • Create & configure sandboxes
        • Execute commands
        • Upload & download files
        • Manage snapshots
      • Use with…
        • Claude Managed Agents
        • Cursor Cloud Agents
        • OpenAI Agents API
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
    • Intro to workflows
    • Tutorial
    • Limits & pricing
      • How to…
        • Define tasks
        • Define flowsNew
        • Trigger runs
        • Develop locally
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
      • Example workflows
        • TypeScript examples
        • Python examples
    • Overview
    • Create & connect
    • Database credentials
    • Extensions
    • Version upgrades
    • Logical replication
    • Legacy instance types
      • Database recovery
        • Recovery & backups
        • High availability
      • Database performance
        • Read replicas
        • Connection pooling
        • Admin apps
        • Repacking tables
        • Troubleshooting performance
    • Regions
    • Inbound IP rules
    • Edge caching
    • WebSockets
    • TLS certificates
      • Custom domains
        • Overview
        • Cloudflare
        • Namecheap
        • Other DNS providers
      • Internal traffic
        • Private network
        • Private links
      • Outbound traffic
        • Default IP ranges
        • Dedicated IP addresses
        • Outbound bandwidth
        • Handling network changes
      • Static site config
        • Custom response headers
        • Redirects & rewrites
    • The Render Dashboard
    • SSH / Shell access
    • Projects & environments
      • Service actions
        • Scaling
        • Rollbacks
        • Maintenance mode
        • One-off jobs
      • Infrastructure as code
        • Blueprints overview
        • render.yaml reference
        • Terraform provider
    • In-dashboard metrics
    • Health checks
    • Uptime best practices
      • Logging
        • In-dashboard logs
        • Log streams (syslog/HTTPS)
      • OpenTelemetry (OTel) metrics
        • Provider setup
        • Metrics reference
      • Notifications
        • Webhooks
        • Email / Slack
    • API keys
    • MCP Server
      • Render CLI
        • Overview
        • Command reference
      • REST API
        • Overview
        • API reference
      • Third-party connections
        • OIDC support
        • Datadog
    • Workspaces, members, & roles
    • Login settings
    • Audit logs
      • Organizations
        • Overview
        • SAML SSO
    • DDoS protection
    • Platform maintenance
      • Compliance
        • Overview
        • HIPAA (US health data)
        • HIPAA best practices
        • Shared responsibility model
        • Pentest policy
    • Heroku vs Render
    • Vercel vs Render
All Systems Operational
© Render Inc. All rights reserved.