Deployment Details
Use this reference for service discovery, configuration patterns, quick commands, and common issues.
Service Discovery
List all services:
list_services()Returns all services with IDs, names, types, and status.
Get specific service details:
get_service(serviceId: "<id>")Returns full configuration including environment variables and build/start commands.
List PostgreSQL databases:
list_postgres_instances()List Key-Value stores:
list_key_value()Configuration Details
Environment Variables
All environment variables must be declared in render.yaml.
Three patterns for environment variables:
- Hardcoded values (non-sensitive configuration):
envVars:
- key: NODE_ENV
value: production
- key: API_URL
value: https://api.example.com- Database connections (auto-generated):
envVars:
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: REDIS_URL
fromDatabase:
name: redis
property: connectionString- Secrets (user fills in Dashboard):
envVars:
- key: JWT_SECRET
sync: false
- key: API_KEY
sync: false
- key: STRIPE_SECRET_KEY
sync: falseComplete environment variable guide: configuration-guide.md
Port Binding
CRITICAL: Web services must bind to 0.0.0.0:$PORT (NOT localhost). Render sets the PORT environment variable.
Node.js Example:
const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => {
console.log(`Server running on port ${PORT}`);
});Python Example:
import os
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)Go Example:
port := os.Getenv("PORT")
if port == "" {
port = "3000"
}
http.ListenAndServe(":"+port, handler)Plan Defaults
Use plan: free unless the user specifies otherwise. Refer to Render pricing for current limits and capacity.
Build Commands
Use non-interactive flags to prevent build hangs:
- npm:
npm ci - yarn:
yarn install --frozen-lockfile - pnpm:
pnpm install --frozen-lockfile - bun:
bun install --frozen-lockfile - pip:
pip install -r requirements.txt - uv:
uv sync - apt:
apt-get install -y <package> - bundler:
bundle install --jobs=4 --retry=3
Database Connections
When services connect to databases in the same Render account, use fromDatabase references for internal URLs.
Health Checks
Optional but recommended: add a /health endpoint for faster deployment detection.
Quick Reference
MCP Tools (Preferred)
# Service Discovery
list_services()
get_service(serviceId: "<id>")
list_postgres_instances()
list_key_value()
# Service Creation
create_web_service(name, runtime, buildCommand, startCommand, ...)
create_static_site(name, buildCommand, publishPath, ...)
create_cron_job(name, runtime, schedule, buildCommand, startCommand, ...)
create_postgres(name, plan, region)
create_key_value(name, plan, region)
# Environment Variables
update_environment_variables(serviceId, envVars: [{key, value}, ...])
# Deployment & Monitoring
list_deploys(serviceId, limit)
list_logs(resource: ["<id>"], level: ["error"])
get_metrics(resourceId, metricTypes: [...])
# Workspace
get_selected_workspace()
list_workspaces()CLI Commands
# Validate Blueprint
render blueprints validate
# Check workspace
render workspace current -o json
render workspace set
# List services
render services -o json
# View deployment logs