Skip to content

Targets

A Target refers to the specific destination or environment where your development setups, facilitated by various Providers, are deployed and managed. Providers define the method and technology used to create your environments, while Targets specify the precise location or platform where these environments will reside.

A Target can be a local machine, a remote server, or a cloud instance, and it can vary based on the chosen Provider. Targets offer the flexibility to deploy and manage environments across different platforms and accounts, all within the unified interface provided by Daytona.

Once you set your Target, it becomes available for selection whenever you create a new development environment in Daytona. You can manage multiple Targets or delete those you no longer need.

Set a Target

Daytona allows you to set a Target to use when managing Workspaces.

Prerequisite

  • At least one Provider installed.

    Providers are essential for managing and deploying your Workspaces, so make sure you have configured at least one.

  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select the appropriate Provider for the environment you want to deploy to.
Choose a provider
4 items
===
aws-provider
v0.0.0
digitalocean-provider
v0.0.0
fly-provider
v0.0.0
docker-provider
v0.0.0
  1. Select New Target.
  2. Enter a name for your Target.
  3. Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider. The following example shows setting a remote Docker Target.
Name
>
Remote Hostname
>
Remote Password
>
Remote Port
>
Remote User
Note: non-root user required
>
Sock Path
> /var/run/docker.sock
Workspace Data Dir
The directory on the remote host where the workspace data will be stored
> /tmp/daytona-data
Remote Private Key Path
daytona_config
known_hosts
Custom path
None
  1. Click Enter to confirm setting the Target.
Target set successfully

List Targets

Daytona allows you to keep track of your Targets by listing all previously created Targets with their details.

  1. Run the following command to list currently set Targets:
Terminal window
daytona target list

Upon running this command, Daytona will display a list of your Targets with their details. You will be able to see the Target name, the Provider it is connected to, and its configured options.

Target Provider Options
───────────────────────────────────────────────────────────────────────
MyTarget docker-provider {
"Sock Path": "/var/run/docker.sock"
}

Delete a Target

Daytona allows you to delete Targets, helping you manage and remove those that are no longer needed. Once a Target is deleted, you will not be able to manage or deploy Workspaces on that Target.

  1. Run the following command:
Terminal window
daytona target delete

Upon running this command, Daytona will display a list of your Targets with their details. You will be able to see the Target name, the unique identifier of the Workspace, and the repository it is connected to.

  1. Press Enter on the selected Target to delete it.
Choose a Target
1 item
===
MyTarget
docker-provider
  1. Confirm the action.
Delete all workspaces within MyTarget?
You might not be able to easily remove these workspaces later.
[Yes] [No]
Target MyTarget removed successfully

Docker (Local)

Daytona allows you to set a local Docker Target to use for deploying and managing Workspaces. The local Docker Target enables you to deploy Workspaces on your local machine using Docker.


  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select docker-provider to use the Docker Provider.
Choose a provider
1 item
===
docker-provider
v0.0.0
  1. Select local to set a local Docker Target.
Choose a Target
1 item
===
local
docker-provider
  1. Enter a name for your Target.
  2. Enter the appropriate configuration options when prompted.
Sock Path
> /var/run/docker.sock
  1. Click Enter to confirm setting the Target.
Target set successfully

Docker (Remote)

Daytona allows you to set a remote Docker Target to use for deploying and managing Workspaces. The remote Docker Target enables you to deploy Workspaces on a remote machine using Docker.


  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select docker-provider to use the Docker Provider.
Choose a Provider
1 item
===
docker-provider
v0.0.0
  1. Select New Target to set a remote Docker target.
Choose a Target
1 item
===
+ New Target
  1. Enter a name for your Target.
  2. Enter the appropriate configuration options when prompted.
Name
>
Remote Hostname
>
Remote Password
>
Remote Port
>
Remote User
Note: non-root user required
>
Sock Path
> /var/run/docker.sock
Workspace Data Dir
The directory on the remote host where the workspace data will be stored
> /tmp/daytona-data
Remote Private Key Path
daytona_config
known_hosts
Custom path
None
  1. Click Enter to confirm setting the Target.
Target set successfully

AWS

Daytona allows you to set an AWS Target to use for deploying and managing Workspaces.

  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select aws-provider to use the AWS Provider.
Choose a provider
1 item
===
aws-provider
v0.0.0
  1. Select New Target.
  2. Enter a name for your Target.
  3. Enter the appropriate configuration options when prompted.
The type of instance to launch. Default is t2.micro.
List of available instance types https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/i
>
Region
The geographic area where AWS resources are hosted. Default is us-east-1.
List of available regions https://docs.aws.amazon.com/general/latest/gr/rande.html
>
Secret Access Key
Find this in the AWS Console under "My Security Credentials" (https://aws.amazon.com/premiumsupport/knowledge-center/manage-access-keys/).
Leave blank if you've set the AWS_SECRET_ACCESS_KEY environment variable, or enter your key here.
>
Volume Size
The size of the instance volume, in GB. Default is 20 GB.
It is recommended that the disk size should be more than 20 GB.
List of volume size limits: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html
>
Volume Type
The type of volume. Default is gp3.
List of available volume types https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html
>
  1. Click Enter to confirm setting the Target.
Target set successfully

DigitalOcean

Daytona allows you to set a DigitalOcean Target to use for deploying and managing Workspaces.

  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select digitalocean-provider to use the DigitalOcean Provider.
Choose a provider
1 item
===
digitalocean-provider
v0.0.0
  1. Select New Target.
  2. Enter a name for your Target.
  3. Enter the appropriate configuration options when prompted.
Auth Token
If empty, token will be fetched from the DIGITALOCEAN_ACCESS_TOKEN environment variable.
>
Disk Size
>
Image
>
Region
>
Size
>
  1. Click Enter to confirm setting the Target.
Target set successfully

Fly

Daytona allows you to set a DigitalOcean Target to use for deploying and managing Workspaces.

  1. Run the following command to set a Target:
Terminal window
daytona target set
  1. Select fly-provider to use the Fly Provider.
Choose a provider
1 item
===
fly-provider
v0.0.0
  1. Select New Target.
  2. Enter a name for your Target.
  3. Enter the appropriate configuration options when prompted.
Auth Token
If empty, token will be fetched from the FLY_ACCESS_TOKEN environment variable.
>
Disk Size
The size of the disk in GB.
>
Org Slug
The organization name to create the fly machine in.
>
Region
The region where the fly machine resides. If not specified, near region will be used.
>
Size
The size of the fly machine. Default is shared-cpu-4x.
List of available sizes https://fly.io/docs/about/pricing/#started-fly-machines
>
  1. Click Enter to confirm setting the Target.
Target set successfully