Skip to content
GitHub

Render

Deploy sandboxes on Render with ComputeSDK

Section titled “Deploy sandboxes on Render with ComputeSDK”

Deploy and manage containerized sandboxes on Render’s infrastructure with ComputeSDK.


Render is a unified cloud platform that makes it easy to build and run applications. With ComputeSDK’s Render provider, you can self-host your own sandbox execution environment with zero infrastructure setup.


Prerequisites:



Install the ComputeSDK package in your application:

npm install computesdk

Add your credentials to a .env file:

# ComputeSDK credentials
COMPUTESDK_API_KEY=your_computesdk_api_key

# Render credentials
RENDER_API_KEY=your_render_api_key
RENDER_OWNER_ID=your_render_owner_id

ComputeSDK auto-detects Render as your provider from the environment variables:

import { compute } from 'computesdk';

// Create a new sandbox
const sandbox = await compute.sandbox.create();
console.log(`Sandbox created: ${sandbox.sandboxId}`);

// Get sandbox info
const info = await sandbox.getInfo();
console.log(`Sandbox status: ${info.status}`);

// Clean up when done
await sandbox.destroy();

Your sandboxes are now running on your self-hosted Render infrastructure!


Explicit provider configuration (optional)

Section titled “Explicit provider configuration (optional)”

If you prefer to configure the provider programmatically—useful for multi-provider setups or dynamic configuration—pass credentials directly:

import { compute } from 'computesdk';

compute.setConfig({
   computesdkApiKey: process.env.COMPUTESDK_API_KEY,
   provider: 'render',
   render: {
     apiKey: process.env.RENDER_API_KEY,
     ownerId: process.env.RENDER_OWNER_ID
   }
});

const sandbox = await compute.sandbox.create();

The Render provider accepts the following configuration options:

OptionEnvironment VariableRequiredDescription
apiKeyRENDER_API_KEYYesYour Render API key
ownerIdRENDER_OWNER_IDYesYour Render account Owner ID
interface RenderConfig {
  /** Render API key - if not provided, uses RENDER_API_KEY env var */
  apiKey?: string;
  /** Render Owner ID - if not provided, uses RENDER_OWNER_ID env var */
  ownerId?: string;
}