Getting Started
Welcome to Daytona! This guide will help you get started with Daytona, an open-source Development Environment Manager (DEM) designed to simplify the creation, management, and deployment of development environments.
Understanding Daytona
Daytona is an open-source Development Environment Manager (DEM) licensed under the Apache License 2.0. Daytona allows you to manage and deploy Workspaces — reproducible development environments based on standard OCI containers, with built-in support for the Dev Container standard.
Before You Begin
Before installing and using Daytona, ensure that your operating system meets the necessary requirements, dependencies and tools.
System requirements
Daytona supports multiple operating systems and architectures. Ensure your system matches one the following specifications:
Operating System | Architecture |
---|---|
Linux | x86_64 or ARM64 |
macOS | x86_64 (Intel-based) or ARM64 (Apple Silicon) |
Windows | x86_64 or ARM64 |
Dependencies
Daytona requires specific dependencies to be installed on your system to support the operation and management of development environments. Ensure these dependencies are installed and properly configured on your system:
Dependency | Description |
---|---|
Docker | Daytona uses Docker to create and manage isolated development environments. |
Administrator Privileges | Ensure that you have the necessary permissions to install and configure Daytona on your system. |
Tools
Daytona requires certain tools to be installed on your system to optimize the setup and management of development environments. Ensure these tools are installed and properly configured on your system:
Tool | Description |
---|---|
Text Editor / IDE | Recommended for editing configuration files and working with code within Daytona Workspaces. |
SSH Client | Required for accessing remote servers, especially if deploying Workspaces on a remote Docker installation or accessing remote Git repositories. |
Installing Daytona
Follow the instructions provided in the installation guide to install Daytona on your operating system. The guide includes detailed steps for installing Daytona on Linux, macOS, and Windows operating systems.
The installation process may vary depending on your operating system and specific environment. Refer to the guide for comprehensive instructions tailored to your setup.
Once you have completed the installation, you will be ready to start using Daytona to manage and develop your development environments. If you encounter any issues during installation, consult by reaching out to Daytona’s Slack community for assistance.
Using the CLI
The Daytona Command-Line Interface (CLI) is the primary method of interacting with the Daytona platform. The CLI provides a comprehensive set of commands that allow you to manage Workspaces, Providers, and other system configurations.
To access the Daytona CLI, open your terminal and use the daytona
command followed by the desired subcommand. The CLI offers a wide range of commands, each serving a specific purpose, such as creating Workspaces, managing Providers, setting Targets, and configuring system settings.
For a complete list of available commands and their descriptions, refer to the CLI Reference. This reference guide provides detailed information on each command, including usage examples and command options, helping you leverage the full potential of the Daytona CLI.
Use the daytona --help
command to list all commands, offering a convenient way to explore available options.
Adding a Git Provider
Daytona provides an option to integrate your preferred Git Provider, enhancing your development workflow. This integration enables you to access and manage your repositories directly within Daytona, simplifying workspace creation from existing projects.
Daytona supports a variety of Git Providers, including GitHub, GitLab, Bitbucket, GitHub Enterprise Server, GitLab Self-Managed, Bitbucket Server, Codeberg, Gitea, Gitness, Azure DevOps, AWS CodeCommit, Gogs and Gitee.
- Run the following command to add a Git Provider:
daytona git-providers add
-
Select the Git Provider you want to add from the list.
-
Enter your Git Provider credentials for Daytona to authenticate and enable secure access to your repositories.
Upon successful authentication, Daytona will register the Git Provider, allowing you to interact with your repositories directly from Daytona.
Git provider has been registered
You can install additional Git Providers to manage multiple repositories across different platforms and accounts.
Use the daytona git-providers --help
command to view available options for managing your Git Provider configurations and interacting with your repositories.
Installing a Provider
Providers are plugins through which Daytona integrates with various technologies to create and manage development environments. Providers abstract complexities of underlying technologies and serve as the foundational engines that Daytona leverages to deploy and run your environments, whether through containerization, orchestration, or cloud-based virtual machines.
Daytona supports a variety of Providers, including Docker, DigitalOcean, AWS, Azure, GCP, Hetzner, and Fly
- Run the following command to install a Provider:
daytona provider install
- Select the Provider you want to install from the list.
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying development environments.
Provider <provider> has been successfully installed
You can install additional Providers to extend Daytona’s capabilities and support a wide range of container management platforms and cloud hosting services.
Creating a Target Configuration
A Target Configuration refers to the specific destination or environment where your development setup, facilitated by various Providers, is deployed and managed. Providers define the method and technology used to create your environments, while Targets Configurations specify the precise location or platform where these environments will reside.
A Target Configuration can be a local machine, a remote server, or a cloud instance, and it can vary based on the chosen Provider. Target Configurations offer the flexibility to deploy and manage environments across different platforms and accounts, all within the unified interface provided by Daytona.
Supported Target Configurations include Docker (Local), Docker (Remote), DigitalOcean, AWS, Azure, GCP, Hetzner, and Fly.
- Run the following command to create a Target Configuration:
daytona target-config create
-
Select the appropriate Provider for the environment you want to deploy to.
-
Enter a name for your Target Configuration.
-
Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider.
-
Click
Enter
to confirm adding the Target Configuration.
Target Config <target_config> created successfully
Use the daytona target-config --help
command to view available configuration options for setting a Target Configuration.
Setting a Container Registry
Container registries store credentials used to pull container images from specified registry servers. Adding container registry credentials is useful for users who want to create Workspaces from private images and those hosted on private registries.
- Run the following command to set a container registry environment variable:
daytona env set
-
Set the server environment variable key for the container registry.
-
Set the server environment variable value for the container registry.
-
Select whether to add another environment variable.
Upon selecting, Daytona will set the container registry environment variables for your Workspace.
Server environment variables have been set successfully
Use the daytona env --help
command to view available configuration options for setting environment variables.
Creating a Workspace Template
A Workspace Template is designed to simplify the management of development environments, allowing you to predefine settings that can be easily applied to any new Workspace.
A Workspace Template contains all necessary properties to define and manage Workspaces within a Workspace. It stores information such as the repository URL, build configuration, and environment variables. This allows for easy reuse of previously set templates, ensuring a consistent and reproducible setup across multiple Workspaces.
- Run the following command to add a Workspace Template:
daytona workspace-template add
- Select one of the two provided options available for creating a Workspace Template:
-
Enter a custom repository URL
An option to enter a custom repository URL manually if the repository is not listed under your Git Provider account or is from an external source.
-
Create from Sample
If you do not have a Git repository ready, you can create a Workspace Template from a Sample project provided by Daytona.
-
Enter the repository URL of the Workspace you want to configure, or select to create a Workspace Template from a sample project.
-
Enter a name for the Workspace Template.
-
Select the build configuration for the Workspace.
-
Enter the environment variables for the Workspace in the
KEY=VALUE
format.
Upon completion, Daytona will output a summary of the Workspace Template, enabling you to review the properties before saving it.
SUMMARY - Workspace Template
Workspace - MyWorkspaceRepository https://github.com/daytonaio/docsBranch mainBuild AutomaticImage daytonaio/workspace-project:latestUser daytona
- Click
Create
to save the Workspace Template, orConfigure
to make changes to the Workspace Template.
Workspace template <workspace_template> added successfully
Use the daytona workspace-template --help
command to view available configuration options for creating a Workspace Template.
Setting a Target
A Target is an isolated processing unit where Workspaces are executed. It can operate on various infrastructures, including cloud-based and on-premises environments. Targets provide the necessary compute resources and meet security requirements within the defined infrastructure.
- Run the following command to create a Target:
daytona target create
-
Select the Target Configuration to use for the Target.
-
Select the Provider for the environment you want to deploy to.
-
Enter a name for your Target.
-
Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider.
✓ Request submittedCreating target <target_name>
You can set additional Targets for different development environments, allowing you to manage and switch between them as needed.
Use the daytona target --help
command to view available configuration options for setting a Target.
Creating a Runner
A Runner is a standalone service that can be deployed anywhere. The user can deploy a Runner on a target system by executing a set of instructions and commands generated upon Runner registration.
- Run the following command to create a new Runner:
daytona server runner create
Upon running the command, Daytona will generate a code snippet containing the server API URL and API key required to deploy the Runner on the target system.
- Paste the code snippet into the target system’s terminal and execute it to configure the Runner.
Choosing the Default IDE
Connect to your development environment using a variety of IDEs, including popular options like Visual Studio Code (VSCode), Visual Studio Code Insiders, VSCodium, JetBrains IDEs, Jupyter, Zed, Cursor, Windsurf, and Terminal SSH.
By setting the default IDE, you can automatically open your development environment in your preferred environment, optimizing your workflow and reducing setup time.
- Run the following command to set the default IDE:
daytona ide
- Select your preferred IDE from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
Default IDE: <IDE>
Use the daytona code
command to automatically open the default IDE already connected to your Workspace.
You can choose additional IDEs and set them as the default for your development environments.
Use the daytona ide --help
command to view available configuration options for the IDE.
Creating your Workspace
Create a Workspace using Daytona to manage your development environments. A Workspace represents an isolated development environment where you can manage your code, build projects, and interact with your team.
To create a Workspace, use the daytona create
command and follow the prompts to configure your Workspace settings. Once created, you can access your Workspace and interact with your codebase.
- Run the following command to start the guided Workspace creation process:
daytona create
- Select one of the three provided options:
- Select from a List of Repositories
- Enter a Custom Repository URL
- Create from Sample
-
Select the Git repository from the list, enter the URL of the Git repository you want to link with your Workspace, or choose to create a Workspace from a sample project.
-
Enter a name for your Workspace.
-
Select a Target to deploy your Workspace to. Selecting a Target will prompt you to input the Target Configuration. The configurations vary based on the selected Target.
Upon Target selection and configuration, Daytona will clone the specified Git repository and set up a new Workspace based on its contents. You will see progress information in the terminal, indicating the process of creating a Workspace.
<Target> | ✓ Request submitted<Workspace> | Creating workspace <workspace> (<workspace_id>)<Workspace> | Pulling image...<Workspace> | Pulling from daytonaio/workspace-project<Workspace> | Digest: sha256:<sha256><Workspace> | Status: Image is up to date for daytonaio/workspace-project:latest<Workspace> | ✓ Image pulled successfully<Workspace> | UIDs and GIDs are the same (1000:1000).<Workspace> | Cloning into '/workdir/<workspace>'...<Workspace> | UIDs and GIDs are the same (1000:1000).<Workspace> | ✓ Workspace <workspace> created
Use the daytona create --help
command to view available configuration options for creating a Workspace.
Interact with your Workspace
The Agent Toolbox enables you to interact with the Workspace programmatically by providing a Workspace Toolbox API to perform various operations within the Workspace environment.
The Workspace Toolbox API provides file system, Git, and process operations, allowing you to manage files, execute Git commands, and run processes within the Workspace.