Complete guide to available runtimes on Render, including versions, configuration, and best practices for each language.
Complete guide to available runtimes on Render, including versions, configuration, and best practices for each language.
runtime: node)Supported Versions: 14, 16, 18, 20, 21 Default Version: 20
Version Specification:
Specify Node version in package.json:
{
"engines": {
"node": "20.x"
}
}
Package Managers:
package-lock.jsonyarn.lock existspnpm-lock.yaml existsCommon Build Commands:
npm ci # Recommended (faster, reproducible)
npm ci && npm run build # Build step included
yarn install --frozen-lockfile # Yarn equivalent
pnpm install --frozen-lockfile # pnpm equivalent
Common Start Commands:
npm start # Uses "start" script in package.json
node server.js # Direct file execution
node dist/main.js # Built output
Popular Frameworks:
Example Configuration:
type: web
name: node-app
runtime: node
buildCommand: npm ci && npm run build
startCommand: npm start
runtime: python)Supported Versions: 3.8, 3.9, 3.10, 3.11, 3.12 Default Version: 3.11
Version Specification:
Option 1 - runtime.txt:
python-3.11.5
Option 2 - Pipfile:
[requires]
python_version = "3.11"
Package Managers:
requirements.txtpyproject.toml existsPipfile existsCommon Build Commands:
pip install -r requirements.txt
pip install -r requirements.txt && python manage.py collectstatic --no-input
poetry install --no-dev
pipenv install --deploy
Common Start Commands:
gunicorn app:app # Flask
gunicorn config.wsgi:application # Django
uvicorn main:app --host 0.0.0.0 --port $PORT # FastAPI
celery -A tasks worker # Celery worker
Popular Frameworks:
Example Configuration:
type: web
name: python-app
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: gunicorn app:app --bind 0.0.0.0:$PORT
runtime: go)Supported Versions: 1.20, 1.21, 1.22, 1.23 Default Version: Latest stable
Version Specification:
Specify in go.mod:
module myapp
go 1.22
Build System: Uses Go modules
Common Build Commands:
go build -o bin/app .
go build -o bin/app cmd/server/main.go
go build -tags netgo -ldflags '-s -w' -o bin/app
Common Start Commands:
./bin/app
./bin/server
Popular Frameworks:
Example Configuration:
type: web
name: go-app
runtime: go
buildCommand: go build -o bin/app .
startCommand: ./bin/app
runtime: ruby)Supported Versions: 3.0, 3.1, 3.2, 3.3 Default Version: 3.3
Version Specification:
Option 1 - .ruby-version:
3.3.0
Option 2 - Gemfile:
ruby '3.3.0'
Package Manager: Bundler (uses Gemfile and Gemfile.lock)
Common Build Commands:
bundle install --jobs=4 --retry=3
bundle install && bundle exec rails assets:precompile
Common Start Commands:
bundle exec rails server -b 0.0.0.0 -p $PORT
bundle exec puma -C config/puma.rb
bundle exec rackup -o 0.0.0.0 -p $PORT
bundle exec sidekiq # Worker
Popular Frameworks:
Example Configuration:
type: web
name: rails-app
runtime: ruby
buildCommand: bundle install && bundle exec rails assets:precompile
startCommand: bundle exec puma -C config/puma.rb
runtime: rust)Supported Versions: Latest stable Default Version: Latest stable
Build System: Cargo
Common Build Commands:
cargo build --release
cargo build --release --locked
Common Start Commands:
./target/release/myapp
Popular Frameworks:
Example Configuration:
type: web
name: rust-app
runtime: rust
buildCommand: cargo build --release
startCommand: ./target/release/myapp
runtime: elixir)Supported Versions: Latest stable Default Version: Latest stable
Build System: Mix
Common Build Commands:
mix deps.get --only prod
mix deps.get && mix compile
mix do deps.get, compile, assets.deploy
Common Start Commands:
mix phx.server
elixir --name myapp -S mix phx.server
Popular Frameworks:
Example Configuration:
type: web
name: elixir-app
runtime: elixir
buildCommand: mix deps.get --only prod && mix compile
startCommand: mix phx.server
runtime: docker)Build your application from a Dockerfile in your repository.
Additional Configuration:
dockerfilePath: Path to Dockerfile (default: ./Dockerfile)dockerContext: Build context directory (default: .)Example Configuration:
type: web
name: docker-app
runtime: docker
dockerfilePath: ./Dockerfile
dockerContext: .
Multi-stage Dockerfile Example:
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY package*.json ./
RUN npm ci --only=production
EXPOSE 10000
CMD ["node", "dist/main.js"]
Best Practices:
package.json before source code (better caching).dockerignore to exclude unnecessary files$PORT environment variableruntime: image)Deploy pre-built Docker images from a container registry.
Additional Configuration:
image: Full image URL with tag or digestregistryCredential: Credentials for private registriesExample with Public Image:
type: web
name: prebuilt-app
runtime: image
image: ghcr.io/myorg/myapp:v1.2.3
Example with Private Registry:
type: web
name: private-app
runtime: image
image: myregistry.com/myapp:latest
registryCredential:
username: my-username
password:
sync: false # User provides in Dashboard
Use Cases:
runtime: static)Serve pre-built static files without a backend runtime. Files are served via CDN.
Additional Configuration:
staticPublishPath: Directory containing built files (e.g., ./dist, ./build)Common Build Commands by Framework:
React (Create React App):
npm ci && npm run build
# Outputs to: ./build
Vue:
npm ci && npm run build
# Outputs to: ./dist
Next.js (Static Export):
npm ci && npm run build && npm run export
# Outputs to: ./out
Gatsby:
npm ci && npm run build
# Outputs to: ./public
Vite:
npm ci && npm run build
# Outputs to: ./dist
Example Configuration:
type: web
name: react-app
runtime: static
buildCommand: npm ci && npm run build
staticPublishPath: ./build
| Runtime | Build Speed | Cold Start | Best For | |---------|-------------|------------|----------| | Node.js | Fast | Fast | APIs, full-stack apps | | Python | Medium | Medium | Data apps, APIs, web | | Go | Fast | Very Fast | High performance APIs | | Ruby | Slow | Medium | Rails apps, traditional web | | Rust | Very Slow | Very Fast | Performance-critical services | | Elixir | Medium | Fast | Real-time, concurrent apps | | Docker | Varies | Medium | Any language, custom setup | | Static | Very Fast | N/A | SPAs, documentation, marketing |
Choose Node.js when:
Choose Python when:
Choose Go when:
Choose Ruby when:
Choose Rust when:
Choose Docker when:
Choose Static when: