Render private services

From fanfan-de/anybox · View interactive version

Render private services is an AI agent skill from the GitHub repository fanfan-de/anybox. Configures Render private services—internal-only apps that accept traffic exclusively from other Render services over the private network. Use when the user needs an internal API, microservice, gRPC server, sidecar, or any service that should not be publicly accessible. Also use when choosing betwee

How to use this skill

Skill file

Render Private Services

Private services are identical to web services except they have no public URL. They are reachable only by other Render services on the same private network (same region + workspace). Use them for internal APIs, microservices, gRPC servers, sidecar processes, and anything that should never face the internet.

When to Use

For public-facing HTTP services, use render-web-services. For services that don't receive any traffic, use render-background-workers.

Private Service vs Background Worker

| Criterion | Private Service | Background Worker |

|-----------|----------------|-------------------|

| Binds to a port | Yes (required) | No |

| Receives private network traffic | Yes | No |

| Sends outbound traffic | Yes | Yes |

| Has internal hostname | Yes | No |

| Use case | Internal APIs, gRPC, TCP servers | Queue consumers, async processors |

Rule of thumb: If the process listens on a port and other services call it, it's a private service. If it pulls work from a queue and never receives requests, it's a background worker.

How Private Services Work

Connecting to a Private Service

Other services reference a private service via its internal hostname and port:

http://<service-name>:<port>

In Blueprints, wire the address using fromService:

- key: INTERNAL_API_URL
  fromService:
    name: my-api
    type: pserv
    property: hostport

Available fromService properties for pserv:

| Property | Value |

|----------|-------|

| host | Internal hostname (e.g. my-api) |

| port | Port the service listens on |

| hostport | host:port combined (e.g. my-api:10000) |

You can also reference a specific env var from the private service using envVarKey instead of property.

Port Binding

Private services must bind to at least one port. If your process does not need to receive traffic, create a background worker instead.

Blueprint Configuration

services:
  - type: pserv
    name: internal-api
    runtime: node
    region: oregon
    plan: starter
    buildCommand: npm ci && npm run build
    startCommand: npm start
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: db
          property: connectionString

Microservices pattern (gateway + internal services)

services:
  - type: web
    name: gateway
    runtime: node
    plan: starter
    region: oregon
    buildCommand: npm ci && npm run build
    startCommand: npm start
    envVars:
      - key: USER_SERVICE_URL
        fromService:
          name: user-service
          type: pserv
          property: hostport
      - key: BILLING_SERVICE_URL
        fromService:
          name: billing-service
          type: pserv
          property: hostport

  - type: pserv
    name: user-service
    runtime: node
    plan: starter
    region: oregon
    buildCommand: npm ci
    startCommand: node server.js
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: db
          property: connectionString

  - type: pserv
    name: billing-service
    runtime: python
    plan: starter
    region: oregon
    buildCommand: pip install -r requirements.txt
    startCommand: gunicorn billing:app
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: db
          property: connectionString

References

| Document | Contents |

|----------|----------|

| references/patterns.md | Microservice topology, gRPC setup, sidecar patterns, health checks for private services |

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.