Render.com Basics Cheat Sheet
Deploy web services, static sites, and databases on Render using render.yaml blueprints, environment groups, and the CLI.
Render CLI Basics
Install and use the Render CLI to inspect and manage services.
brew install render # Install CLI (macOS)render login # Authenticaterender services # List services in your workspacerender deploys create <service-id> # Trigger a new deployrender logs <service-id> --tail # Stream live logsrender ssh <service-id> # SSH into a running instance (paid plans)render psql <database-id> # Open a psql shell to a Render Postgres DB
render.yaml Blueprint
Define infrastructure as code for multi-service apps.
services: - type: web name: my-api env: node plan: free buildCommand: npm install && npm run build startCommand: npm start envVars: - key: NODE_ENV value: production - key: DATABASE_URL fromDatabase: name: my-db property: connectionStringdatabases: - name: my-db plan: free databaseName: myapp user: myapp_user
Health Check Endpoint
Expose a route Render polls to verify your service is alive.
// Express example — configure the path in the dashboard// or render.yaml as `healthCheckPath: /healthz`app.get('/healthz', (req, res) => { res.status(200).send('ok');});
Core Concepts
Key Render service types and deployment behavior.
- Web Service- long-running process bound to a port, auto-deployed on git push
- Static Site- prebuilt frontend assets served from Render's global CDN, free SSL included
- Background Worker- runs continuously with no exposed HTTP port, ideal for queue consumers
- Cron Job- runs a command on a schedule defined by a standard cron expression
- Private Service- reachable only from other services in the same Render private network
- Environment Groups- shared sets of env vars that can be linked across multiple services
- Zero-downtime deploys- new instance is health-checked before traffic is switched over on paid plans
Docker-based Service
Deploy a service from a Dockerfile instead of Render's native buildpacks.
services: - type: web name: my-docker-api env: docker dockerfilePath: ./Dockerfile dockerContext: . plan: standard healthCheckPath: /healthz autoDeploy: true envVars: - key: NODE_ENV value: production
Persistent Disk
Attach a durable disk to a service for state that must survive restarts (e.g. SQLite, uploads).
services: - type: web name: file-store-api env: node plan: standard disk: name: uploads mountPath: /var/data/uploads sizeGB: 10 # Note: disks pin the service to a single non-scalable instance; # they are not shared across horizontally scaled instances.
Deploy Hook & API Trigger
Trigger a deploy from an external CI system using a deploy hook URL or the Render REST API.
# Deploy hook (created in dashboard -> Settings -> Deploy Hook)curl -X POST "https://api.render.com/deploy/srv-xxxx?key=yyyy"# REST API deploy trigger (needs an API key)curl -X POST "https://api.render.com/v1/services/srv-xxxx/deploys" \ -H "Authorization: Bearer $RENDER_API_KEY" \ -H "Content-Type: application/json" \ -d '{"clearCache": "do_not_clear"}'
Private Network Service-to-Service Call
Call another Render service over the internal network using its private hostname instead of the public URL.
// Services in the same Render private network reach each other at// http://<service-name>:<port> — no public egress, no TLS overheadconst res = await fetch('http://internal-worker:10000/jobs', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ task: 'resize-image', id: 42 }),});
Advanced Operations
Production-readiness features beyond the basic web-service/database setup.
- Preview Environments- spin up a full ephemeral copy of every service in a `render.yaml` per pull request via `previewsEnabled: true`
- Autoscaling- `scaling: { minInstances, maxInstances, targetCPUPercent }` on standard+ plans adds/removes instances by load
- Secret Files- mount file-based secrets (e.g. service account JSON) at a path without exposing them as env vars
- Env Var Groups- `envVarGroups` in render.yaml define shared var sets referenced by name across services for DRY config
- Maintenance Mode- serve a static maintenance page instantly without tearing down the underlying service
- Custom Domains + Auto TLS- Render provisions and renews Let's Encrypt certs automatically once a CNAME/A record is verified
- Blueprint sync- `render.yaml` changes pushed to the repo are diffed and applied to live infra on the next deploy, keeping IaC and reality in sync
Free-tier web services on Render spin down after 15 minutes of inactivity and take ~30-60 seconds to cold-start on the next request — use a paid instance type or an external uptime pinger if you need consistently fast response times.