apps/docs/src/content/docs/en/runners.mdx
import { TabItem, Tabs } from '@astrojs/starlight/components'
Customer Managed Compute enables you to use your own runner machines to run sandbox workloads. Runners are machines that power Daytona's compute plane and provide the underlying infrastructure. Each runner is responsible for:
Runners in shared and dedicated regions are fully managed by Daytona — from provisioning and maintenance to monitoring and scaling. For custom regions, you bring your own runner machines and are responsible for their management and operation.
Daytona provides two sets of runner management endpoints: custom runners (/runners) and admin operations (/admin/runners). While both support creating, listing, updating, and deleting runners, they serve different purposes and offer different levels of control.
Custom runner endpoints are scoped to your organization and support the X-Daytona-Organization-ID header. Admin endpoints operate across the entire platform and do not require an organization header.
Both Runner and RunnerFull share the same base fields, including resource metrics, allocated resources, availability score, snapshot count, and started sandboxes. The RunnerFull type extends Runner with the runner's apiKey and regionType fields.
Custom regions are created and managed by your organization, allowing you to use your own runner machines and scale compute resources independently within each region. This provides maximum control over data locality, compliance, and infrastructure configuration.
Additionally, custom regions have no limits applied for concurrent resource usage, giving you full control over capacity and performance.
name (required)
proxyUrl (optional)
sshGatewayUrl (optional)
snapshotManagerUrl (optional)
Daytona provides methods to create a custom region using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/regions \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-custom-region",
"proxyUrl": "https://proxy.example.com",
"sshGatewayUrl": "ssh://ssh-gateway.example.com",
"snapshotManagerUrl": "https://snapshot-manager.example.com"
}'
The response includes the region ID and credentials for any optional services you configured:
{
"id": "region_12345",
"proxyApiKey": "proxy-api-key-xyz",
"sshGatewayApiKey": "ssh-gateway-api-key-abc",
"snapshotManagerUsername": "daytona",
"snapshotManagerPassword": "generated-password"
}
For more information, see the API reference:
When you create a custom region, Daytona will provide credentials for any optional services you configure:
:::note If needed, these credentials can always be regenerated, but you will need to redeploy the corresponding services with the updated credentials. :::
Daytona provides methods to list all available regions for your organization using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/regions \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides methods to get the details of a specific region using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/regions/{regionId} \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides methods to update the configuration of an existing custom region using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/regions/{regionId} \
--request PATCH \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"proxyUrl": "https://new-proxy.example.com",
"sshGatewayUrl": "ssh://new-ssh-gateway.example.com",
"snapshotManagerUrl": "https://new-snapshot-manager.example.com"
}'
For more information, see the API reference:
Daytona provides methods to delete a custom region using the Daytona Dashboard ↗ or programmatically using the API. Regions that have runners assigned to them cannot be deleted.
curl https://app.daytona.io/api/regions/{regionId} \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an API to regenerate the proxy API key for a custom region.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/regions/{regionId}/regenerate-proxy-api-key \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an API to regenerate the SSH gateway API key for a custom region.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/regions/{regionId}/regenerate-ssh-gateway-api-key \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an API to regenerate the snapshot manager credentials for a custom region.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/regions/{regionId}/regenerate-snapshot-manager-credentials \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Custom runners are created and managed by your organization, allowing you to use your own runner machines and scale compute resources independently within each custom region.
name (required)
regionId (required)
Daytona provides methods to create a custom runner using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/runners \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-custom-runner",
"regionId": "region_12345"
}'
Upon creating a runner, you will be presented with a secure token that you can use to authenticate the runner with the Daytona control plane. The response includes the runner ID and the API key token:
{
"id": "runner123",
"apiKey": "dtn_1234567890"
}
:::note Save this token securely. You won't be able to see it again. :::
For more information, see the API reference:
Daytona provides methods to list all runners in your organization using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/runners \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides methods to get the details of a specific runner using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/runners/{runnerId} \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides methods to update the scheduling status of a runner using the Daytona Dashboard ↗ or programmatically using the API. This allows you to mark a runner as unschedulable, preventing new sandboxes from being assigned to it.
curl https://app.daytona.io/api/runners/{runnerId}/scheduling \
--request PATCH \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides methods to delete a custom runner using the Daytona Dashboard ↗ or programmatically using the API.
curl https://app.daytona.io/api/runners/{runnerId} \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Admin runners operate across the entire platform. They do not require the X-Daytona-Organization-ID header and return RunnerFull objects with additional apiKey and regionType fields.
name (required)
regionId (required)
apiKey (required)
apiVersion (required)
0 or 2domain (optional)
apiUrl (optional)
proxyUrl (optional)
cpu (optional)
memoryGiB (optional)
diskGiB (optional)
Daytona provides an admin API to create a runner with full configuration, including resource capacity and network settings. Unlike the custom runner endpoint, you must provide your own apiKey and specify the apiVersion (0 or 2).
curl https://app.daytona.io/api/admin/runners \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-custom-runner",
"regionId": "region_12345",
"apiKey": "dtn_1234567890",
"apiVersion": "2",
"domain": "runner1.example.com",
"apiUrl": "https://api.runner1.example.com",
"proxyUrl": "https://proxy.runner1.example.com",
"cpu": 8,
"memoryGiB": 16,
"diskGiB": 100
}'
For more information, see the API reference:
Daytona provides an admin API to list all runners with full details, including resource usage metrics. You can optionally filter runners by region.
<Tabs> <TabItem label="API" icon="seti:json"># List all runners
curl https://app.daytona.io/api/admin/runners \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
# Filter runners by region
curl 'https://app.daytona.io/api/admin/runners?regionId=region_12345' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an admin API to get full runner details, including resource usage and allocation metrics.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/admin/runners/{runnerId} \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an admin API to update the scheduling status of a runner.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/admin/runners/{runnerId}/scheduling \
--request PATCH \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
Daytona provides an admin API to delete a runner.
<Tabs> <TabItem label="API" icon="seti:json">curl https://app.daytona.io/api/admin/runners/{runnerId} \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
For more information, see the API reference:
After registering a custom runner and obtaining its secure token, install and configure the Daytona runner application on your infrastructure. Daytona provides official Terraform modules and Helm charts for automated runner deployment.
Daytona provides a Terraform module for deploying runners on AWS EC2 with automated installation and configuration. The module handles instance provisioning, security configuration, and runner registration with the Daytona platform.
View the full documentation and examples in the GitHub repository:
module "daytona_runner" {
source = "./runner"
# Network Configuration
vpc_id = "vpc-1234567890abcdef0"
subnet_id = "subnet-1234567890abcdef0"
# EC2 Configuration
ami_id = "ami-0c55b159cbfafe1f0" # Ubuntu 22.04 LTS
instance_type = "t3.medium"
# Daytona Configuration
api_url = "https://daytona.example.com/api"
api_key = "your-api-key-here"
region_id = "your-region-id"
# Optional: Enable SSM for secure access
enable_ssm = true
tags = {
Environment = "production"
ManagedBy = "terraform"
}
}
module "daytona_runner" {
source = "./runner"
name_prefix = "production"
# Network Configuration
vpc_id = "vpc-1234567890abcdef0"
subnet_id = "subnet-1234567890abcdef0"
# EC2 Configuration
ami_id = "ami-0c55b159cbfafe1f0"
instance_type = "t3.large"
root_volume_size = 100
root_volume_type = "gp3"
# Daytona Configuration
api_url = "https://api.daytona.example.com"
api_key = var.api_key # Use variable for sensitive data
region_id = var.region_id
# Security Configuration
enable_ssh = true
ssh_cidr_blocks = ["10.0.0.0/8"]
key_name = "my-ssh-key"
enable_ssm = true
tags = {
Environment = "production"
Team = "platform"
ManagedBy = "terraform"
}
}
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
vpc_id | VPC ID where the runner will be deployed | string | - | yes |
subnet_id | Subnet ID where the runner will be deployed | string | - | yes |
ami_id | AMI ID for the EC2 instance | string | - | yes |
api_url | Daytona API URL | string | - | yes |
api_key | Daytona API key | string | - | yes |
region_id | Daytona region ID | string | - | yes |
name_prefix | Prefix for resource names | string | "daytona" | no |
runner_name | Name for the runner (used in API registration) | string | null | no |
runner_version | Daytona runner version | string | "0.125.0-rc1" | no |
instance_type | EC2 instance type | string | "t3.medium" | no |
key_name | SSH key pair name | string | null | no |
root_volume_type | Root volume type | string | "gp3" | no |
root_volume_size | Root volume size in GB | number | 50 | no |
poll_timeout | Job polling timeout | string | "30s" | no |
poll_limit | Job polling limit | number | 10 | no |
enable_ssh | Enable SSH access | bool | false | no |
ssh_cidr_blocks | CIDR blocks for SSH access | list(string) | [] | no |
enable_ssm | Enable SSM Session Manager | bool | true | no |
additional_security_group_ids | Additional security group IDs to attach | list(string) | [] | no |
ingress_security_group_ids | Security group IDs allowed to access port 8080 | map(string) | {} | no |
additional_iam_policy_arns | Additional IAM policy ARNs to attach | list(string) | [] | no |
custom_iam_policy | Custom IAM policy document (JSON) | string | null | no |
user_data_append | Additional user data script to run after init | string | null | no |
tags | Additional tags | map(string) | {} | no |
| Name | Description |
|---|---|
| runner_id | Daytona runner ID |
| runner_name | Daytona runner name |
| instance_id | ID of the EC2 instance |
| instance_private_ip | Private IP address of the instance |
| instance_public_ip | Public IP address of the instance |
| security_group_id | ID of the security group |
| iam_role_arn | ARN of the IAM role |
| iam_role_name | Name of the IAM role |
api_key is marked as sensitive. Use Terraform variables or a secrets manager.# No SSH key required
aws ssm start-session --target <instance-id>
# Check runner status
sudo systemctl status daytona-runner
# View logs
sudo journalctl -u daytona-runner -f
ssh -i ~/.ssh/your-key.pem ubuntu@<instance-ip>
Troubleshoot cloud-init issues:
# View cloud-init output
sudo cat /var/log/cloud-init-output.log
# Check cloud-init status
sudo cloud-init status
Troubleshoot runner issues:
# Service status
sudo systemctl status daytona-runner
# Service logs
sudo journalctl -u daytona-runner -n 100 --no-pager
# Check configuration
sudo cat /etc/daytona/runner.env
Verify runner installation:
# Check if binary exists
ls -la /opt/daytona/runner
# Check binary permissions
file /opt/daytona/runner
Daytona provides a Helm chart for deploying custom regions and their supporting infrastructure on Kubernetes. The daytona-region chart deploys a proxy service, optional snapshot manager, and a registration job, allowing you to run Daytona sandboxes within your own Kubernetes cluster.
View the full documentation and examples in the GitHub repository:
curl -sSL https://download.daytona.io/install.sh | sudo bash
The script will prompt you for:
Check status:
sudo systemctl status daytona-runner
View logs:
sudo tail -f /var/log/daytona-runner.log
Stop service:
sudo systemctl stop daytona-runner
The following environment variables can be set to override the default values in the install script:
:::tip Set these variables before running the install script to customize the runner configuration. :::
| Variable name | Description | Default value / notes |
|---|---|---|
CONTAINER_RUNTIME | Container runtime to use | sysbox-runc |
API_TOKEN | API token for runner | Auto-generated or user-provided |
TLS_CERT_FILE | Path to TLS certificate file | /etc/letsencrypt/live/$DOMAIN/fullchain.pem |
TLS_KEY_FILE | Path to TLS key file | /etc/letsencrypt/live/$DOMAIN/privkey.pem |
ENABLE_TLS | Enable TLS for runner | false |
API_PORT | Port for runner API | 3000 |
LOG_FILE_PATH | Path to runner log file | /var/log/daytona-runner.log |
LOG_LEVEL | Log level | info |
AWS_ENDPOINT_URL | AWS S3 endpoint URL | https://s3.us-east-1.amazonaws.com |
AWS_ACCESS_KEY_ID | AWS access key ID | (empty) |
AWS_SECRET_ACCESS_KEY | AWS secret access key | (empty) |
AWS_REGION | AWS region | us-east-1 |
AWS_DEFAULT_BUCKET | AWS S3 bucket name | daytona |
SSH_GATEWAY_ENABLE | Enable SSH gateway | true or false (auto-detected) |
SSH_PUBLIC_KEY | SSH gateway public key | Fetched from API |
SSH_HOST_KEY_PATH | Path to SSH host key | /etc/ssh/ssh_host_rsa_key |
SERVER_URL | Daytona API URL | User-provided |