---
title: Architecture
description: Learn about the architecture of Daytona and its components.
---
Daytona architecture diagram represents the Daytona platform, featuring components and services available in its [Open Source](#open-source) and [Enterprise](#enterprise) distributions. Daytona Open Source is designed to provide core functionality for development, while Daytona Enterprise builds on this foundation with enhanced features tailored for larger organizations, including authentication, authorization, dashboard, observability capabilities, and resource management.
## Open Source
Daytona Open Source includes the [Daytona API](/docs/tools/api), which serves as the central interface for programmatically interacting with Daytona. The Open Source version provides a comprehensive set of features and tools to manage development environments, including [Interfaces](#interfaces), [Git Providers](#git-providers), [Container Registries](#container-registries), [Providers](#providers), and [Targets](#targets).
### Interfaces
Daytona Open Source offers a variety of [Interfaces](/docs/usage/ide) to interact with the platform and manage development environments. Interfaces provide different ways to interact with Daytona, enabling developers to choose the most suitable method based on their preferences and workflows.
These include the [Command Line Interface (CLI)](/docs/tools/cli) for direct control, [IDEs](/docs/usage/ide) such as [Visual Studio Code (VSCode)](/docs/usage/ide#vs-code), [Visual Studio Code (VSCode) Browser](/docs/usage/ide#vs-code-browser), [Visual Studio Code Insiders](/docs/usage/ide#vs-code-insiders), [Visual Studio Codium](/docs/usage/ide#vscodium), [Jupyter](/docs/usage/ide#jupyter), [Zed](/docs/usage/ide#zed), [Cursor](/docs/usage/ide#cursor), [Headless](/docs/usage/ide#headless), [Windsurf](/docs/usage/ide#windsurf), JetBrains IDEs for integrated development, and [Terminal SSH](/docs/usage/ide#terminal-ssh).
Additionally, [Daytona SDK](/docs/sdk) is provided to enable developers to create custom integrations and extend platform functionality.
### Git Providers
Daytona Open Source integrates Git Providers to manage version control operations and interact with Git repositories. Git Providers enable efficient source code management and synchronization with Workspaces.
Supported Git Providers include [GitHub](/docs/configuration/git-providers#github), [GitLab](/docs/configuration/git-providers#gitlab), [Bitbucket](/docs/configuration/git-providers#bitbucket), [GitHub Enterprise Server](/docs/configuration/git-providers#github-enterprise-server), [GitLab Self-Managed](/docs/configuration/git-providers#gitlab-self-managed), [Bitbucket Server](/docs/configuration/git-providers#bitbucket-server), [Codeberg](/docs/configuration/git-providers#codeberg), [Gitea](/docs/configuration/git-providers#gitea), [Gitness](/docs/configuration/git-providers#gitness), [Azure DevOps](/docs/configuration/git-providers#azure-devops), [AWS CodeCommit](/docs/configuration/git-providers#aws-codecommit), [Gogs](/docs/configuration/git-providers#gogs), and [Gitee](/docs/configuration/git-providers#gitee).
The Git Providers integration facilitates collaborative development workflows and streamlines the connection between repositories and development environments.
### Container Registries
[Container registries](/docs/configuration/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.
### Providers
Daytona Open Source uses [Providers](/docs/configuration/providers) to enable integration 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.
Supported Providers include [Docker](/docs/configuration/providers#docker), [DigitalOcean](/docs/configuration/providers#digitalocean), [AWS](/docs/configuration/providers#aws), [Azure](/docs/configuration/providers#azure), [GCP](/docs/configuration/providers#gcp), [Hetzner](/docs/configuration/providers#hetzner), and [Fly](/docs/configuration/providers#fly).
### Targets
[Targets](/docs/usage/targets) represent isolated processing units where Workspaces are executed. They 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.
## Enterprise
The Enterprise edition of Daytona extends the capabilities of the Open Source version with additional features and services tailored for enterprise-grade development environments. These enhancements include advanced security, authentication, and authorization mechanisms, as well as observability and resource management tools to optimize workspace performance and utilization.
### Dashboard
The Enterprise version introduces a Dashboard, which provides a centralized interface for managing and monitoring the platform, improving visibility and control over development environments.
### Authentication
Authentication features support Single Sign-On (SSO) and standards such as Security Assertion Markup Language (SAML) and
System for Cross-domain Identity Management (SCIM), ensuring secure access to the platform. This enables seamless integration with enterprise identity systems and simplifies user management.
### Authorization
Authorization capabilities allow for granular control of access and permissions across users, teams, organizations, and projects. This ensures secure collaboration and adherence to organizational policies by providing role-based access management.
### Observability
Observability tools offer enhanced monitoring, logging, and tracing capabilities for Workspaces and development activities. This ensures that teams can track system performance, debug issues effectively, and maintain operational insights into their environments.
### Resource Management
Resource Management is expanded with enterprise features, enhancing workspace classes and quota management to meet large-scale, organization-wide requirements.
### Identity Providers
The Enterprise version integrates with Identity Providers (IDP) to enhance authentication and identity management. Supported IDPs include EntraID, Cognito, Okta, OpenID, Google, and others. These integrations ensure that enterprises can use their existing identity systems to manage user authentication, enabling secure and compliant access to the platform.
### Security
Daytona Enterprise enhances security by integrating with advanced security tools and services. These include JFrog, Snyk, Sonatype, and more, ensuring that vulnerabilities in dependencies and containerized environments are identified and mitigated. These security integrations provide automated scanning, reporting, and remediation, reinforcing the integrity of development workflows and applications.
---
title: Getting Started
description: Learn how to set up and start using Daytona.
---
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](/docs/usage/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**](/docs/installation/installation) | **`x86_64`** or **`ARM64`** |
| [**macOS**](/docs/installation/installation) | **`x86_64 (Intel-based)`** or **`ARM64 (Apple Silicon)`** |
| [**Windows**](/docs/installation/installation) | **`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**](https://docs.docker.com/engine/install/) | 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](/docs/installation/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](https://go.daytona.io/slack) 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](/docs/tools/cli). 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](/docs/configuration/git-providers), 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](/docs/configuration/git-providers#github), [GitLab](/docs/configuration/git-providers#gitlab), [Bitbucket](/docs/configuration/git-providers#bitbucket), [GitHub Enterprise Server](/docs/configuration/git-providers#github-enterprise-server), [GitLab Self-Managed](/docs/configuration/git-providers#gitlab-self-managed), [Bitbucket Server](/docs/configuration/git-providers#bitbucket-server), [Codeberg](/docs/configuration/git-providers#codeberg), [Gitea](/docs/configuration/git-providers#gitea), [Gitness](/docs/configuration/git-providers#gitness), [Azure DevOps](/docs/configuration/git-providers#azure-devops), [AWS CodeCommit](/docs/configuration/git-providers#aws-codecommit), [Gogs](/docs/configuration/git-providers#gogs) and [Gitee](/docs/configuration/git-providers#gitee).
1. Run the following command to add a Git Provider:
```shell
daytona git-providers add
```
2. Select the Git Provider you want to add from the list.
3. 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.
```text
Git provider has been registered
```
You can install additional [Git Providers](/docs/configuration/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](/docs/configuration/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](/docs/configuration/providers#docker), [DigitalOcean](/docs/configuration/providers#digitalocean), [AWS](/docs/configuration/providers#aws), [Azure](/docs/configuration/providers#azure), [GCP](/docs/configuration/providers#gcp), [Hetzner](/docs/configuration/providers#hetzner), and [Fly](/docs/configuration/providers#fly)
1. Run the following command to install a Provider:
```shell
daytona provider install
```
2. 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.
```text
Provider has been successfully installed
```
You can install additional [Providers](/docs/configuration/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](/docs/configuration/target-config) refers to the specific destination or environment where your development setup, facilitated by various [Providers](/docs/configuration/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)](/docs/configuration/target-config#docker-local), [Docker (Remote)](/docs/configuration/target-config#docker-remote), [DigitalOcean](/docs/configuration/target-config#digitalocean), [AWS](/docs/configuration/target-config#aws), [Azure](/docs/configuration/target-config#azure), [GCP](/docs/configuration/target-config#gcp), [Hetzner](/docs/configuration/target-config#hetzner), and [Fly](/docs/configuration/target-config#fly).
1. Run the following command to create a Target Configuration:
```shell
daytona target-config create
```
2. Select the appropriate Provider for the environment you want to deploy to.
3. Enter a name for your Target Configuration.
4. Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider.
5. Click **`Enter`** to confirm adding the Target Configuration.
```text
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](/docs/configuration/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.
1. Run the following command to set a container registry environment variable:
```shell
daytona env set
```
2. Set the server environment variable key for the container registry.
3. Set the server environment variable value for the container registry.
4. Select whether to add another environment variable.
Upon selecting, Daytona will set the container registry environment variables for your Workspace.
```text
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](/docs/configuration/workspace-templates) 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.
1. Run the following command to add a Workspace Template:
```shell
daytona workspace-template add
```
2. 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.
3. Enter the repository URL of the Workspace you want to configure, or select to create a Workspace Template from a sample project.
4. Enter a name for the Workspace Template.
5. Select the build configuration for the Workspace.
6. 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.
```text
SUMMARY - Workspace Template
Workspace - MyWorkspace
Repository https://github.com/daytonaio/docs
Branch main
Build Automatic
Image daytonaio/workspace-project:latest
User daytona
```
7. Click **`Create`** to save the Workspace Template, or **`Configure`** to make changes to the Workspace Template.
```text
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](/docs/usage/targets) 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.
1. Run the following command to create a Target:
```shell
daytona target create
```
2. Select the [Target Configuration](/docs/configuration/target-config) to use for the Target.
3. Select the [Provider](/docs/configuration/providers) for the environment you want to deploy to.
4. Enter a name for your Target.
5. Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider.
```text
✓ Request submitted
Creating target
```
You can set additional [Targets](/docs/usage/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.
1. Run the following command to create a new Runner:
```shell
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.
2. 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](/docs/usage/ide), including popular options like [Visual Studio Code (VSCode)](/docs/usage/ide#vs-code), [Visual Studio Code Insiders](/docs/usage/ide#vs-code-insider), [VSCodium](/docs/usage/ide#vscodium), JetBrains IDEs, [Jupyter](/docs/usage/ide#jupyter), [Zed](/docs/usage/ide#zed), [Cursor](/docs/usage/ide#cursor), [Windsurf](/docs/usage/ide#windsurf), and [Terminal SSH](/docs/usage/ide#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.
1. Run the following command to set the default IDE:
```shell
daytona ide
```
2. Select your preferred IDE from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE:
```
Use the `daytona code` command to automatically open the default IDE already connected to your Workspace.
You can choose additional [IDEs](/docs/configuration/git-providers) 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](/docs/usage/workspaces#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.
1. Run the following command to start the guided Workspace creation process:
```shell
daytona create
```
2. Select one of the three provided options:
- **Select from a List of Repositories**
- **Enter a Custom Repository URL**
- **Create from Sample**
3. 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.
4. Enter a name for your Workspace.
5. Select a [Target](/docs/usage/targets) to deploy your Workspace to. Selecting a Target will prompt you to input the [Target Configuration](/docs/configuration/target-config). 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.
```text
| ✓ Request submitted
| Creating workspace ()
| Pulling image...
| Pulling from daytonaio/workspace-project
| Digest: sha256: | Status: Image is up to date for daytonaio/workspace-project:latest
| ✓ Image pulled successfully
| UIDs and GIDs are the same (1000:1000).
| Cloning into '/workdir/'...
| UIDs and GIDs are the same (1000:1000).
| ✓ Workspace created
```
Use the `daytona create --help` command to view available configuration options for creating a Workspace.
## Interact with your Workspace
The [Agent Toolbox](/docs/usage/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.
---
title: What is Daytona?
description: Understand how Daytona can help you manage your development environments.
sidebar:
label: What is 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.
Daytona's architecture provides the future possibility to base Workspaces on other configuration standards, such as Dockerfiles, Docker Compose, Nix, and Devfile.
By leveraging configuration in a project's remote Git repository, Daytona builds a Workspace and provisions a workspace to a platform of your choice.
Once provisioned, you can develop and test the project using an IDE supported by Daytona, such as Visual Studio Code.
Daytona's functionality is exposed through a command-line tool that runs on Linux, macOS, and Windows systems, on both x86-64 and AArch64 architectures.
## Features
* __Security__
Daytona creates a secure VPN connection between the client machine and the remote machine.
All ports on the remote machine can be accessed securely without the need for manual port forwarding.
* __Support for Visual Studio Code and JetBrains__
Daytona supports both Visual Studio Code and the JetBrains line of IDEs, making it easy to develop your project while feeling like everything's local.
* __Connect with GitHub, GitLab, Bitbucket, and Gitea__
Daytona can create DEs by pulling repositories from your preferred SCM platform. Git operations can be executed within a workspace, allowing you to push your work without context switching.
* __Support for Multi-Project Workspaces__
Daytona is capable of creating workspaces with multiple projects.
Large projects split into micro-services or multiple repositories can be worked on using a single workspace.
* __Reverse Proxy Support__
Daytona integrates a reverse proxy allowing you to access a workspace on a public or restricted network.
* __Extensible Core__
Daytona supports plugins developed in Go.
Third-party Providers can be added to Daytona, as well as extensions to core functionality.
---
title: API Keys
description: Learn how to create and manage Daytona API keys.
---
Daytona API keys are used to authenticate requests to the [Daytona API](/docs/tools/api). Daytona provides an option to generate an API key for managing your API requests, list all generated API keys, and revoke an API key.
## Generate an API Key
Daytona provides an option to generate API keys.
1. Run the following command to generate an API key:
```bash
daytona api-key generate
```
Upon running this command, Daytona will prompt you to enter a name for the API key.
```text
Name
>
```
Upon successful generation of the API key, Daytona will display the following confirmation message:
```text
You have successfully generated a new API Key and Server URL, which you can find below:
DAYTONA_API_KEY=your-api-key
DAYTONA_SERVER_URL=your-server-url
```
Daytona provides an option to connect to the Daytona Server instantly from a client machine by running the following command:
```bash
daytona profile add -a -k
```
## List API Keys
Daytona provides an option to list all generated API keys.
1. Run the following command to list all generated API keys:
```bash
daytona api-key list
```
Upon running this command, Daytona will display the list of all generated API keys.
```text
Name Type
──────────────────────────────────────────
default client
```
:::tip
Daytona provides an option to view the existing Daytona Server API URL.
```bash
daytona server config
```
```text
API URL: https://.try-eu.daytona.app
```
:::
## Revoke an API Key
Daytona provides an option to revoke API keys.
1. Run the following command to revoke an API key:
```bash
daytona api-key revoke
```
Upon running this command, Daytona will prompt you to enter the name of the API key that you want to revoke.
```text
Select an API key to revoke
1 item
===
MyAPIKey
client
```
3. Press **`Enter`** on the selected API key to revoke it.
4. Confirm the revocation by selecting **`Yes`** or **`No`**.
```text
Revoke API Key 'test'?
Are you sure you want to revoke 'test'?
[Yes] [No]
```
```text
API key revoked
```
---
title: Container Registries
description: Configure container registries for your Workspace in Daytona
---
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.
Container registries are managed through environment variables, enabling you to securely store and manage credentials. Daytona provides options to set, list, and delete container registries for your Workspaces.
Daytona provides options to set global environment variables that apply to all Workspaces or set environment variables for a specific Workspace. To set environment variables for a specific Workspace, use the `--env` flag when creating a new Workspace, or configure the environment variables in the Workspace's template. For server-wide environment variables that apply to all new Workspaces, use the `daytona env` command.
## Set a Container Registry
Daytona provides an option to set a container registry through environment variables for your Workspace.
1. Run the following command to set a container registry environment variable:
```shell
daytona env set
```
2. Set the server environment variable key for the container registry:
```text
Set server environment variable
Key
>
```
:::tip
Add the following environment variables to configure your container registry:
- **`<*>_CONTAINER_REGISTRY_SERVER`**
The URL of the container registry.
- **`<*>_CONTAINER_REGISTRY_USERNAME`**
The username to authenticate with the container registry.
- **`<*>_CONTAINER_REGISTRY_PASSWORD`**
The password to authenticate with the container registry.
:::
3. Set the server environment variable value for the container registry:
```text
Value
>
```
4. Select whether to add another environment variable:
```text
Add another environment variable?
[Yes] [No]
```
Upon selecting, Daytona will set the container registry environment variables for your Workspace.
```text
Server environment variables have been set successfully
```
## List Container Registries
Daytona provides an option to list the container registries configured for your Workspaces.
1. Run the following command to list the container registries:
```shell
daytona env list
```
Upon running this command, Daytona will display a list of your configured container registries' environment variables.
```text
Key Value
────────────────────────────────────
MyEnvVariable ********
```
## Delete a Container Registry
Daytona provides an option to delete a container registry from your Workspace.
1. Run the following command to delete a container registry:
```shell
daytona env delete
```
Upon running this command, you will be prompted to select the container registry you want to delete.
```text
Select Server Environment Variables To Delete
1 item
===
MyEnvVariable
********
```
```text
Server environment variables have been successfully removed
```
---
title: Git Providers
description: Connect Daytona with GitHub, GitLab, Bitbucket, and other Git Providers.
sidebar:
label: Configure Providers
---
Git Providers — sometimes known as software forges or Source Code Managers (SCMs) — provide a set of tools to host and collaborate on codebases using Git.
Daytona allows you 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.
By adding a Git Provider, your credentials are securely embedded into your Workspaces. This allows for seamless Git operations without repeated authentication.
## Add a Git Provider
Daytona provides an option to add a Git Provider, enabling you to connect your preferred Git Provider and access your repositories directly from Daytona.
1. Run the following command to add a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to select the Git Provider you want to add.
```text
Choose a Git provider
GitHub
GitLab
Bitbucket
Other
```
2. Select the Git Provider you want to configure from the list:
- __[GitHub](#github)__
Select if you are hosting repositories on GitHub.
- __[GitLab](#gitlab)__
Select if you are hosting repositories on GitLab.
- __[Bitbucket](#bitbucket)__
Select if you are hosting repositories on Atlassian's Bitbucket Cloud platform.
- __[GitHub Enterprise Server](#github-enterprise-server)__
Select if you are hosting repositories on GitHub Enterprise Server.
- __[GitLab Self-Managed](#gitlab-self-managed)__
Select if you are hosting repositories on GitLab's self-hosted platform.
Self-hosted GitLab Community Edition (CE) installations, GitLab Self-Managed, and GitLab Dedicated platforms are supported.
- __[Bitbucket Server](#bitbucket-server)__
Select if you are hosting repositories on Bitbucket Server.
- __[Codeberg](#codeberg)__
Select if you are hosting repositories on Codeberg.
- __[Gitea](#gitea)__
Select if you are hosting repositories on Gitea.
- __[Gitness](#gitness)__
Select if you are hosting repositories on Gitness.
- __[Azure DevOps](#azure-devops)__
Select if you are hosting repositories on Azure DevOps.
- __[AWS CodeCommit](#aws-codecommit)__
Select if you are hosting repositories on AWS CodeCommit.
- __[Gogs](#gogs)__
Select if you are hosting repositories on Gogs.
- __[Gitee](#gitee)__
Select if you are hosting repositories on Gitee.
3. Enter your Git Provider credentials for Daytona to authenticate and enable secure access to your repositories.
```text
Personal access token
>
```
Some Git Providers require additional information such as your _username_ or the _URL_ of your self-managed API instance to complete the configuration.
4. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## List Connected Git Providers
Daytona provides an option to keep track of your Git Providers by listing all previously created Git Providers.
1. Run the following command to list currently connected Git Providers:
```shell
daytona git-providers list
```
Upon running this command, Daytona will display a list of your connected Git Providers.
```text
GitHub (alias)
GitLab (alias)
```
## Update a Git Provider
Daytona provides an option to update an existing Git Provider, enabling you to apply the latest enhancements and bug fixes.
1. Run the following command to update a Git Provider:
```shell
daytona git-providers update
```
Upon running this command, Daytona will display a list of your connected Git Providers.
```text
Choose a Git provider
> github (alias)
```
2. Select the Git Provider you want to update from the list.
3. Enter your Git Provider credentials for Daytona to authenticate and enable secure access to your repositories.
```text
Personal access token
>
```
Some Git Providers require additional information such as your _username_ or the _URL_ of your self-managed API instance to complete the configuration.
4. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful update, Daytona will display the following message:
```text
Git provider has been updated
```
## Delete a Git Provider
Daytona provides an option to delete Git Providers, helping you manage and delete those that are no longer needed. Once a Git Provider is deleted, you will not be able to manage or deploy Workspaces without adding another Git Provider.
1. Run the following command to delete a Git Provider:
```shell
daytona git-providers delete
```
Upon running this command, Daytona will display a list of existing Git Providers you can delete.
```text
Choose a Git provider
GitHub
GitLab
```
2. Select the Git Provider you want to delete.
Upon successful selection, Daytona will display the following message:
```text
Git provider has been removed
```
## GitHub
Daytona provides an option to connect your GitHub account and access your repositories directly from Daytona.
1. Run the following command to add GitHub as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `GitHub` from the list.
```text
Choose a Git provider
> GitHub
```
After selecting GitHub as your Git Provider, you will be prompted to enter a Personal Access Token.
For more information on creating a Personal Access Token, visit GitHub's [Creating a personal access token (classic)][gh-token] documentation.
2. Enter your Personal Access Token for Daytona to authenticate and enable secure access to your GitHub repositories.
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## GitLab
Daytona provides an option to connect your GitLab account and access your repositories directly from Daytona.
1. Run the following command to add GitLab as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `GitLab` from the list.
```text
Choose a Git provider
> GitLab
```
After selecting GitLab as your Git Provider, you will be prompted to enter a Personal Access Token.
For more information on creating a Personal Access Token, visit GitLab's [Create a personal access token][gl-token] documentation.
2. Enter your Personal Access Token for Daytona to authenticate and enable secure access to your GitLab repositories.
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Bitbucket
Daytona provides an option to connect your Bitbucket account and access your repositories directly from Daytona.
1. Run the following command to add Bitbucket as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Bitbucket` from the list.
```text
Choose a Git provider
> Bitbucket
```
After selecting Bitbucket as your Git Provider, you will be prompted to enter a Username (your Atlassian username) and a Personal Access Token (App Password).
For more information on creating a Personal Access Token, visit Bitbucket's [Create an App password][bit-token] documentation.
2. Enter your Username and Personal Access Token for Daytona to authenticate and enable secure access to your Bitbucket repositories.
```text
Username
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## GitHub Enterprise Server
Daytona provides an option to connect your GitHub Enterprise Server account and access your repositories directly from Daytona.
1. Run the following command to add GitHub Enterprise Server as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `GitHub Enterprise Server`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> GitHub Enterprise Server
```
After selecting GitHub Enterprise Server as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for your GitHub Enterprise Server instance's API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit GitHub's [Creating a personal access token (classic)][gh-enterprise-token] documentation.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your Github Enterprise repositories.
```text
Self-managed API URL
For example: https://github-host
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## GitLab Self-Managed
Daytona provides an option to connect your GitLab Self-Managed account and access your repositories directly from Daytona.
1. Run the following command to add GitLab Self-Managed as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `GitLab Self-managed`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> GitLab Self-managed
```
After selecting GitLab Self-Managed as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for the self-hosted GitLab API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit GitLab's [Create a personal access token][gl-token] documentation.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your GitLab Self-Managed repositories.
```text
Self-managed API URL
For example: http://gitlab-host/api/v4/
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Bitbucket Server
Daytona provides an option to connect your Bitbucket Server account and access your repositories directly from Daytona.
1. Run the following command to add Bitbucket Server as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Bitbucket Server`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Bitbucket Server
```
After selecting Bitbucket Server as your Git Provider, you will be prompted to enter a Username (your Atlassian username), Self-managed API URL (the base URL for your Bitbucket Server instance's API), and a Personal Access Token (App Password).
For more information on creating a Personal Access Token, visit Bitbucket's [Create an App password][bit-token] documentation.
2. Enter your Username, Self-managed API URL, and Personal Access Token for Daytona to authenticate and enable secure access to your Bitbucket Server repositories.
```text
Username
>
```
```text
Self-managed API URL
For example: https://bitbucket.host.com/rest
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Codeberg
Daytona provides an option to connect your Codeberg account and access your repositories directly from Daytona.
1. Run the following command to add Codeberg as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Codeberg`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Codeberg
```
After selecting Codeberg as your Git Provider, you will be prompted to enter a Personal Access Token.
For more information on creating a Personal Access Token, visit Codeberg's [Generating an Access Token][codeberg-token] documentation.
2. Enter your Personal Access Token for Daytona to authenticate and enable secure access to your Codeberg repositories.
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Gitea
Daytona provides an option to connect your Gitea account and access your repositories directly from Daytona.
1. Run the following command to add Gitea as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Gitea`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Gitea
```
After selecting Gitea as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for the Gitea installation's API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit Gitea's [Generating and listing API tokens][gitea-token] documentation.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your Gitea repositories.
```text
Self-managed API URL
For example: http://gitea-host
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Gitness
Daytona provides an option to connect your Gitness account and access your repositories directly from Daytona.
1. Run the following command to add Gitness as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Gitness`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Gitness
```
After selecting Gitness as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for the Gitness installation's API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit Gitness' [Generate user token][gitness-token] documentation.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your Gitness repositories.
```text
Self-managed API URL
For example: http://gitness-host/api/v1/
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Azure DevOps
Daytona provides an option to connect your Azure DevOps account and access your repositories directly from Daytona.
1. Run the following command to add Azure DevOps as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Azure DevOps`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Azure DevOps
```
After selecting Azure DevOps as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for the Azure DevOps installation's API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit Azure DevOps' [Create a Personal Access Token][azuredevops-token] documentation.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your Azure DevOps repositories.
```text
Self-managed API URL
For example: https://dev.azure.com/organization
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## AWS CodeCommit
Daytona provides an option to connect your AWS CodeCommit account and access your repositories directly from Daytona.
1. Run the following command to add AWS CodeCommit as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `AWS CodeCommit`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> AWS CodeCommit
```
After selecting AWS CodeCommit as your Git Provider, you will be prompted to enter a Username, a Self-Managed API URL (the base URL for the AWS CodeCommit installation's API) and a Personal Access Token.
For more information on creating a Personal Access Token, visit AWS CodeCommit's [Authentication and access control][awscodecommit-token] documentation.
2. Enter your Username, Self-Managed API URL, and Personal Access Token for Daytona to authenticate and enable secure access to your AWS CodeCommit repositories.
```text
Username
>
```
```text
Self-managed API URL
For example: https://ap-south-1.console.aws.amazon.com
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Gogs
Daytona provides an option to connect your Gogs account and access your repositories directly from Daytona.
1. Run the following command to add Gogs as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Gogs`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Gogs
```
After selecting Gogs as your Git Provider, you will be prompted to enter a Self-Managed API URL (the base URL for the Gogs installation's API) and a Personal Access Token.
To create a Personal Access Token follow these steps:
1. Log into Gogs, and click your profile avatar to open the user menu.
2. Click __`Your Settings`__ in the user menu. Make sure you have admin access to the repository.
3. Navigate to __`Applications`__ in the sidebar.
4. In the Manage personal access tokens section, click __`Generate New Token`__.
5. Type a name for your token and click __`Generate Token`__.
6. Copy and save the token securely.
2. Enter your Self-Managed API URL and Personal Access Token for Daytona to authenticate and enable secure access to your Gogs repositories.
```text
Self-managed API URL
For example: https://gogs-host.com
>
```
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
## Gitee
Daytona provides an option to connect your Gitee account and access your repositories directly from Daytona.
1. Run the following command to add Gitee as a Git Provider:
```shell
daytona git-providers add
```
Upon running this command, Daytona will prompt you to choose a Git Provider you want to add. Select `Other` from the list, and then select `Gitee`.
```text
Choose a Git provider
> Other
```
```text
Choose a Git provider
> Gitee
```
2. Enter your Personal Access Token for Daytona to authenticate and enable secure access to your Gitee repositories.
To create a Personal Access Token follow these steps:
1. Log into Gitee, and click your profile avatar to open the user menu.
2. Click __`Settings`__ in the user menu. Make sure you have admin access to the repository.
3. Navigate to __`Personal access tokens`__ in the sidebar.
4. In the Manage personal access tokens section, click Generate New Token.
5. Enter a description for your token, and select following scopes:
- __`user_info`__
- __`projects`__
- __`pull_requests`__
- __`groups`__
- __`emails`__
6. Click __`Commit`__ to generate the token. You will be prompted to enter your password for verification.
7. Copy and save the token securely.
```text
Personal access token
>
```
3. Enter your Git Provider alias to identify it within Daytona.
```text
Alias
Will default to username if left empty
>
```
Upon successful authentication, Daytona will display the following message:
```text
Git provider has been registered
```
[gh-token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic
[gh-enterprise-token]: https://docs.github.com/en/enterprise-server@3.13/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic
[gl-token]: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token
[bit-token]: https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/
[codeberg-token]: https://docs.codeberg.org/advanced/access-token/
[gitea-token]: https://docs.gitea.com/1.21/development/api-usage#generating-and-listing-api-tokens
[gitness-token]: https://docs.gitness.com/administration/user-management#generate-user-token
[azuredevops-token]: https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows#create-a-pat
[awscodecommit-token]: https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control.html
---
title: Providers
description: Understand Providers and configure new Targets.
sidebar:
label: Providers
---
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's architecture decentralizes the role of a Provider into a separate service. The [Daytona Server](/docs/usage/server) communicates with Providers to execute operations relating to Workspace creation and lifecycle management.
## Install a Provider
Daytona provides an option to install a Provider to interface with the Daytona Server. Once a new Provider is installed, it manages the Workspace deployment and its lifecycle management.
1. Run the following command to install a Provider:
```shell
daytona provider install
```
:::note
Daytona will prompt you select a [Runner](/docs/usage/runners) to manage the Provider.
:::
2. Select the Provider you want to install from the list or select a specific version.
```text
Choose a Provider to Install
7 items
===
Docker
v0.0.0
DigitalOcean
v0.0.0
AWS
v0.0.0
Azure
v0.0.0
GCP
v0.0.0
Hetzner
v0.0.0
Fly
v0.0.0
Select a specific version
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces. You can now create a [Target](/docs/usage/targets) to use with the created Provider.
```text
Provider has been successfully installed
```
## List Providers
Daytona provides an option to list all installed Providers, providing you with an overview of the Providers available for managing Workspaces.
1. Run the following command to list all installed Providers:
```shell
daytona provider list
```
Upon running this command, Daytona will display a list of your installed Providers and their respective versions.
```text
Name Runner Name Version
──────────────────────────────────────────────────────
Docker local docker-provider v0.0.0
```
## Update a Provider
Daytona provides an option to update an existing Provider, enabling you to apply the latest enhancements and bug fixes.
1. Run the following command to update a Provider:
```shell
daytona provider update
```
2. Select a Runner to manage the Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select the Provider you want to update from the list.
```text
Choose a provider to update
1 item
===
Docker (Runner )
v0.0.0
```
```text
Provider docker-provider has been successfully updated
```
## Uninstall a Provider
Daytona provides an option to uninstall an existing Provider, helping you manage your Providers by removing those that are no longer needed.
1. Run the following command to uninstall a Provider:
```shell
daytona provider uninstall
```
2. Select a Runner to manage the Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select the Provider you want to uninstall from the list.
```text
Choose a provider to uninstall
1 item
===
Docker (Runner )
v0.0.0
```
```text
Provider docker-provider has been successfully uninstalled
```
## Docker
The Docker Provider allows Daytona to create Workspace projects as Docker containers. Daytona installs a Provider for Docker (`docker-provider`) by default and adds a default [Target](/docs/usage/targets) using the Docker Provider, allowing the creation of Workspaces on your local machine.
1. Run the following command to install a Docker Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the Docker Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`Docker`** to install Docker as your Provider.
```text
Choose a provider to install
===
> Docker
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider docker-provider has been successfully installed
```
## DigitalOcean
The DigitalOcean Provider allows Daytona to create Workspace projects on DigitalOcean VMs, known as Droplets. The Provider integrates Daytona with DigitalOcean, enabling you to manage Workspaces on a flexible and scalable cloud platform.
1. Run the following command to install a DigitalOcean Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the DigitalOcean Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`DigitalOcean`** to install DigitalOcean as your Provider.
```text
Choose a provider to install
===
> DigitalOcean
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider digitalocean-provider has been successfully installed
```
## AWS
The AWS Provider allows Daytona to create and manage Workspace projects on Amazon EC2 instances. The Provider integrates Daytona with AWS, enabling you to manage Workspaces in a scalable and flexible cloud environment.
To use the AWS Provider, ensure that your AWS programmatic access user has the `AmazonEC2FullAccess` permissions. This policy grants the necessary permissions to manage EC2 instances, which is crucial for Daytona's Workspace project creation and management.
1. Run the following command to install an AWS Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the AWS Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`AWS`** to install AWS as your Provider.
```text
Choose a provider to install
===
> AWS
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider aws-provider has been successfully installed
```
## Azure
The Azure Provider allows Daytona to create Workspace projects on Azure compute instances. The Provider integrates Daytona with Azure, enabling you to manage Workspaces in a scalable and flexible cloud environment.
1. Run the following command to install a Azure Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the Azure Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`Azure`** to install Azure as your Provider.
```text
Choose a provider to install
===
> Azure
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider azure-provider has been successfully installed
```
:::note
Ensure the Azure Provider is linked to a service principal with the `Contributor` role for the appropriate Azure subscription.
To create a service principal with the `Contributor` role, use the following Azure CLI command:
```shell
az ad sp create-for-rbac --role Contributor --scopes /subscriptions/
```
Detailed instructions on creating and configuring the service principal can be found in the official [Create an Azure service principal with Azure CLI](https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash) documentation.
:::
## GCP
The GCP Provider allows Daytona to create Workspace projects on Google Cloud Platform (GCP) compute instances. The Provider integrates Daytona with GCP, enabling you to manage Workspaces in a scalable and flexible cloud environment.
:::note
Before using the GCP Provider, ensure to create a GCP service account with the `Compute Admin` role. Download the service account key in JSON format and provide it to the GCP provider for authentication. Detailed instructions on creating and configuring the service account can be found [here](https://cloud.google.com/iam/docs/service-accounts-create#console).
:::
1. Run the following command to install a GCP Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the GCP Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`GCP`** to install GCP as your Provider.
```text
Choose a provider to install
===
> GCP
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider gcp-provider has been successfully installed
```
## Hetzner
The Hetzner Provider allows Daytona to create Workspace projects on Hetzner Cloud VMs. The Provider integrates Daytona with Hetzner, enabling you to manage Workspaces in a scalable and flexible cloud environment.
1. Run the following command to install a Hetzner Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the Hetzner Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`Hetzner`** to install Hetzner as your Provider.
```text
Choose a provider to install
===
> Hetzner
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider hetzner-provider has been successfully installed
```
## Fly
The Fly Provider allows Daytona to create Workspace projects on Fly VMs, known as Fly Machines. The Provider integrates Daytona with the Fly.io platform, enabling you to manage Workspaces in a globally distributed cloud environment.
1. Run the following command to install a Fly Provider:
```shell
daytona provider install
```
2. Select a Runner to manage the Fly Provider.
```text
Choose a Runner To Manage Providers
1 item
===
local
local
```
3. Select **`Fly`** to install Fly as your Provider.
```text
Choose a provider to install
===
> Fly
v0.0.0
```
Upon selecting the Provider, Daytona will install and configure the chosen Provider, making it available for managing and deploying Workspaces.
```text
⡿ Installing...
```
```text
Provider fly-provider has been successfully installed
```
---
title: Server
description: A reference for the Daytona server.
sidebar:
label: Server
---
The Daytona Server is a daemon that runs on your machine and handles [Workspaces](/docs/usage/workspaces) related actions.
It provides capabilities for [starting](#start-the-server), [configuring](#configure-the-server), and [stopping](#stop-the-server) server operations.
The primary method of interacting with the server is through the Daytona CLI. Users can also interact with the Daytona Server using its HTTP interface.
## Start the Server
Run the following command to start the Daytona Server:
```shell
daytona server start
```
Upon running this command, Daytona will start the The Daytona Server daemon.
```text
Starting the Daytona Server daemon...
```
## Configure the Server
The Daytona Server configuration is located in different directories depending on your operating system.
- On macOS, the configuration file is located at:
`~/Library/Application\ Support/daytona/server/config.json`
- On Linux, the configuration file is located at:
`~/.config/daytona/server/config.json`
- On Windows, the configuration file is located at:
`C:\Users\YOUR_USERNAME\AppData\Roaming\daytona\server\config.json`
The Daytona Server configuration can be viewed by using the following command across all operating systems:
```shell
daytona server config
```
The Daytona Server configuration contains the following properties:
- **Server ID**
A unique identifier for the Daytona server instance.
Example: `12a34bc5-d67e-890f-1gh2-34i5jk6l7m89`
- **API URL**
The URL endpoint for the Daytona API.
Example: `https://api-12a34bc5-d67e-890f-1gh2-34i5jk6l7m89.try-eu.daytona.app`
The API URL property cannot be manually edited, but you can use it to connect to Daytona with other clients.
- **API Port**
The port number on which the Daytona API is accessible.
Example: `3986`
If you have something running on port 3986, you can change it to a port that you have available.
- **Default Project Image**
The default Docker image used for projects.
Example: `daytonaio/workspace-project:latest`
The Default Project Image property can be manually edited to use a different default project image.
- **Default Project User**
The default user for projects.
Example: `daytona`
The Default Project User property can be manually edited to use a different default project user.
- **FRPS Domain**
The domain used by the FRP (Fast Reverse Proxy) server.
Example: `try-eu.daytona.app`
The FRPS Domain property can be manually edited to use a different FRP domain.
- **FRPS Port**
The port used by the FRP (Fast Reverse Proxy) server.
Example: `7000`
The FRPS Port property can be manually edited to use a different FRP port.
- **FRPS Protocol**
The protocol used by the FRP (Fast Reverse Proxy) server.
Example: `https`
The FRPS Protocol property can be manually edited to use a different FRP protocol.
- **Headscale Port**
The port number for the Headscale service.
Example: `3987`
The Headscale Port property can be manually edited to use a different Headscale port.
- **Binaries Path**
The directory path where server binaries are stored.
Example: `/Users/Library/Application Support/daytona/server/binaries`
The Binaries Path directory will be created if it does not exist, and the property can be manually edited to use a different binaries path.
- **Log File Path**
The directory path where server logs are stored.
Example: `/Users/Library/Application Support/daytona/server/daytona.log`
The Log File Path file will be created if it does not exist, and the property can be manually edited to use a different log file path.
- **Builder Image**
The Docker image used by the local builder.
Example: `daytonaio/workspace-project:latest`
The Builder Image property can be manually edited to use a different builder image.
- **Local Builder Registry Port**
The port number for the local builder registry.
Example: `3988`
The Local Builder Registry Port property is only displayed if the Builder Registry is set to local. It can be manually edited to use a different local builder registry port.
- **Local Builder Registry Image**
The registry image used by the local builder registry.
Example: `registry:2.3.8`
The Local Builder Registry Image property is only displayed if the Builder Registry is set to local. It can be manually edited to use a different local builder registry image.
- **Build Image Namespace**
The namespace for build images. This is used to organize and manage images within a specific scope.
Example: `daytona`
The Build Image Namespace property can be manually edited to use a different build image namespace.
- **Providers Dir**
The directory path where provider configuration is stored.
Example: `/Users/Library/Application Support/daytona/providers`
- **Registry URL**
The URL for the Daytona registry.
Example: `https://download.daytona.io/daytona`
- **Server Download URL**
The URL for downloading the Daytona server.
Example: `https://download.daytona.io/daytona/install.sh`
The Daytona Server configuration can be manually edited by using the following command:
```shell
daytona server configure
```
```text
Providers Directory
Directory will be created if it does not exist
> /Users/Library/Application Support/daytona/providers
Providers Directory
> /Users/Library/Application Support/daytona/providers
Registry URL
> https://download.daytona.io/daytona
Server Download URL
> https://download.daytona.io/daytona/install.sh
Default Project Image
> daytonaio/workspace-project:latest
Default Project User
> daytona
Builder Image
Image dependencies: docker, @devcontainers/cli (node package)
> daytonaio/workspace-project:latest
Builder Registry
To add options, add a container registry with 'daytona cr set'
> Local registry managed by Daytona
Build Image Namespace
Namespace to be used when tagging and pushing build images
>
Local Builder Registry Port
> 3988
Local Builder Registry Image
> registry:0.0.0
API Port
> 3986
Headscale Port
> 3987
Binaries Path
Directory will be created if it does not exist
> /Users/Library/Application Support/daytona/server/binaries
Log File Path
File will be created if it does not exist
> /Users/Library/Application Support/daytona/server/daytona.log
Frps Domain
> try-eu.daytona.app
Frps Port
> 7000
Frps Protocol
> https
```
Upon successful configuration, Daytona will validate the settings and ensure all specified directories and files are correctly set up, preparing the server for optimal operation.
```text
Server configuration updated. You need to restart the server for the changes to take effect.
```
Use the `daytona server restart` command to restart the server for the changes to take effect.
## Restart the Server
Run the following command to restart the Daytona Server:
```shell
daytona server restart
```
Upon running this command, Daytona will automatically stop and start The Daytona Server daemon.
```text
Stopping the Daytona Server daemon...
Starting the Daytona Server daemon...
Daytona Server daemon restarted successfully
```
## Stop the Server
Run the following command to stop the Daytona Server:
```shell
daytona server stop
```
Upon running this command, Daytona will stop the Daytona Server daemon.
```text
Stopping the Daytona Server daemon...
```
---
title: Target Configurations
description: Learn how to configure Target Configurations in Daytona.
---
A Target Configuration refers to the specific destination or environment where your development setup, facilitated by various [Providers](/docs/configuration/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.
Once you add your Target Configuration, it becomes available for selection whenever you create a new development environment in Daytona. You can create multiple Target Configurations, list existing ones, or delete those you no longer need.
## Create a Target Configuration
Daytona provides an option to create a Target Configuration to use when managing Workspaces.
1. Run the following command to create a Target Configuration:
```shell
daytona target-config create
```
2. Select the appropriate Provider for the environment you want to deploy to.
```text
Choose a provider
7 items
===
Docker
v0.0.0
DigitalOcean
v0.0.0
AWS
v0.0.0
Azure
v.0.0.0
GCP
v0.0.0
Hetzner
v0.0.0
Fly
v0.0.0
```
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider. The following example shows adding a [remote Docker Target Configuration](#docker-remote).
```text
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
```
5. Click **`Enter`** to confirm adding the Target Configuration.
```text
Target Config created successfully
```
## List Target Configurations
Daytona provides an option to keep track of your Target Configurations by listing all previously created Target Configurations with their details.
1. Run the following command to list currently set Target Configurations:
```shell
daytona target-config list
```
Upon running this command, Daytona will display a list of your Target Configurations with their details. You will be able to see the Target Configuration name, the Provider it is connected to, and its configured Runner.
```text
Target Provider Runner
────────────────────────────────────────────────
local docker-provider local
```
## Delete a Target Configuration
Daytona provides an option to delete Target Configurations, helping you manage and remove those that are no longer needed. Once a Target Configuration is deleted, you will not be able to manage or deploy Workspaces on that Target Configuration.
1. Run the following command to delete a Target Configuration:
```shell
daytona target-config delete
```
Upon running this command, Daytona will display a list of your Target Configurations with their details. You will be able to see the Configuration name, the unique identifier of the Workspace, and the repository it is connected to.
2. Press **`Enter`** on the selected Configuration to delete it.
```text
Choose a Target Config To Delete
1 item
===
MyTarget
docker-provider
```
3. Click **`Yes`** to confirm deleting the Target Configuration.
```text
Delete all workspaces within MyTarget?
You might not be able to easily remove these workspaces later.
[Yes] [No]
```
```text
Target Config MyTarget removed successfully
```
## Docker (Local)
Daytona provides an option to create a local Docker Target Configuration to use for deploying and managing Workspaces. The local Docker Target Configuration enables you to deploy Workspaces on your local machine using Docker.
:::note
Before creating a local Docker Target Configuration, ensure that [Docker](https://docs.docker.com/engine/install/) is installed and running on your local machine.
:::
1. Run the following command to create a Target Configuration:
```shell
daytona target-config create
```
2. Select **`Docker`** to use the local Docker Provider.
```text
Choose a provider
1 item
===
Docker
v0.0.0
```
3. Enter a name for your Target Configuration.
:::note
The Target Configuration needs to be named `local` to be recognized as the local Docker Target Configuration.
:::
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
Sock Path
> /var/run/docker.sock
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target config created successfully
```
## Docker (Remote)
Daytona provides an option to create a remote Docker Target Configuration to use for deploying and managing Workspaces. The remote Docker Target Configuration enables you to deploy Workspaces on a remote machine using Docker.
:::note
Before creating a remote Docker Target Configuration, ensure that [Docker](https://docs.docker.com/engine/install/) is installed and running on the remote server.
:::
1. Run the following command to create a Target Configuration:
```shell
daytona target-config add
```
2. Select **`Docker`** to use the Docker Provider.
```text
Choose a Provider
1 item
===
Docker
v0.0.0
```
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
Remote Hostname
>
Remote Password
>
Remote Port
>
Remote User
Note: non-root user required
>
Sock Path
> /var/run/docker.sock
Target Data Dir
The directory on the remote host where the target data will be stored
> /tmp/daytona-data
Remote Private Key Path
Showing files in: /home/user/.ssh
You can select a file, choose None or enter a Custom path
> config
> config.save
> id_rsa
> id_rsa.pub
> id_rsa_gitlab
> id_rsa_gitlab.pub
> known_hosts
> known_hosts.old
> Custom path
> None
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
## DigitalOcean
Daytona provides an option to create a DigitalOcean Target Configuration to use for deploying and managing Workspaces. The DigitalOcean Target Configuration enables you to deploy Workspaces a remote machine using DigitalOcean.
1. Run the following command to create a Target Configuration:
```shell
daytona target-config create
```
2. Select **`DigitalOcean`** to use the DigitalOcean Provider.
```text
Choose a provider
1 item
===
DigitalOcean
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
5. Enter the appropriate configuration options when prompted.
```text
Auth Token
If empty, token will be fetched from the DIGITALOCEAN_ACCESS_TOKEN environment variable.
>
Disk Size
>
Image
>
Region
>
Size
>
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
## AWS
Daytona provides an option to create an AWS Target Configuration to use for deploying and managing Workspaces.
1. Run the following command to create a Target Configuration:
```shell
daytona target-config create
```
2. Select **`AWS`** to use the AWS Provider.
```text
Choose a provider
1 item
===
AWS
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
Access Key Id
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_ACCESS_KEY_ID environment variable, or enter
your Id here.
>
Device Name
The device name for the volume. This is typically the root device name for specified AMI.
List of device names:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html
> /dev/sda1
Image Id
The ID of the Amazon Machine Image (AMI) to launch an instance. Default is ami-04a81a99f5ec58529.
How to find AMI that meets your needs:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html
> ami-04a81a99f5ec58529
Instance Type
The type of instance to launch. Default is t2.micro.
List of available instance types:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes
> t2.micro
Region
The geographic area where AWS resourced are hosted. List of available regions:
https://docs.aws.amazon.com/general/latest/gr/rande.html
Leave blank if you've set the AWS_DEFAULT_REGION environment variable, or enter your region here.
> us-east-1
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
> 20
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
>
```
5. Click **`Enter`** to confirm creating the Target Configuration.
```text
Target Config created successfully
```
## Azure
Daytona provides an option to set an Azure Target Configuration to use for deploying and managing Workspaces.
1. Run the following command to set a Target Configuration:
```shell
daytona target-config set
```
2. Select **`Azure`** to use the Azure Provider.
```text
Choose a provider
1 item
===
Azure
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
Client ID
Leave blank if you've set the AZURE_CLIENT_ID environment variable, or enter your Client Id here.
To find the this, look for "appId" in the output after generating client credentials.
https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash
>
Client Secret
Leave blank if you've set the AZURE_CLIENT_SECRET environment variable, or enter your Client
Secret here.
To find the this, look for "password" in the output after generating client credentials
https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash
>
Disk Size
The size of the instance volume, in GB. Default is 30 GB. It is recommended that the disk size should be more than 30 GB.
>
Disk Type
The type of the azure managed disk. Default is StandardSSD_LRS. List of available disk types:
https://docs.microsoft.com/azure/virtual-machines/linux/disks-typesList of available disk types per location can be retrieved using the command:
az vm list-skus --location --output table
>
Image URN
The identifier of the Azure virtual machine image to launch an instance. Default is Canonical:ubuntu-24_04-lts:server:latest.
List of available images:
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage
>
Region
The geographic area where Azure resources are hosted. Default is centralus.
List of available regions can be retrieved using the command:
"az account list-locations -o table"
>
Resource Group
If not set, Daytona will create a "daytona" resource group. How to create resource group:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal
>
Subscription ID
Leave blank if you've set the AZURE_SUBSCRIPTION_ID environment variable, or enter your Subscription Id here.
How to find subscription id:
https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription
>
Tenant ID
Leave blank if you've set the AZURE_TENANT_ID environment variable, or enter your Tenant Id here.
To find the this, look for "tenant" in the output after generating client credentials.
https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash
>
VM Size
Leave blank if you've set the AZURE_TENANT_ID environment variable, or enter your Tenant Id here.
To find the this, look for "tenant" in the output after generating client credentials.
https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash
>
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
## GCP
Daytona provides an option to create a Google Cloud Platform (GCP) Target Configuration to use for deploying and managing Workspaces.
1. Run the following command to set a Target Configuration:
```shell
daytona target-config create
```
2. Select **`GCP`** to use the GCP Provider.
```text
Choose a provider
1 item
===
GCP
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
Disk Size
The size of the instance volume, in GB. Default is 20 GB.
>
Disk Type
The GCP disk type to use for the VM. Default is pd-standard.
https://cloud.google.com/compute/docs/disks
List of available disk types can be retrieved using the command:
gcloud compute disk-types list
>
Machine Type
The GCP machine type to use for the VM. Default is List n1-standard-1.
https://cloud.google.com/compute/docs/general-purpose-machines
List of available machine types can be retrieved using the command:
gcloud compute machine-types list
>
Project ID
The GCP project ID where the resources will be created.
Leave blank if you've set the GCP_PROJECT_ID.
How to locate the project ID:
https://support.google.com/googleapi/answer/7014113?hl=en
>
VM Image
The GCP image to use for the VM.
Default is projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts
https://cloud.google.com/compute/docs/images
List of available images can be retrieved using the command:
gcloud compute images list
>
Zone
The GCP zone where the resources will be created. Default is us-central1-a.
https://cloud.google.com/compute/docs/regions-zones
List of available zones can be retrieved using the command:
gcloud compute zones list
>
Credential File
Full path to the GCP service account JSON key file.
Leave blank if you've set the GCP_CREDENTIAL_FILE environment variable.
Ensure that the file is secure and accessible only to authorized users.
>
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
## Hetzner
Daytona provides an option to create a Hetzner Target Configuration to use for deploying and managing Workspaces.
1. Run the following command to set a Target Configuration:
```shell
daytona target-config create
```
2. Select **`Hetzner`** to use the Hetzner Provider.
```text
Choose a provider
1 item
===
Hetzner
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
API Token
If empty, token will be fetched from the HETZNER_API_TOKEN environment
variable.
>
Disk Image
The Hetzner image to use for the VM. Default is ubuntu-24.04.
https://docs.hetzner.com/robot/dedicated-server/operating-systems/standard-
images
>
Disk Size
The size of the instance volume, in GB. Default is 20 GB.
>
Location
The locations where the resources will be created. Default is fsn1.
https://docs.hetzner.com/cloud/general/locations
>
Location
Server Type
The Hetzner server type to use for the VM. Default is List cpx11.
https://docs.hetzner.com/cloud/servers/overview
>
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
## Fly
Daytona provides an option to create a Fly Target Configuration to use for deploying and managing Workspaces.
1. Run the following command to set a Target Configuration:
```shell
daytona target-config create
```
2. Select **`Fly`** to use the Fly Provider.
```text
Choose a provider
1 item
===
Fly
v0.0.0
```
:::note
If you have not previously installed a [Runner](/docs/usage/runners), Daytona will prompt you select a Runner to manage the Provider. Upon selecting, Daytona will install the Runner on the target system and connect it to the Daytona Server.
:::
3. Enter a name for your Target Configuration.
```text
Target Config Name
>
```
4. Enter the appropriate configuration options when prompted.
```text
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
>
```
5. Click **`Enter`** to confirm setting the Target Configuration.
```text
Target Config created successfully
```
---
title: Workspace Templates
description: Learn how to manage and reuse Workspaces Templates across multiple Workspaces.
---
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.
A Workspace Template encapsulates all the essential elements for setting up a Workspace, including:
- **Repository URL**
The URL of the Git repository associated with the Workspace.
- **Build Configuration**
[Automatic](/docs/usage/builders#automatic) auto-detects the most appropriate Builder for your Workspace.
[Devcontainer](/docs/usage/builders#dev-container) utilizes a predefined development container specified by a `devcontainer.json` file.
[Custom image](/docs/usage/builders#custom-image) builds the Workspace image by specifying a custom base container.
[None](/docs/usage/builders#none) builds a Workspace by using the default base image (`daytonaio/workspace-project`).
- **Environment Variables**
Environment variables are specified in the `KEY=VALUE` format. These variables are essential for the Workspace's build and runtime environments. You can set the variables directly or pass them from the machine's environment during execution.
- **Workspace Template name**
A unique identifier for the Workspace Template, which distinguishes it from other Template within the system.
With the `daytona workspace-template` command, you can add, view, update, list, set as default, or delete Workspace Templates, giving you full control over the Template and reuse of your Workspace setups across different Workspaces.
## Create a Workspace Template
Daytona provides an option to add a Workspace Template, enabling you to store and reuse Workspace properties across multiple Workspaces.
1. Run the following command to add a Workspace Template:
```shell
daytona workspace-template add
```
2. 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.
3. Enter the repository URL of the Workspace you want to configure, or select to create a Workspace Template from a sample project.
```text
Git repository
>
```
4. Enter a name for the Workspace Template.
```text
Name
>
```
5. Select the build configuration for the Workspace.
```text
Choose a build configuration
Automatic
Devcontainer
Custom image
None
```
6. Enter the environment variables for the Workspace in the **`KEY=VALUE`** format.
```text
Environment Variables
Enter environment variables in the format KEY=VALUE
To pass machine env variables at runtime, use $VALUE
```
Upon completion, Daytona will output a summary of the Workspace Template, enabling you to review the properties before saving it.
```text
SUMMARY - Workspace Template
Workspace - MyWorkspace
Repository https://github.com/daytonaio/docs
Branch main
Build Automatic
Image daytonaio/workspace-project:latest
User daytona
```
7. Click **`Create`** to save the Workspace Template, or **`Configure`** to make changes to the Workspace Template.
```text
Workspace template added successfully
```
## List Workspace Templates
Daytona provides an option to list all Workspace Templates, providing you with an overview of the properties stored within each Template.
1. Run the following command to list all Workspace Templates:
```shell
daytona workspace-template list
```
Upon running this command, Daytona will display a list of your Workspace Templates. You will be able to view the Workspace Template name, the repository URL it is connected to, the build configuration, and if it is set as a default Template.
```text
Name Repository Build Default
────────────────────────────────────────────────────────────────────
MyWorkspaceConfig daytonaio/daytona Devcontainer Yes
```
## Update Workspace Template
Daytona provides an option to update an existing Workspace Template, enabling you to modify the properties stored within it.
1. Run the following command to update a Workspace Template:
```shell
daytona workspace-template update
```
2. Select the Workspace Template you want to update.
```text
Select a Workspace Template To Update
1 item
MyWorkspaceTemplate
https://github.com/username/MyWorkspace
```
```text
Workspace Template updated successfully
```
## Delete Workspace Template
Daytona provides an option to delete an existing Workspace Template, enabling you to remove properties that are no longer needed.
1. Run the following command to delete a Workspace Template:
```shell
daytona workspace-template delete
```
2. Select the Workspace Template you want to delete.
```text
Select a Workspace Template To Delete
1 item
MyWorkspaceTemplate
https://github.com/username/repository
```
```text
Workspace Template deleted successfully
```
## Workspace Template Information
Daytona provides an option to view detailed information of a Workspace Template, providing you with an overview of the properties stored within it.
1. Run the following command to view the details of a Workspace Template:
```shell
daytona workspace-template info
```
Upon running this command, Daytona will display a list of your Workspace Templates.
2. Select the Workspace Template you want to view.
```text
Select a Workspace Config To View
1 item
MyWorkspaceConfig
https://github.com/username/MyWorkspace
```
Upon selecting the Workspace Template, Daytona will display the details of the selected Template. You will be able to view the Workspace Template name, the repository URL it is linked to, the build configuration, and the Devcontainer path.
```text
Workspace Config Info
Name MyWorkspaceConfig
Repository https://github.com/username/MyWorkspace
Build Devcontainer
Devcontainer path .devcontainer/devcontainer.json
```
## Set Default Workspace Template
Daytona provides an option to set a default Workspace Template, enabling you to define a Template that will be used by default when creating new Workspaces.
1. Run the following command to set a default Workspace Template:
```shell
daytona workspace-template set-default
```
2. Select the Workspace Template you want to set as the default.
```text
Select a Workspace Template To Set As Default
1 item
MyWorkspaceTemplate
https://github.com/username/MyWorkspace
```
Upon selecting the default Workspace Template, Daytona will set it as the default Template for new Workspaces.
```text
Workspace Template 'MyWorkspaceTemplate' set as default
```
3. Update the properties of the Workspace Template.
```text
Choose a build configuration
Automatic
Devcontainer
Custom image
None
```
```text
Environment Variables
Enter environment variables in the format KEY=VALUE
To pass machine env variables at runtime, use $VALUE
```
Upon completion, Daytona will save the updated Workspace Template, allowing you to reuse it across Workspaces.
```text
Workspace Template updated successfully
```
## Import Workspace Template
Daytona provides an option to import a Workspace Template, enabling you to reuse existing Workspace properties across multiple Workspaces.
1. Run the following command to import a Workspace Template:
```shell
daytona workspace-template import
```
2. Enter the Workspace Template as a JSON object or an array of JSON objects.
```text
Import Workspace Template
Enter Workspace Template as a JSON object or an array of JSON objects
```
- An empty example of the JSON object properties format:
```json
[
{
"buildConfig": {},
"default": true,
"envVars": {},
"image": "",
"labels": null,
"name": "",
"repositoryUrl": "",
"user": ""
}
]
```
## Export Workspace Template
Daytona provides an option to export a Workspace Template, enabling you to save the properties of a Workspace Template as a JSON object.
1. Run the following command to export a Workspace Template:
```shell
daytona workspace-template export
```
2. Select the Workspace Template you want to export.
```text
Select a Workspace Template To Export
1 item
MyWorkspaceTemplate
https://github.com/username/repository
```
Upon selecting the Workspace Template you want to export, Daytona will output the properties of the selected Template as a JSON object.
```json
[
{
"buildConfig": {},
"default": true,
"envVars": {},
"image": "daytonaio/workspace-project:latest",
"labels": null,
"name": "MyWorkspaceTemplate",
"repositoryUrl": "https://github.com/username/repository",
"user": "daytona"
}
]
```
---
title: Documentation Home
description: Start managing your Workspaces with Daytona.
template: doc
head:
- tag: title
content: Documentation · Daytona
- tag: meta
attrs:
property: og:title
content: Documentation · Daytona
- tag: meta
attrs:
name: twitter:title
content: Documentation · Daytona
tableOfContents: false
---
---
title: Installation
description: Learn how to install Daytona on Linux, macOS, and Windows.
sidebar:
label: Installation
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
import Homebrew from './method/homebrew.mdx'
import Nix from './method/nix.mdx'
import ScriptPowerShell from './method/script-powershell.mdx'
import ScriptUnix from './method/script-unix.mdx'
import Uninstall from './method/uninstall.mdx'
import UninstallWindows from './method/uninstall-windows.mdx'
Install Daytona on Linux, macOS, and Windows systems.
Each operating system supports both `x86_64` and `ARM64` architectures.
Daytona leverages [Docker](https://docs.docker.com/engine/install/) to create and manage isolated development environments.
## Installation
Install Daytona on Linux using the following installation script:
```shell
(curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash) && daytona server -y && daytona
```
:::note
You can install Daytona by manually downloading the binary and placing it in your `PATH`.
```shell
# x86-64
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-linux-amd64 -o daytona
# ARM64
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-linux-arm64 -o daytona
```
:::
Install Daytona on macOS using the following installation script:
```shell
(curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash) && daytona server -y && daytona
```
:::note
You can install Daytona by manually downloading the binary and placing it in your `PATH`.
```shell
# x86-64/Intel-based
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-darwin-amd64 -o daytona
# ARM64/Apple Silicon
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-darwin-arm64 -o daytona
```
:::
Install Daytona on Windows using the following PowerShell script:
```powershell
$architecture = if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") { "amd64" } else { "arm64" }
md -Force "$Env:APPDATA\bin\daytona"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://download.daytona.io/daytona/v0.53/daytona-windows-$architecture.exe" -OutFile "$Env:APPDATA\bin\daytona\daytona.exe";
$env:Path += ";" + $Env:APPDATA + "\bin\daytona"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
daytona serve;
```
:::note
You can install Daytona by manually downloading the binary and placing it in your `PATH`.
```sh
# x86-64
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-windows-amd64.exe -o daytona
# AArch64
curl -sf -L https://download.daytona.io/daytona/v0.53/daytona-windows-arm64.exe -o daytona
```
:::
:::tip
If you are using Windows Subsystem for Linux (WSL), you can follow the [instructions](https://github.com/daytonaio/daytona/issues/282) on how to run Daytona when using an IDE reliant on the SSH client.
:::
## Uninstallation
---
title: Telemetry
description: Information about telemetry data gathered by Daytona.
sidebar:
label: Telemetry
---
All telemetry data is **completely anonymous** and **does not** include any personally identifiable information (PII) or user secrets.
Participation is optional and you may opt-out at any time.
## The Goal
The goal of gathering telemetry data in the CLI is exclusively for the purpose of improving the Daytona ecosystem.
Data gathered from the CLI will allow us to gain more insights into the usage of the binary, help us track errors and improve user experience.
The data **does** include:
- **CLI command usage**
This includes the name of the command that was run, how it was called (e.g., was an alias used?),
the source (e.g., local CLI or inside of a project), the version of the binary, and the execution time.
- **API server request and response data**
In the request and response payloads, only public data is included.
This data may include any public git repositories used to create workspaces and any public container images used to create workspaces.
The data also includes the path of the request, with URL parameters that might include PII stripped (e.g., URI: `/workspace/:workspaceId/:projectName/state` is provided as is,
with `workspaceId` and `projectName` not provided to the telemetry service).
Additionally, the request method, binary version, query, and source are gathered.
- **Relevant server events**
Currently, only workspace lifecycle events are gathered (creation, stop, start, delete, etc.), but this might be expanded in the future.
The data **does not** include:
- **CLI command arguments**
Arguments might contain PII or user secrets, so they are left out.
- **Full API request and response payloads**
Payloads may contain PII or user secrets, so only public data is shared with the telemetry collection service.
- **Environment variables**
Any environment variables set on projects created by the user, including Daytona-set environment variables, are not included.
- **Geolocation information and IP address**
No geolocation information about the user or their IP address is included.
## Gathering Policy
Telemetry gathering in the CLI is **opt-out**. This means that telemetry data is gathered by default because it does not include any PII.
- To disable telemetry, users can run `daytona telemetry disable`.
- To enable telemetry, users can run `daytona telemetry enable`.
## CLI Identifier
All telemetry events contain a unique identifier. The ID is set in the CLI configuration.
The purpose of this identifier is to provide a way to aggregate telemetry data from the same CLI across different sessions and workspaces.
This means that the CLI ID is shared between the CLI and any workspaces the user might create.
## Data Protection
We use Posthog as our Telemetry service of choice.
The data is stored in the EU under the Daytona organization account.
The data is available only to a subset of Daytona maintainers and is only used for the purpose of improving the Daytona ecosystem.
The telemetry data that we track has never and will never be sold or monetized in any form.
## Debugging
Telemetry events can be debugged by setting `LOG_LEVEL=trace` which will output information about the telemetry event queue.
---
title: Troubleshooting
description: Troubleshooting Daytona
sidebar:
label: Troubleshooting
---
You can use the following troubleshooting tips to resolve common issues with Daytona.
## Connectivity Issues
### VPNs and Firewalls
If your VPN is configured to handle all IP traffic or if your Firewall is configured to block certain IP addresses, they may prevent Daytona from successfully connecting to the reverse proxy service.
The issue can be manifested in different ways, including:
- Unable to start the Daytona Server due to the `control not running` error.
- Unable to successfully create Workspaces due to the `Failed to connect to server: Get "http://server/health": lookup server...` error.
- Unable to enter a Workspace using `daytona code` or `daytona ssh` due to the timeout when establishing a Tailscale connection.
To work around this issue, you may need to add the following IP address exceptions to your VPN or Firewall:
- `35.198.165.62` - Europe-based reverse proxy
- `34.133.75.4` - US-based reverse proxy
## WSL2 with Visual Studio Code
### Description
Running Daytona on WSL2 does not work seamlessly with the Visual Studio Code IDE. This issue arises because Visual Studio Code relies on the native Windows SSH client, whereas Daytona modifies the Linux SSH configuration file to set up workspace-specific SSH connection configurations.
Daytona uses a ProxyCommand that invokes `daytona ssh-proxy` as defined in the SSH configuration. This configuration assumes that the Daytona binary is located within the Linux filesystem, which creates a conflict with Visual Studio Code's reliance on the Windows environment.
This issue is not specific to Daytona but rather stems from a limitation in the Visual Studio Code remote development plugin. The plugin does not currently support passing a custom "remote SSH path" flag when invoking the `code` CLI. Without this feature, Daytona's reliance on Linux-specific configurations conflicts with Visual Studio Code's dependency on Windows-native tools.
### Solution
While awaiting official support for a "remote SSH path" flag in the Visual Studio Code plugin, the following workaround can address the issue. This solution involves creating a script and modifying configurations to align the Windows and Linux SSH clients for seamless operation.
1. Create a **`wsl_ssh.bat`** script with the following content:
```bash
C:\Windows\system32\wsl.exe ssh %*
```
2. Save the **`wsl_ssh.bat`** script in the following directory:
```text
C:\Users\\AppData\Roaming\bin\wsl_ssh.bat
```
3. Update the Visual Studio Code **`settings.json`** file to use the **`wsl_ssh.bat`** script as the SSH path:
```sh
"remote.SSH.path": "C:\\Users\\\\AppData\\Roaming\\bin\\wsl_ssh.bat"
```
:::tip
The `settings.json` file is located in the following directory:
`C:\Users\\AppData\Roaming\Code\User\settings.json`
:::
4. Create a symlink to synchronize the native SSH configuration with the WSL2 SSH configuration:
```sh
ln -s /mnt/c/Users//.ssh/config config
```
This ensures the SSH configuration is consistent between environments.
---
title: Configuration
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides flexible configuration options to customize its behavior and connection settings.
## Configuration Options
Daytona SDK provides an option to configure settings using the `DaytonaConfig` class in Python and TypeScript. The `DaytonaConfig` class accepts the following parameters:
- `api_key`: Your Daytona API key
- `server_url`: URL of your Daytona server
- `target`: Daytona Target to create the Workspaces on.
```python
from daytona_sdk import DaytonaConfig
config = DaytonaConfig(
api_key="your-api-key",
server_url="your-server-url",
target="local"
)
```
```typescript
import { DaytonaConfig } from '@daytonaio/sdk';
const config: DaytonaConfig = {
apiKey: "your-api-key",
serverUrl: "your-server-url",
target: "local"
};
```
## Environment Variables
Daytona SDK supports environment variables for configuration. The SDK automatically looks for these environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| **`DAYTONA_API_KEY`** | Your Daytona API key. | None |
| **`DAYTONA_SERVER_URL`** | URL of your Daytona server. | None |
| **`DAYTONA_TARGET`** | Daytona Target to create the Workspaces on. | "local" |
### Setting Environment Variables
Daytona SDK can read configuration from environment variables. You can set these environment variables using the following methods:
- [Using a **`.env`** file](#using-a-env-file)
- [Using Shell Environment](#using-shell-environment)
#### Using a **`.env`** File
Create a `.env` file in your project root directory:
```bash
DAYTONA_API_KEY=your-api-key
DAYTONA_SERVER_URL=https://your-server-url
DAYTONA_TARGET=local
```
- `DAYTONA_API_KEY`: Your Daytona API key.
- `DAYTONA_SERVER_URL`: URL of your Daytona server.
- `DAYTONA_TARGET`: Daytona Target to create the Workspaces on.
#### Using Shell Environment
Set environment variables in your shell:
```bash
export DAYTONA_API_KEY=your-api-key
export DAYTONA_SERVER_URL=https://your-server-url
```
```bash
$env:DAYTONA_API_KEY="your-api-key"
$env:DAYTONA_SERVER_URL="https://your-server-url"
```
## Configuration Precedence
The SDK uses the following precedence order for configuration (highest to lowest):
1. Explicitly passed configuration in code.
2. Environment variables.
3. Configuration file.
4. Default values.
---
title: File System Operations
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides comprehensive file system operations through the `fs` module in workspaces. This guide covers all available file system operations and best practices.
## Basic Operations
Daytona SDK provides an option to interact with the file system in Workspaces. You can perform various operations like listing files, creating directories, reading and writing files, and more.
### Listing Files and Directories
Daytona SDK provides an option to list files and directories in a Workspace using Python and TypeScript.
```python
# List files in a directory
files = workspace.fs.list_files("/workspace")
for file in files:
print(f"Name: {file.name}")
print(f"Is directory: {file.is_dir}")
print(f"Size: {file.size}")
print(f"Modified: {file.mod_time}")
```
```typescript
// List files in a directory
const files = await workspace.fs.listFiles("/workspace");
files.forEach(file => {
console.log(`Name: ${file.name}`);
console.log(`Is directory: ${file.isDir}`);
console.log(`Size: ${file.size}`);
console.log(`Modified: ${file.modTime}`);
});
```
### Creating Directories
Daytona SDK provides an option to create directories with specific permissions using Python and TypeScript.
```python
# Create a directory
workspace.fs.create_folder("/workspace/new-dir")
# Create with specific permissions
workspace.fs.create_folder("/workspace/new-dir", "755")
```
```typescript
// Create a directory
await workspace.fs.createFolder("/workspace/new-dir");
// Create with specific permissions
await workspace.fs.createFolder("/workspace/new-dir", "755");
```
### File Operations
Daytona SDK provides options to read, write, upload, download, and delete files in Workspaces using Python and TypeScript.
```python
# Upload a file
with open("local_file.txt", "rb") as f:
content = f.read()
workspace.fs.upload_file("/workspace/remote_file.txt", content)
# Download a file
content = workspace.fs.download_file("/workspace/remote_file.txt")
with open("local_file.txt", "wb") as f:
f.write(content)
# Delete a file
workspace.fs.delete_file("/workspace/file.txt")
```
```typescript
// Upload a file
const fileContent = new File(
[Buffer.from('Hello, World!')],
'data.txt',
{ type: 'text/plain' }
);
await workspace.fs.uploadFile("/workspace/remote_file.txt", fileContent);
// Download a file
const downloadedFile = await workspace.fs.downloadFile("/workspace/remote_file.txt");
console.log('File content:', downloadedFile.toString())
// Delete a file
await workspace.fs.deleteFile("/workspace/file.txt");
```
## Advanced Operations
Daytona SDK provides advanced file system operations like file permissions, search and replace, and more.
### File Permissions
Daytona SDK provides an option to set file permissions, get file permissions, and set directory permissions recursively using Python and TypeScript.
```python
# Set file permissions
workspace.fs.set_file_permissions("/workspace/file.txt", "644")
# Get file permissions
file_info = workspace.fs.get_file_info("/workspace/file.txt")
print(f"Permissions: {file_info.permissions}")
```
```typescript
// Set file permissions
await workspace.fs.setFilePermissions("/workspace/file.txt", { mode: "644" });
// Get file permissions
const fileInfo = await workspace.fs.getFileDetails("/workspace/file.txt");
console.log(`Permissions: ${fileInfo.permissions}`);
```
### File Search and Replace
Daytona SDK provides an option to search for text in files and replace text in files using Python and TypeScript.
```python
# Search for text in files; if a folder is specified, the search is recursive
results = workspace.fs.find_files(
path="/workspace/src",
pattern="text-of-interest"
)
for match in results:
print(f"Absolute file path: {match.file}")
print(f"Line number: {match.line}")
print(f"Line content: {match.content}")
print("\n")
# Replace text in files
workspace.fs.replace_in_files(
files=["/workspace/file1.txt", "/workspace/file2.txt"],
pattern="old_text",
new_value="new_text"
)
```
```typescript
// Search for text in files; if a folder is specified, the search is recursive
const results = await workspace.fs.findFiles({
path="/workspace/src",
pattern: "text-of-interest"
});
results.forEach(match => {
console.log('Absolute file path:', match.file)
console.log('Line number:', match.line)
console.log('Line content:', match.content)
});
// Replace text in files
await workspace.fs.replaceInFiles(
["/workspace/file1.txt", "/workspace/file2.txt"],
"old_text",
"new_text"
);
```
---
title: Getting Started
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides official Python and TypeScript interfaces for interacting with Daytona, enabling you to programmatically manage development environments and execute code.
View the Daytona SDK repository on [GitHub](https://github.com/daytonaio/sdk).
Follow the step by step guide to create and run your first Daytona Workspace for an AI Agent.
## Install Daytona
Install Daytona by following the [installation instructions](https://www.daytona.io/docs/installation/installation/). If you have Beta access to the Daytona platform, create an account and log in.
## Set Up Your Environment Variables
To authenticate with Daytona, you need an API key. You can obtain an API key from the Daytona platform or generate one using the Daytona CLI.
1. Navigate to the Daytona platform.
2. Go to API Keys.
3. Click the **`Create Key`** button.
4. Paste the API key in your **`.env`** file.
1. Type the following command:
```bash
daytona api-key generate
```
2. Paste the API key in your **`.env`** file.
## Install the Daytona SDK
Daytona provides official Python and TypeScript SDKs for interacting with the Daytona platform. Install the SDK using your preferred method.
```bash
pip install daytona-sdk
```
```bash
# Using npm
npm install @daytonaio/sdk
# Using yarn
yarn add @daytonaio/sdk
# Using pnpm
pnpm add @daytonaio/sdk
```
## Write Code to Create a Workspace
Create and run your code within Daytona Workspace using the SDK. Daytona provides a simple and intuitive interface for interacting with Daytona.
Use the Daytona SDK [Python examples](https://github.com/daytonaio/sdk/tree/main/examples/python) or [TypeScript/JavaScript examples](https://github.com/daytonaio/sdk/tree/main/examples/typescript) to create a Workspace and run your code.
### Execute Commands
Run the following code to create a Daytona Workspace and execute commands:
```python
from daytona_sdk import Daytona, CreateWorkspaceParams
# Initialize the Daytona client
daytona = Daytona()
# Create the workspace instance
params = CreateWorkspaceParams(language="python")
workspace = daytona.create(params)
# Run the code securely inside the workspace
response = workspace.process.code_run('print("Sum of 3 and 4 is " + str(3 + 4))')
if response.exit_code != 0:
print(f"Error running code: {response.exit_code} {response.result}")
else:
print(response.result)
# Clean up the workspace
daytona.remove(workspace)
```
```typescript
import { Daytona } from '@daytonaio/sdk'
async function main() {
// Initialize the Daytona client
const daytona = new Daytona()
try {
// Create the workspace instance
const workspace = await daytona.create({
language: 'python',
})
// Run the code securely inside the workspace
const response = await workspace.process.codeRun(
'print("Sum of 3 and 4 is " + str(3 + 4))',
)
if (response.exitCode !== 0) {
console.error('Error running code:', response.exitCode, response.result)
} else {
console.log(response.result)
}
} catch (error) {
console.error('Workspace flow error:', error)
} finally {
// Clean up the workspace
await daytona.remove(workspace)
}
}
main()
```
## Start your Workspace
Daytona provides two methods for starting your Workspace:
- Using Python
- Using TypeScript/JavaScript
Choose the appropriate method based on your preferred language.
```bash
python main.py
```
```bash
npx tsx ./index.ts
```
---
title: Git Operations
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides built-in Git support through the `git` module in Workspaces. This guide covers all available Git operations and best practices.
## Basic Operations
Daytona SDK provides an option to clone, check status, and manage Git repositories in Workspaces. You can interact with Git repositories using the `git` module.
### Cloning Repositories
Daytona SDK provides an option to clone Git repositories into Workspaces using Python and TypeScript. You can clone public or private repositories, specific branches, and authenticate using personal access tokens.
```python
# Basic clone
workspace.git.clone(
url="https://github.com/user/repo.git",
path="/workspace/repo"
)
# Clone with authentication
workspace.git.clone(
url="",
path="/workspace/repo",
username="git",
password="personal_access_token"
)
# Clone specific branch
workspace.git.clone(
url="",
path="/workspace/repo",
branch="develop"
)
```
```typescript
// Basic clone
await workspace.git.clone(
"https://github.com/user/repo.git",
"/workspace/repo"
);
// Clone with authentication
await workspace.git.clone(
"https://github.com/user/repo.git",
"/workspace/repo",
undefined,
undefined,
"git",
"personal_access_token"
);
// Clone specific branch
await workspace.git.clone(
"https://github.com/user/repo.git",
"/workspace/repo",
"develop"
);
```
### Repository Status
Daytona SDK provides an option to check the status of Git repositories in Workspaces. You can get the current branch, modified files, number of commits ahead and behind main branch using Python and TypeScript.
```python
# Get repository status
status = workspace.git.status("/workspace/repo")
print(f"Current branch: {status.current_branch}")
print(f"Commits ahead: {status.ahead}")
print(f"Commits behind: {status.behind}")
for file in status.file_status:
print(f"File: {file.name}")
# List branches
response = workspace.git.branches("/workspace/repo")
for branch in response.branches:
print(f"Branch: {branch}")
```
```typescript
// Get repository status
const status = await workspace.git.status("/workspace/repo");
console.log(`Current branch: ${status.currentBranch}`);
console.log(`Commits ahead: ${status.ahead}`);
console.log(`Commits behind: ${status.behind}`);
status['FileStatus[]'].forEach(file => {
console.log(`File: ${file.name}`);
});
// List branches
const response = await workspace.git.branches("/workspace/repo");
response.branches.forEach(branch => {
console.log(`Branch: ${branch}`);
});
```
## Branch Operations
Daytona SDK provides an option to manage branches in Git repositories. You can create, switch, and delete branches.
### Managing Branches
Daytona SDK provides an option to create, switch, and delete branches in Git repositories using Python and TypeScript.
```python
# Create new branch
workspace.git.create_branch("/workspace/repo", "feature/new-feature")
# Switch branch
workspace.git.checkout("/workspace/repo", "feature/new-feature")
# Delete branch
workspace.git.delete_branch("/workspace/repo", "feature/old-feature")
```
```typescript
// Create new branch
await workspace.git.createBranch("/workspace/repo", "feature/new-feature");
// Switch branch
await workspace.git.checkout("/workspace/repo", "feature/new-feature");
// Delete branch
await workspace.git.deleteBranch("/workspace/repo", "feature/old-feature");
```
## Staging and Committing
Daytona SDK provides an option to stage and commit changes in Git repositories. You can stage specific files, all changes, and commit with a message using Python and TypeScript.
### Working with Changes
```python
# Stage specific files
workspace.git.add("/workspace/repo", ["file1.txt", "file2.txt"])
# Stage all changes
workspace.git.add("/workspace/repo", ["."])
# Commit changes
workspace.git.commit("/workspace/repo", "feat: add new feature")
# Get commit history
commits = workspace.git.log("/workspace/repo")
for commit in commits:
print(f"Commit: {commit.hash}")
print(f"Author: {commit.author}")
print(f"Message: {commit.message}")
```
```typescript
// Stage specific files
await workspace.git.add("/workspace/repo", ["file1.txt", "file2.txt"]);
// Stage all changes
await workspace.git.add("/workspace/repo", ["."]);
// Commit changes
await workspace.git.commit("/workspace/repo", "feat: add new feature");
// Get commit history
const commits = await workspace.git.log("/workspace/repo");
commits.forEach(commit => {
console.log(`Commit: ${commit.hash}`);
console.log(`Author: ${commit.author}`);
console.log(`Message: ${commit.message}`);
});
```
## Remote Operations
Daytona SDK provides an option to work with remote repositories in Git. You can push changes, pull changes, and list remotes.
### Working with Remotes
Daytona SDK provides an option to push, pull, and list remotes in Git repositories using Python and TypeScript.
```python
# Push changes
workspace.git.push("/workspace/repo")
# Pull changes
workspace.git.pull("/workspace/repo")
# List remotes
remotes = workspace.git.list_remotes("/workspace/repo")
for remote in remotes:
print(f"Remote: {remote.name} URL: {remote.url}")
```
```typescript
// Push changes
await workspace.git.push("/workspace/repo");
// Push to specific remote and branch
await workspace.git.push("/workspace/repo", "origin", "feature/new-feature");
// Pull changes
await workspace.git.pull("/workspace/repo");
// Pull from specific remote and branch
await workspace.git.pull("/workspace/repo", "origin", "main");
```
---
title: SDK Documentation
description: Start managing your Workspaces with Daytona.
template: doc
tableOfContents: false
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides official Python and TypeScript interfaces for interacting with Daytona, enabling you to programmatically manage development environments and execute code.
### Quick Start
```bash
pip install daytona_sdk
```
```python
from daytona_sdk import Daytona, DaytonaConfig
# Define the configuration
config = DaytonaConfig(
api_key="your-api-key",
server_url="your-server-url",
target="us"
)
# Initialize the Daytona client
daytona = Daytona(config)
# Create the workspace instance
workspace = daytona.create()
# Run the code securely inside the workspace
response = workspace.process.code_run('print("Hello World from code!")')
if response.exit_code != 0:
print(f"Error: {response.exit_code} {response.result}")
else:
print(response.result)
daytona.remove(workspace)
```
```bash
npm install @daytonaio/sdk
```
```typescript
import { Daytona } from '@daytonaio/sdk';
// Initialize the Daytona client
const daytona = new Daytona({
apiKey: 'your-api-key',
serverUrl: 'your-server-url',
target: 'us'
});
// Create the workspace instance
const workspace = await daytona.create({
language: 'typescript',
});
// Run the code securely inside the workspace
const response = await workspace.process.codeRun('console.log("Hello World from code!")')
console.log(response.result);
```
---
title: Language Server Protocol
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides Language Server Protocol (LSP) support through workspace instances. This enables advanced language features like code completion, diagnostics, and more.
## Creating LSP Servers
Daytona SDK provides an option to create LSP servers using Python and TypeScript.
```python
from daytona_sdk import Daytona, LspLanguageId
# Create workspace
daytona = Daytona()
workspace = daytona.create()
# Create LSP server for Python
lsp_server = workspace.create_lsp_server(
language_id=LspLanguageId.PYTHON,
path_to_project="/workspace/project"
)
```
```typescript
import { Daytona, LspLanguageId } from '@daytonaio/sdk'
// Create workspace
const daytona = new Daytona()
const workspace = await daytona.create({
language: 'typescript'
})
// Create LSP server for TypeScript
const lspServer = workspace.createLspServer(
LspLanguageId.TYPESCRIPT,
"/workspace/project"
)
```
## Supported Languages
Daytona SDK provides an option to create LSP servers for various languages through the `LspLanguageId` enum in Python and TypeScript.
```python
from daytona_sdk import LspLanguageId
# Available language IDs
LspLanguageId.PYTHON
LspLanguageId.TYPESCRIPT
```
```typescript
import { LspLanguageId } from '@daytonaio/sdk'
// Available language IDs
LspLanguageId.PYTHON
LspLanguageId.TYPESCRIPT
```
- `LspLanguageId.PYTHON`: Python language server.
- `LspLanguageId.TYPESCRIPT`: TypeScript/JavaScript language server.
## LSP Features
Daytona SDK provides various LSP features for code analysis and editing.
### Code Completion
Daytona SDK provides an option to get code completions for a specific position in a file using Python and TypeScript.
```python
completions = lsp_server.completions(
path="/workspace/project/main.py",
position={"line": 10, "character": 15}
)
print(f"Completions: {completions}")
```
```typescript
const completions = await lspServer.getCompletions({
path: "/workspace/project/main.ts",
position: { line: 10, character: 15 }
})
console.log('Completions:', completions)
```
---
title: Process and Code Execution
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
The Daytona SDK provides powerful process and code execution capabilities through the `process` module in workspaces. This guide covers all available process operations and best practices.
## Code Execution
Daytona SDK provides an option to execute code in Python and TypeScript.
### Running Code
Daytona SDK provides an option to run code snippets in Python and TypeScript. You can execute code with input, timeout, and environment variables.
```python
# Run Python code
response = workspace.process.code_run('''
def greet(name):
return f"Hello, {name}!"
print(greet("Daytona"))
''')
print(response.result)
```
```typescript
// Run TypeScript code
const response = await workspace.process.codeRun(`
function greet(name: string): string {
return \`Hello, \${name}!\`;
}
console.log(greet("Daytona"));
`);
console.log(response.result);
// Run code with input
const response = await workspace.process.codeRun(
'const name = prompt("Enter name: ");\nconsole.log(`Hello, ${name}!`);',
{ input: "Daytona" }
);
console.log(response.result);
// Run code with timeout
const response = await workspace.process.codeRun(
'setTimeout(() => console.log("Done"), 2000);',
{ timeout: 5000 }
);
console.log(response.result);
```
## Process Execution
Daytona SDK provides an option to execute shell commands and manage background processes in Workspaces.
### Running Commands
Daytona SDK provides an option to execute shell commands in Python and TypeScript. You can run commands with input, timeout, and environment variables.
```python
# Execute shell command
response = workspace.process.exec("ls -la")
print(response.output)
```
```typescript
// Execute shell command
const response = await workspace.process.executeCommand("ls -la");
console.log(response.output);
```
## Sessions (Background Processes)
Daytona SDK provides an option to start, stop, and manage background process sessions in Workspaces. You can run long-running commands, monitor process status, and list all running processes.
### Managing Long-Running Processes
Daytona SDK provides an option to start and stop background processes. You can run long-running commands and monitor process status.
```python
# Check session's executed commands
session = workspace.process.get_session(session_id)
print(f"Session {process_id}:")
for command in session.commands:
print(f"Command: {command.command}, Exit Code: {command.exit_code}")
# List all running sessions
sessions = workspace.process.list_sessions()
for session in sessions:
print(f"PID: {session.id}, Commands: {session.commands}")
```
```typescript
// Check session's executed commands
const session = await workspace.process.getSession(sessionId);
console.log(`Session ${sessionId}:`);
for (const command of session.commands) {
console.log(`Command: ${command.command}, Exit Code: ${command.exitCode}`);
}
// List all running sessions
const sessions = await workspace.process.listSessions();
for (const session of sessions) {
console.log(`PID: ${session.id}, Commands: ${session.commands}`);
}
```
## Best Practices
Daytona SDK provides best practices for process and code execution in Workspaces.
1. **Resource Management**
- Use sessions for long-running operations
- Clean up sessions after execution
- Handle session exceptions properly
```python
# Python - Clean up session
try:
session_id = workspace.process.create_session("long-running-cmd")
# Do work...
finally:
workspace.process.delete_session(session_id)
```
```typescript
// TypeScript - Clean up processes
try {
const sessionId = await workspace.process.createSession("long-running-cmd");
// Do work...
} finally {
await workspace.process.deleteSession(processId);
}
```
2. **Error Handling**
- Handle process exceptions properly
- Log error details for debugging
- Use try-catch blocks for error handling
```python
try:
response = workspace.process.code_run("invalid python code")
except ProcessExecutionError as e:
print(f"Execution failed: {e}")
print(f"Exit code: {e.exit_code}")
print(f"Error output: {e.stderr}")
```
```typescript
try {
const response = await workspace.process.codeRun("invalid typescript code");
} catch (e) {
if (e instanceof ProcessExecutionError) {
console.error("Execution failed:", e);
console.error("Exit code:", e.exitCode);
console.error("Error output:", e.stderr);
}
}
```
## Common Issues
Daytona SDK provides an option to troubleshoot common issues related to process execution and code execution.
### Process Execution Failed
- Check command syntax
- Verify required dependencies
- Ensure sufficient permissions
### Process Timeout
- Adjust timeout settings
- Optimize long-running operations
- Consider using background processes
### Resource Limits
- Monitor process memory usage
- Handle process cleanup properly
- Use appropriate resource constraints
---
title: Workspace Management
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
Workspaces are isolated development environments managed by Daytona. This guide covers how to create, manage, and remove workspaces using the SDK.
## Creating Workspaces
Daytona SDK provides an option to create workspaces with default or custom configurations. You can specify the language, image, resources, environment variables, and volumes for the workspace.
### Basic Workspace Creation
Daytona SDK provides methods to create Workspaces with default configurations, specific languages, or custom IDs using Python and TypeScript.
```python
from daytona_sdk import Daytona
daytona = Daytona()
# Create a basic workspace
workspace = daytona.create()
# Create a workspace with specific language
params = CreateWorkspaceParams(language="python")
workspace = daytona.create(params)
# Create a workspace with custom ID
params = CreateWorkspaceParams(id="my-workspace")
workspace = daytona.create(params)
```
```typescript
import { Daytona } from '@daytonaio/sdk';
const daytona = new Daytona();
// Create a basic workspace
const workspace = await daytona.create();
// Create a workspace with specific language
const workspace = await daytona.create({ language: 'typescript' });
// Create a workspace with custom ID
const workspace = await daytona.create({ id: 'my-workspace' });
```
## Workspace Information
Daytona SDK provides methods to get information about a workspace, such as ID, root directory, and status using Python and TypeScript.
```python
# Get workspace ID
workspace_id = workspace.id
# Get workspace root directory
root_dir = workspace.get_workspace_root_dir()
```
```typescript
// Get workspace ID
const workspaceId = workspace.id;
// Get workspace root directory
const rootDir = await workspace.getWorkspaceRootDir();
```
## Remove Workspace
Daytona SDK provides methods to perform operations on Workspaces, such as removing Workspaces using Python and TypeScript.
```python
# Remove workspace
daytona.remove(workspace)
```
```typescript
// Remove workspace
await daytona.remove(workspace);
```
---
title: CLI
description: A reference of supported operations using the Daytona CLI.
sidebar:
label: Daytona CLI Reference
---
The `daytona` command-line tool provides access to Daytona's core features.
You can use the `daytona` tool for the following operations:
* Managing the lifecycle of the Daytona Server.
* Managing [Workspaces](../usage/workspaces), [Git Providers](../configuration/git-providers), [Providers](../configuration/providers), and other Daytona components.
* Configuring the [Daytona Server](../configuration/server) interactively.
This reference lists all commands supported by the `daytona` command-line tool complete with a description of their behaviour, and any supported flags.
You can access this documentation on a per-command basis by appending the `--help`/`-h` flag when invoking `daytona`.
## daytona
Daytona is a Dev Environment Manager
```shell
daytona [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
| `--version` | `-v` | Display the version of Daytona |
## daytona api-key
Api Key commands
```shell
daytona api-key [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona api-key create
Create a new API key
```shell
daytona api-key create [NAME] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona api-key delete
Delete an API key
```shell
daytona api-key delete [NAME] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Skip confirmation prompt |
| `--help` | | help for daytona |
## daytona api-key list
List API keys
```shell
daytona api-key list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona autocomplete
Adds a completion script for your shell environment
```shell
daytona autocomplete [bash|zsh|fish|powershell] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona build
Manage builds
```shell
daytona build [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona build delete
Delete a build
```shell
daytona build delete [BUILD] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Delete ALL builds |
| `--force` | `-f` | Force delete build |
| `--prebuild-id` | | Delete ALL builds from prebuild |
| `--help` | | help for daytona |
## daytona build info
Show build info
```shell
daytona build info [BUILD] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona build list
List all builds
```shell
daytona build list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona build logs
View logs for build
```shell
daytona build logs [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--follow` | `-f` | Follow logs |
| `--help` | | help for daytona |
## daytona build run
Run a build from a workspace template
```shell
daytona build run [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona code
Open a workspace in your preferred IDE
```shell
daytona code [WORKSPACE] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--ide` | `-i` | Specify the IDE (vscode, code-insiders, browser, cursor, codium, codium-insiders, ssh, jupyter, fleet, positron, zed, windsurf, clion, goland, intellij, phpstorm, pycharm, rider, rubymine, webstorm) |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona config
Output Daytona configuration
```shell
daytona config [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--show-api-keys` | `-k` | Show API keys |
| `--help` | | help for daytona |
## daytona create
Create a workspace
```shell
daytona create [REPOSITORY_URL | WORKSPACE_CONFIG_NAME]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--blank` | | Create a blank workspace without using existing templates |
| `--branch` | | Specify the Git branches to use in the workspaces |
| `--builder` | | Specify the builder (currently auto/devcontainer/none) |
| `--custom-image` | | Create the workspace with the custom image passed as the flag value; Requires setting --custom-image-user flag as well |
| `--custom-image-user` | | Create the workspace with the custom image user passed as the flag value; Requires setting --custom-image flag as well |
| `--devcontainer-path` | | Automatically assign the devcontainer builder with the path passed as the flag value |
| `--env` | | Specify environment variables (e.g. --env 'KEY1=VALUE1' --env 'KEY2=VALUE2' ...') |
| `--git-provider-config` | | Specify the Git provider configuration ID or alias |
| `--ide` | `-i` | Specify the IDE (vscode, code-insiders, browser, cursor, codium, codium-insiders, ssh, jupyter, fleet, positron, zed, windsurf, clion, goland, intellij, phpstorm, pycharm, rider, rubymine, webstorm) |
| `--label` | | Specify labels (e.g. --label 'label.key1=VALUE1' --label 'label.key2=VALUE2' ...) |
| `--manual` | | Manually enter the Git repository |
| `--multi-workspace` | | Target with multiple workspaces/repos |
| `--no-ide` | `-n` | Do not open the target in the IDE after target creation |
| `--target` | `-t` | Specify the target (e.g. 'local') |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona delete
Delete a workspace
```shell
daytona delete [WORKSPACE]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Delete all workspaces |
| `--force` | `-f` | Delete a workspace by force |
| `--yes` | `-y` | Confirm deletion without prompt |
| `--help` | | help for daytona |
## daytona docs
Opens the Daytona documentation in your default browser.
```shell
daytona docs [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona env
Manage server environment variables that are added to all targets and workspaces
```shell
daytona env [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona env delete
Delete server environment variables
```shell
daytona env delete [KEY]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona env list
List server environment variables
```shell
daytona env list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--show-values` | `-v` | Show environment variable values |
| `--help` | | help for daytona |
## daytona env set
Set server environment variables
```shell
daytona env set [KEY=VALUE]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona forward
Forward a port from a workspace to your local machine
```shell
daytona forward [PORT] [WORKSPACE] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--public` | | Should be port be available publicly via an URL |
| `--help` | | help for daytona |
## daytona git-provider
Manage Git provider configs
```shell
daytona git-provider [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona git-provider create
Create a Git provider config
```shell
daytona git-provider create [GIT_PROVIDER_ID] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--alias` | `-a` | Alias |
| `--base-api-url` | `-b` | Base API Url |
| `--signing-key` | `-k` | Signing Key |
| `--signing-method` | `-s` | Signing Method (ssh, gpg) |
| `--token` | `-t` | Personal Access Token |
| `--username` | `-u` | Username |
| `--help` | | help for daytona |
## daytona git-provider delete
Delete a Git provider config
```shell
daytona git-provider delete [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Delete all Git providers |
| `--yes` | `-y` | Confirm deletion without prompt |
| `--help` | | help for daytona |
## daytona git-provider list
Lists your registered Git provider configs
```shell
daytona git-provider list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona git-provider update
Update a Git provider
```shell
daytona git-provider update [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona ide
Choose the default IDE
```shell
daytona ide [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona info
Show workspace info
```shell
daytona info [WORKSPACE] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona list
List workspaces
```shell
daytona list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--label` | `-l` | Filter by label |
| `--help` | | help for daytona |
## daytona logs
View the logs of a workspace
```shell
daytona logs [WORKSPACE] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--follow` | `-f` | Follow logs |
| `--help` | | help for daytona |
## daytona prebuild
Manage prebuilds
```shell
daytona prebuild [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona prebuild create
Create a prebuild configuration
```shell
daytona prebuild create [WORKSPACE_CONFIG] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--branch` | `-b` | Git branch for the prebuild |
| `--commit-interval` | `-c` | Commit interval for running a prebuild - leave blank to ignore push events |
| `--retention` | `-r` | Maximum number of resulting builds stored at a time |
| `--run` | | Run the prebuild once after adding it |
| `--trigger-files` | `-t` | Full paths of files whose changes should explicitly trigger a prebuild |
| `--help` | | help for daytona |
## daytona prebuild delete
Delete a prebuild configuration
```shell
daytona prebuild delete [WORKSPACE_CONFIG] [PREBUILD] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--force` | `-f` | Force delete prebuild |
| `--help` | | help for daytona |
## daytona prebuild info
Show prebuild configuration info
```shell
daytona prebuild info [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona prebuild list
List prebuild configurations
```shell
daytona prebuild list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona prebuild update
Update a prebuild configuration
```shell
daytona prebuild update [WORKSPACE_CONFIG] [PREBUILD_ID] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--branch` | `-b` | Git branch for the prebuild |
| `--commit-interval` | `-c` | Commit interval for running a prebuild - leave blank to ignore push events |
| `--retention` | `-r` | Maximum number of resulting builds stored at a time |
| `--run` | | Run the prebuild once after updating it |
| `--trigger-files` | `-t` | Full paths of files whose changes should explicitly trigger a prebuild |
| `--help` | | help for daytona |
## daytona profile
Manage profiles
```shell
daytona profile [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona profile create
Create a profile
```shell
daytona profile create [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--api-key` | `-k` | API Key |
| `--api-url` | `-a` | API URL |
| `--name` | `-n` | Profile name |
| `--help` | | help for daytona |
## daytona profile delete
Delete a profile
```shell
daytona profile delete [PROFILE_NAME] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona profile list
List profiles
```shell
daytona profile list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona profile update
Update profile [PROFILE_NAME]
```shell
daytona profile update [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--api-key` | `-k` | API Key |
| `--api-url` | `-a` | API URL |
| `--name` | `-n` | Profile name |
| `--help` | | help for daytona |
## daytona provider
Manage providers
```shell
daytona provider [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona provider install
Install provider
```shell
daytona provider install [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona provider list
List installed providers
```shell
daytona provider list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona provider uninstall
Uninstall provider
```shell
daytona provider uninstall [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona provider update
Update provider
```shell
daytona provider update [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Update all providers |
| `--help` | | help for daytona |
## daytona purge
Purges all Daytona data from the current device
```shell
daytona purge [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--force` | `-f` | Delete all targets by force |
| `--yes` | `-y` | Execute purge without a prompt |
| `--help` | | help for daytona |
## daytona restart
Restart a workspace
```shell
daytona restart [WORKSPACE]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona runner
Manage the runner
```shell
daytona runner [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona runner config
Outputs Daytona Runner config
```shell
daytona runner config [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--key` | `-k` | Show API Key |
| `--help` | | help for daytona |
## daytona runner configure
Configure Daytona Runner
```shell
daytona runner configure [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--api-key` | | Runner API Key |
| `--api-url` | | Daytona Server API URL |
| `--client-id` | | Client ID |
| `--disable-telemetry` | | Disable telemetry |
| `--id` | | Runner ID |
| `--name` | | Runner Name |
| `--help` | | help for daytona |
## daytona runner logs
View runner logs
```shell
daytona runner logs [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--follow` | `-f` | Follow logs |
| `--help` | | help for daytona |
## daytona runner purge
Purges the Daytona Runner
```shell
daytona runner purge [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Execute Daytona Runner purge without a prompt |
| `--help` | | help for daytona |
## daytona runner restart
Restarts the runner
```shell
daytona runner restart [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona runner serve
Starts the runner in the foreground
```shell
daytona runner serve [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona runner start
Starts the runner
```shell
daytona runner start [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona runner stop
Stops the runner
```shell
daytona runner stop [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona serve
Run the server process in the current terminal session
```shell
daytona serve [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server
Start the server process in daemon mode
```shell
daytona server [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Skip the confirmation prompt |
| `--help` | | help for daytona |
## daytona server config
Output local Daytona Server config
```shell
daytona server config [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona server configure
Configure Daytona Server
```shell
daytona server configure [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server logs
Output Daytona Server logs
```shell
daytona server logs [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--file` | | Read specific log file |
| `--follow` | `-f` | Follow logs |
| `--local` | `-l` | Read local server log files |
| `--help` | | help for daytona |
## daytona server logs list
Lists Daytona Server Log Files
```shell
daytona server logs list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server restart
Restarts the Daytona Server daemon
```shell
daytona server restart [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server runner
Manage runners
```shell
daytona server runner [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server runner create
Create a runner
```shell
daytona server runner create [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--name` | `-n` | Runner name |
| `--help` | | help for daytona |
## daytona server runner delete
Delete a runner
```shell
daytona server runner delete [RUNNER] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Confirm deletion without prompt |
| `--help` | | help for daytona |
## daytona server runner list
List runners
```shell
daytona server runner list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona server runner logs
View runner logs
```shell
daytona server runner logs [RUNNER_ID] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--follow` | `-f` | Follow logs |
| `--help` | | help for daytona |
## daytona server start
Start the Daytona Server daemon
```shell
daytona server start [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona server stop
Stops the Daytona Server daemon
```shell
daytona server stop [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona ssh
SSH into a workspace using the terminal
```shell
daytona ssh [WORKSPACE] [CMD...] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--edit` | `-e` | Edit the workspace's SSH config |
| `--option` | `-o` | Specify SSH options in KEY=VALUE format. |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona start
Start a workspace
```shell
daytona start [WORKSPACE]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Start all targets |
| `--code` | `-c` | Open the target in the IDE after target start |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona stop
Stop a workspace
```shell
daytona stop [WORKSPACE]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Stop all targets |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona target-config
Manage target configs
```shell
daytona target-config [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona target-config create
Create target config
```shell
daytona target-config create [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--file` | `-f` | Path to JSON file for target configuration, use '-' to read from stdin |
| `--help` | | help for daytona |
## daytona target-config delete
Deletes a target config
```shell
daytona target-config delete [TARGET_CONFIG] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--yes` | `-y` | Confirm deletion of all targets without prompt |
| `--help` | | help for daytona |
## daytona target-config list
List target configs
```shell
daytona target-config list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--show-options` | `-v` | Show target options |
| `--help` | | help for daytona |
## daytona target
Manage targets
```shell
daytona target [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona target create
Create a target
```shell
daytona target create [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona target delete
Delete a target
```shell
daytona target delete [TARGET]... [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Delete all targets |
| `--force` | `-f` | Delete a target by force |
| `--yes` | `-y` | Confirm deletion without prompt |
| `--help` | | help for daytona |
## daytona target info
Show target info
```shell
daytona target info [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--show-options` | `-v` | Show target options |
| `--help` | | help for daytona |
## daytona target list
List targets
```shell
daytona target list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--show-options` | `-v` | Show target options |
| `--help` | | help for daytona |
## daytona target logs
View the logs of a target
```shell
daytona target logs [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--follow` | `-f` | Follow logs |
| `--help` | | help for daytona |
## daytona target restart
Restart a target
```shell
daytona target restart [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona target set-default
Set default target
```shell
daytona target set-default [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona target ssh
SSH into a target using the terminal
```shell
daytona target ssh [TARGET] [CMD...] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--option` | `-o` | Specify SSH options in KEY=VALUE format. |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona target start
Start a target
```shell
daytona target start [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Start all targets |
| `--yes` | `-y` | Automatically confirm any prompts |
| `--help` | | help for daytona |
## daytona target stop
Stop a target
```shell
daytona target stop [TARGET] [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Stop all targets |
| `--help` | | help for daytona |
## daytona telemetry
Manage telemetry collection
```shell
daytona telemetry [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona telemetry disable
Disable telemetry collection
```shell
daytona telemetry disable [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona telemetry enable
Enable telemetry collection
```shell
daytona telemetry enable [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona template
Manage workspace templates
```shell
daytona template [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona template create
Create a workspace template
```shell
daytona template create [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--builder` | | Specify the builder (currently auto/devcontainer/none) |
| `--custom-image` | | Create the workspace with the custom image passed as the flag value; Requires setting --custom-image-user flag as well |
| `--custom-image-user` | | Create the workspace with the custom image user passed as the flag value; Requires setting --custom-image flag as well |
| `--devcontainer-path` | | Automatically assign the devcontainer builder with the path passed as the flag value |
| `--env` | | Specify environment variables (e.g. --env 'KEY1=VALUE1' --env 'KEY2=VALUE2' ...') |
| `--git-provider-config` | | Specify the Git provider configuration ID or alias |
| `--label` | | Specify labels (e.g. --label 'label.key1=VALUE1' --label 'label.key2=VALUE2' ...) |
| `--manual` | | Manually enter the Git repository |
| `--name` | | Specify the workspace template name |
| `--help` | | help for daytona |
## daytona template delete
Delete a workspace template
```shell
daytona template delete [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Delete all workspace templates |
| `--force` | `-f` | Force delete prebuild |
| `--yes` | `-y` | Confirm deletion without prompt |
| `--help` | | help for daytona |
## daytona template export
Export a workspace template
```shell
daytona template export [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--all` | `-a` | Export all workspace templates |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona template import
Import a workspace template from a JSON object
```shell
daytona template import [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--file` | `-f` | Import workspace template from a JSON file. Use '-' to read from stdin. |
| `--help` | | help for daytona |
## daytona template info
Show workspace template info
```shell
daytona template info [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona template list
Lists workspace templates
```shell
daytona template list [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
## daytona template set-default
Set workspace template info
```shell
daytona template set-default [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona template update
Update a workspace template
```shell
daytona template update [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona update
Update Daytona CLI
```shell
daytona update [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--version` | `-v` | Version to update to |
| `--help` | | help for daytona |
## daytona use
Use profile [PROFILE_NAME]
```shell
daytona use [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona version
Print the version number
```shell
daytona version [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--help` | | help for daytona |
## daytona whoami
Display information about the active user
```shell
daytona whoami [flags]
```
__Flags__
| Long | Short | Description |
| :--- | :---- | :---------- |
| `--format` | `-f` | Output format. Must be one of (yaml, json) |
| `--help` | | help for daytona |
---
title: Docker Extension
description: Learn how to use the Daytona Docker extension to create, open, list, and delete Workspaces.
---
Daytona provides a Docker Extension for using an embedded version of the Daytona client and server tools directly within Docker Desktop.
The Docker Extension provides options to create, open, list, and delete [Workspaces](/docs/usage/workspaces).
View the Daytona Docker Extension in the [Docker Desktop Extensions Marketplace](https://open.docker.com/extensions/marketplace?extensionId=daytonaio/docker-extension&tag=0.44.0) or [GitHub repository](https://open.docker.com/extensions/marketplace?extensionId=daytonaio/docker-extension&tag=0.44.0).
## Prerequisites
- [Docker Desktop](https://www.docker.com/products/docker-desktop) installed on your machine.
## Installation
{/* Install the Daytona Docker Extension from the [Docker Desktop Extensions Marketplace](https://open.docker.com/extensions/marketplace?extensionId=daytonaio/docker-extension&tag=0.44.0).
### Manual */}
1. Run the following command to install the Daytona Docker Extension
```sh
docker extension install daytonaio/docker-extension
```
:::note
Allow non-marketplace extensions in the Docker desktop settings to install the Daytona Docker extension.
:::
Wait while Daytona Docker Extension sets up your Workspace. It handles all the initialization and configuration of your environment.
## Create a Workspace
Create a new Workspace using the Daytona Docker Extension within the Docker Desktop.
1. Click **`Create Workspace`** to start creating a new Workspace.
2. Select the Workspace resource. You can choose from the following options:
- Browse your Git repositories.
- Select a predefined sample.
- Find with URL.
3. Select the **`IDE`** from the dropdown list.
4. Select the **`Target`** from the dropdown list.
5. Click **`Next`** to proceed.
```text
Opening the project from workspace in
Setting up IDE customizations...
Waiting for code server to install...
Installing extensions...
Setting up IDE settings...
...
```
Daytona Docker Extension will create a new Workspace with the selected settings. You can now [open the Workspace](#open-an-existing-workspace) and start working on your project.
## Open an Existing Workspace
Daytona Docker Extension provides an option to open an existing Workspace in your IDE. This enables you to quickly access and work on your projects in your preferred development environment. With Daytona Docker Extension, you can effortlessly switch between different Workspaces and maintain an efficient workflow.
1. Click the IDE button of the Workspace you want to open.
This will automatically launch your Workspace in the selected IDE.
## Manage a Workspace
Daytona Docker Extension provides an option to access and manage your Workspace, providing a detailed overview of the Workspace configuration.
Once a Workspace is created, you will be presented with the following options and information:
- **Name**
The name of the Workspace, and the GitHub repository it is associated with.
- **Status**
The current status of the Workspace, such as `Running` or `Stopped`.
- **Target**
The target environment for the Workspace.
- **IDE**
The IDE used to open the Workspace.
- [**Delete**](#delete-a-workspace)
Click the bin icon to delete the Workspace from the Daytona Docker Extension.
## Delete a Workspace
Daytona Docker Extension provides an option to delete one or more Workspaces, helping you manage your development environments by removing those that are no longer needed.
1. Click the bin icon to delete your Workspace.
---
title: Agent Toolbox
description: Learn how to interact with the Workspace programmatically using the Workspace Toolbox API.
---
The Agent Toolbox enables you to interact with the [Workspace](/docs/usage/workspaces) programmatically by providing a [Workspace Toolbox API](/docs/tools/api#get-workspaceworkspaceidprojectidtoolboxfiles) 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.
## File System Operations
Daytona provides an option to interact with the Workspace file system programmatically using the Workspace Toolbox API. The API provides the following file system operations:
### List Files
Daytona provides an option to list files in the Workspace using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/files` endpoint.
The API returns a list of files and directories present in the Workspace.
### Delete Files
Daytona provides an option to delete files in the Workspace using the `DELETE` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/files` endpoint.
The API deletes the specified file or directory from the Workspace.
### Create Folder
Daytona provides an option to create a new folder in the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/createfolder` endpoint.
The API creates a new folder with the specified name in the Workspace.
### Download Files
Daytona provides an option to download files from the Workspace using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/download` endpoint.
The API downloads the specified file from the Workspace.
### Find Files
Daytona provides an option to find files in the Workspace using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/find` endpoint.
The API searches for files with the specified name in the Workspace.
### Files Information
Daytona provides an option to get information about files in the Workspace using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/info` endpoint.
The API returns information about the specified file in the Workspace.
### Move Files
Daytona provides an option to move files in the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/move` endpoint.
The API moves the specified file to the specified destination in the Workspace.
### File Permissions
Daytona provides an option to set file permissions in the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/permissions` endpoint.
The API sets the specified permissions for the specified file in the Workspace.
### Replace Files
Daytona provides an option to replace files in the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/replace` endpoint.
The API replaces the specified file with the specified content in the Workspace.
### Search Files
Daytona provides an option to search for files in the Workspace using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/search` endpoint.
The API searches for files with the specified content in the Workspace.
### Upload Files
Daytona provides an option to upload files to the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/upload` endpoint.
The API uploads the specified file to the Workspace.
## Git Operations
Daytona provides an option to interact with the Workspace Git repository programmatically using the Workspace Toolbox API. The API provides the following Git operations:
### Add Files
Daytona provides an option to add files to the Workspace Git repository using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/add` endpoint.
The API adds the specified files to the Git repository.
### List Branches
Daytona provides an option to list branches in the Workspace Git repository using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/branches` endpoint.
The API returns a list of branches present in the Git repository.
### Create Branch
Daytona provides an option to create a new branch in the Workspace Git repository using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/createbranch` endpoint.
The API creates a new branch with the specified name in the Git repository.
### Clone Repository
Daytona provides an option to clone a Git repository into the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/clone` endpoint.
The API clones the specified Git repository into the Workspace.
### Commit Changes
Daytona provides an option to commit changes to the Workspace Git repository using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/commit` endpoint.
The API commits the changes to the Git repository with the specified message.
### Commit History
Daytona provides an option to get the commit history of the Workspace Git repository using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/history` endpoint.
The API returns the commit history of the Git repository.
### Pull Changes
Daytona provides an option to pull changes from the remote Git repository into the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/pull` endpoint.
The API pulls the changes from the remote repository into the Workspace.
### Push Changes
Daytona provides an option to push changes from the Workspace Git repository to the remote repository using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/push` endpoint.
The API pushes the changes from the Workspace to the remote repository.
### Git Status
Daytona provides an option to get the status of the Workspace Git repository using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/git/status` endpoint.
The API returns the status of the Git repository.
## Language Server Protocol (LSP)
Daytona provides an option to interact with the Language Server Protocol (LSP) programmatically using the Workspace Toolbox API. The API provides the following LSP operations:
### LSP Completions
Daytona provides an option to get completions for the specified text using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/completions` endpoint.
The API returns completions for the specified text.
### LSP DidClose
Daytona provides an option to notify the Language Server that a file has been closed using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/didclose` endpoint.
The API notifies the Language Server that the specified file has been closed.
### LSP DidOpen
Dayjsona provides an option to notify the Language Server that a file has been opened using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/didopen` endpoint.
The API notifies the Language Server that the specified file has been opened.
### LSP Document Symbols
Daytona provides an option to get document symbols for the specified text using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/documentsymbols` endpoint.
The API returns document symbols for the specified text.
### Start LSP Server
Daytona provides an option to start the Language Server using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/start` endpoint.
The API starts the Language Server in the Workspace.
### Stop LSP Server
Daytona provides an option to stop the Language Server using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/stop` endpoint.
The API stops the Language Server in the Workspace.
### Workspace Symbols
Daytona provides an option to get Workspace symbols for the specified text using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/lsp/workspacesymbols` endpoint.
The API returns Workspace symbols for the specified text.
## Process Operations
Daytona provides an option to interact with the Workspace processes programmatically using the Workspace Toolbox API. The API provides the following process operations:
### Execute Command
Daytona provides an option to execute a command in the Workspace using the `POST` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/execute` endpoint.
The API executes the specified command in the Workspace.
## Project Directory
Daytona provides an option to interact with the Project directory programmatically using the Workspace Toolbox API. The API provides the following Project directory operations:
### Get Project Directory
Daytona provides an option to get the Project directory path using the `GET` HTTP method on the `/workspace/{workspaceId}/{projectId}/toolbox/projectdir` endpoint.
The API returns the path of the Project directory in the Workspace.
---
title: Builders
description: A reference detailing how to use Dev Containers and custom images as the base for your project.
sidebar:
label: Builders
---
Builders are responsible for creating a container image with the necessary tools and configurations for your [Project](/docs/usage/projects).
Daytona provides control over how the resulting Project environment is created, allowing you to choose your preferred method to build the Project image.
You can choose between the following Builders while [creating a Workspace](/docs/usage/workspaces#create-a-workspace):
- [**Automatic**](#automatic)
Daytona builds the Project image after auto-detecting the most appropriate Builder.
- [**Dev Container**](#dev-container)
Daytona builds the Project image according to the Dev Container configuration located in the project.
- [**Custom Image**](#custom-image)
Daytona builds the Project image using an image you specify.
- [**None**](#none)
Daytona creates the Project using the default base image.
## Automatic
Daytona can auto-detect the most appropriate Builder for your Project. Daytona uses the following logic to determine which Builder to use:
1. Check if a Dev Container configuration is present in **`.devcontainer.json`** or **`.devcontainer/devcontainer.json`**, relative to the repository root.
2. If present, use the [Dev Container](#dev-container) Builder. If not present, use the [None](#none) Builder.
To use the Automatic Builder, set the `--builder` flag value to `auto` during the [Workspace creation](/docs/usage/workspaces#create-a-workspace). This flag only applies when creating Workspaces with a single Project.
```shell
daytona create --builder=auto
```
## Dev Container
Development Containers (Dev Containers) provide a consistent and fully featured development environments for your [Projects](/docs/usage/projects). A Dev Container defines all the necessary tools, runtime, and environment configurations required to build and run your Projects.
The Dev Container specification is designed to define a development environment that can be replicated across different platforms and CI/CD systems. The specification is defined within a `devcontainer.json` file in the project repository.
The `devcontainer.json` file is a JSON file that consists of components that define the development environment. The file includes objects with properties containing metadata and settings required to configurate a development container. View the [dev container specification](https://containers.dev/implementors/json_reference/) for more information.
Use [devcontainer.ai](https://devcontainer.ai/) to generate a `devcontainer.json` file for your Project.
Example `devcontainer.json` file:
```sh
{
"name": "Example Python & PostgreSQL Dev Container",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "3.8",
"INSTALL_NODE": "false"
}
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"ms-python.python",
"ms-azuretools.vscode-docker"
],
"postCreateCommand": "pip install -r requirements.txt",
"remoteUser": "vscode"
}
```
- `name`: The name of the development container.
- `build`: The build configuration for the development container.
- `settings`: The settings for the development container.
- `extensions`: The extensions to install in the development container.
- `postCreateCommand`: The command to run after creating the development container.
- `remoteUser`: The user to execute commands as during the image build process.
Daytona provides the option to build the Project image using the Dev Container standard. Use the following option available when using the Dev Container Builder:
- **Devcontainer file path**
The path where the Dev Container configuration is located, relative to the repository root.
The default value is `.devcontainer/devcontainer.json`.
To use the Dev Container Builder, set the `--devcontainer-path` flag to the Dev Container configuration path within the repository during the [Workspace creation](/docs/usage/workspaces#create-a-workspace). This flag only applies when creating Workspaces with a single Project.
```shell showLineNumbers
daytona create --devcontainer-path=.devcontainer/devcontainer.json
```
:::note
For more information on the Dev Container standard, refer to the official documentation at [containers.dev](https://containers.dev/).
:::
## Custom Image
You can build the Project image by specifying a custom base container.
The following options are accepted when using this Builder:
- **Custom container image**
The name of the base container image for the Project.
- **Container user**
The user to execute commands as during the image build process.
- **Environment variables**
A list of environment variables in the format `KEY=VALUE`.
To use the Custom Image Builder, set both `--custom-image` and `--custom-image-user` flags while [creating a Workspace](/docs/usage/workspaces#create-a-workspace). These flags only apply when creating Workspaces with a single Project.
```shell
daytona create --custom-image=daytona-workspace:latest --custom-image-user=daytona
```
## None
Daytona can build a Project using the default base image.
Unless otherwise configured using `daytona server configure`, the default base image is set to `daytonaio/workspace-project`.
## Custom Build Registry
You can set a custom build registry for images built by a Daytona Builder.
After an image is built, it will be uploaded to the configured container registry to speed up future Workspace creation for the same Project.
**Prerequisite**
- An account on an accessible container registry with permission to push/pull images.
1. Execute the following command to configure the custom build registry:
```shell
daytona container-registry set
```
2. Set the required options:
- **Server URL**
The full URL to your custom container registry.
- **Username**
The username Daytona should use to log in to the container registry.
- **Password**
The password for your container registry account.
3. Press to set the custom build registry.
4. Execute the following command to configure the server:
```shell
daytona server configure
```
5. Press until the "Builder Registry" section is highlighted.
```text
Builder Registry
To add options, add a container registry with 'daytona cr set'
> Local registry managed by Daytona
```
6. Select the custom registry configured previously using / arrow keys.
7. Press until the command exits to save the configuration.
---
title: IDEs
description: Connect to your Workspace using your default IDE.
sidebar:
label: IDEs
---
Daytona provides an option to connect to your [Workspace](/docs/usage/workspaces#open-an-existing-workspace) using your default IDE.
Out of the box, Daytona can be configured to open your Workspace in the following IDEs:
- **Visual Studio Code (VSCode)**
- [Desktop (Linux, macOS, Windows)](#vs-code)
- [Browser](#vs-code-browser)
- **JetBrains IDEs**
- [CLion](#jetbrains-clion)
- [GoLand](#jetbrains-goland)
- [IntelliJ IDEA Ultimate](#jetbrains-intellij-idea-ultimate)
- [PhpStorm](#jetbrains-phpstorm)
- [PyCharm Professional](#jetbrains-pycharm-professional)
- [Rider](#jetbrains-rider)
- [RubyMine](#jetbrains-rubymine)
- [WebStorm](#jetbrains-webstorm)
- [Fleet](#jetbrains-fleet)
- [Visual Studio Code Insiders](#vs-code-insiders)
- [VSCodium](#vscodium)
- [Jupyter](#jupyter)
- [Zed](#zed)
- [Cursor](#cursor)
- [Windsurf](#windsurf)
- [Terminal SSH](#terminal-ssh)
## Set the Default IDE
You can set the default IDE used by Daytona.
1. Run the following command to set the default IDE:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select your default choice.
```text
Choose Your Default IDE
VS Code
VS Code - Browser
Terminal SSH
CLion
GoLand
...
```
2. Select your preferred IDE from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: VS Code
```
You can now use the `daytona code` command to automatically open the default IDE already connected to your Workspace.
## VS Code
Daytona provides an option to connect to your Workspace using Visual Studio Code (VSCode) IDE.
1. Run the following command to set your default IDE to VS Code:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `VS Code` as your default choice.
```text
Choose Your Default IDE
| VS Code
```
2. Select **`VS Code`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: VS Code
```
You can now use the `daytona code` command to automatically open the Visual Studio Code IDE already connected to your Workspace.
## VS Code Browser
Daytona provides an option to connect to your Workspace using Visual Studio Code (VSCode) Browser IDE.
1. Run the following command to set your default IDE to VSCode Browser:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `VS Code - Browser` as your default choice.
```text
Choose Your Default IDE
| VS Code - Browser
```
2. Select **`VS Code - Browser`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: VS Code - Browser
```
You can now use the `daytona code` command to automatically open the VS Code - Browser IDE already connected to your Workspace.
:::note
When using the `daytona code` command with `VS Code - Browser` as your default IDE, Daytona will install OpenVSCode Server inside your project, forward the appropriate port to your local machine, and open your default browser automatically.
:::
## VS Code Insiders
Daytona provides an option to connect to your Workspace using Visual Studio Code Insiders IDE.
1. Run the following command to set your default IDE to VS Code Insiders:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `VS Code Insiders` as your default choice.
```text
Choose Your Default IDE
| VS Code Insiders
```
2. Select **`VS Code Insiders`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: VS Code Insiders
```
You can now use the `daytona code` command to automatically open the VS Code Insiders IDE already connected to your Workspace.
:::note
Ensure you have [VS Code Insiders]( https://code.visualstudio.com/insiders/) installed on your local machine. If you have already installed the VS Code Insiders IDE, please ensure it is added to your PATH environment variable. You can verify this by running the following command in your terminal:
```shell
code-insiders
```
:::
## VSCodium
Daytona provides an option to connect to your Workspace using VSCodium IDE.
1. Run the following command to set your default IDE to VSCodium:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `VSCodium` as your default choice.
```text
Choose Your Default IDE
| VSCodium
```
2. Select **`VSCodium`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: VSCodium
```
You can now use the `daytona code` command to automatically open the VS Code Insiders IDE already connected to your Workspace.
:::note
Ensure you have [VSCodium](https://vscodium.com/) installed on your local machine. If you have already installed the Visual Studio Code Insiders IDE, please ensure it is added to your PATH.
:::
## JetBrains CLion
Daytona provides an option to connect to your Workspace using JetBrains CLion IDE.
1. Run the following command to set your default IDE to JetBrains CLion:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `CLion` as your default choice.
```text
Choose Your Default IDE
| CLion
```
2. Select **`CLion`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: CLion
```
You can now use the `daytona code` command to automatically open the JetBrains CLion IDE already connected to your Workspace.
## JetBrains GoLand
Daytona provides an option to connect to your Workspace using JetBrains GoLand IDE.
1. Run the following command to set your default IDE to JetBrains GoLand:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `GoLand` as your default choice.
```text
Choose Your Default IDE
| GoLand
```
2. Select **`GoLand`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: GoLand
```
You can now use the `daytona code` command to automatically open the JetBrains GoLand IDE already connected to your Workspace.
## JetBrains IntelliJ IDEA Ultimate
Daytona provides an option to connect to your Workspace using JetBrains IntelliJ IDEA Ultimate IDE.
1. Run the following command to set your default IDE to JetBrains IntelliJ IDEA Ultimate:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `IntelliJ IDEA Ultimate` as your default choice.
```text
Choose Your Default IDE
| IntelliJ IDEA Ultimate
```
2. Select **`IntelliJ IDEA Ultimate`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: IntelliJ IDEA Ultimate
```
You can now use the `daytona code` command to automatically open the JetBrains IntelliJ IDEA Ultimate IDE already connected to your Workspace.
## JetBrains PhpStorm
Daytona provides an option to connect to your Workspace using JetBrains PhpStorm IDE.
1. Run the following command to set your default IDE to JetBrains PhpStorm:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `PhpStorm` as your default choice.
```text
Choose Your Default IDE
| PhpStorm
```
2. Select **`PhpStorm`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: PhpStorm
```
You can now use the `daytona code` command to automatically open the JetBrains PhpStorm IDE already connected to your Workspace.
## JetBrains PyCharm Professional
Daytona provides an option to connect to your Workspace using JetBrains PyCharm Professional IDE.
1. Run the following command to set your default IDE to JetBrains PyCharm Professional:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `PyCharm Professional` as your default choice.
```text
Choose Your Default IDE
| PyCharm Professional
```
2. Select **`PyCharm Professional`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: PyCharm Professional
```
You can now use the `daytona code` command to automatically open the JetBrains PyCharm Professional IDE already connected to your Workspace.
## JetBrains Rider
Daytona provides an option to connect to your Workspace using JetBrains Rider IDE.
1. Run the following command to set your default IDE to JetBrains Rider:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Rider` as your default choice.
```text
Choose Your Default IDE
| Rider
```
2. Select **`Rider`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Rider
```
You can now use the `daytona code` command to automatically open the JetBrains Rider IDE already connected to your Workspace.
## JetBrains RubyMine
Daytona provides an option to connect to your Workspace using JetBrains RubyMine IDE.
1. Run the following command to set your default IDE to JetBrains RubyMine:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `RubyMine` as your default choice.
```text
Choose Your Default IDE
| RubyMine
```
2. Select **`RubyMine`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: RubyMine
```
You can now use the `daytona code` command to automatically open the JetBrains RubyMine IDE already connected to your Workspace.
## JetBrains WebStorm
Daytona provides an option to connect to your Workspace using JetBrains WebStorm IDE.
1. Run the following command to set your default IDE to JetBrains WebStorm:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `WebStorm` as your default choice.
```text
Choose Your Default IDE
| WebStorm
```
2. Select **`WebStorm`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: WebStorm
```
You can now use the `daytona code` command to automatically open the JetBrains WebStorm IDE already connected to your Workspace.
## JetBrains Fleet
Daytona provides an option to connect to your Workspace using JetBrains Fleet IDE.
1. Run the following command to set your default IDE to JetBrains Fleet:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Fleet` as your default choice.
```text
Choose Your Default IDE
| Fleet
```
2. Select **`Fleet`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Fleet
```
You can now use the `daytona code` command to automatically open the JetBrains WebStorm IDE already connected to your Workspace by following the steps below:
- Install [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/).
- Install the JetBrains Fleet IDE using JetBrains Toolbox.
- Ensure the JetBrains Fleet IDE is in your `PATH`, and name your shell script `fleet`. For more information, visit the official [Launch JetBrains Fleet from CLI](https://www.jetbrains.com/help/fleet/launch-from-cli.html) guide.
## Jupyter
Daytona provides an option to connect to your Workspace using Jupyter IDE.
1. Run the following command to set your default IDE to Jupyter:
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Jupyter` as your default choice.
```text
Choose Your Default IDE
| Jupyter
```
2. Select **`Jupyter`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Jupyter
```
You can now use the `daytona code` command to automatically open the Jupyter IDE already connected to your Workspace.
## Zed
Daytona provides an option to connect to your Workspace using Zed IDE.
1. Run the following command to set your default IDE to Zed:
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Zed` as your default choice.
```text
Choose Your Default IDE
| Zed
```
2. Select **`Zed`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Zed
```
You can now use the `daytona code` command to automatically open the Zed IDE already connected to your Workspace.
## Cursor
Daytona provides an option to connect to your Workspace using Cursor IDE.
:::note
After installing the [Cursor](https://www.cursor.com/) IDE, run the `Install 'cursor' command` from the command palette.
:::
1. Run the following command to set your default IDE to Cursor:
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Cursor` as your default choice.
```text
Choose Your Default IDE
| Cursor
```
2. Select **`Cursor`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Cursor
```
You can now use the `daytona code` command to automatically open the Cursor IDE already connected to your Workspace.
## Headless
Daytona provides an option to connect to your [Workspace Toolbox](/docs/usage/workspaces#workspace-toolbox) using a Headless IDE.
The Headless IDE provides a seamless development experience, enabling you to perform operations directly within the Workspace environment.
## Windsurf
Daytona provides an option to connect to your Workspace using Windsurf IDE.
1. Run the following command to set your default IDE to Windsurf:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Windsurf` as your default choice.
```text
Choose Your Default IDE
| Windsurf
```
2. Select **`Windsurf`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Windsurf
```
You can now use the `daytona code` command to automatically open the Windsurf IDE already connected to your Workspace.
:::note
Ensure you have [Windsurf](https://codeium.com/windsurf/download) installed on your local machine. If you have already installed the Windsurf IDE, please ensure it is added to your PATH.
:::
## Terminal SSH
Daytona provides an option to connect to your Workspace through Terminal SSH.
1. Run the following command to set your default IDE to Terminal SSH:
```shell
daytona ide
```
Upon running this command, Daytona will display a list of available IDEs, allowing you to select `Terminal SSH` as your default choice.
```text
Choose Your Default IDE
| Terminal SSH
```
2. Select **`Terminal SSH`** from the list presented. Upon selecting, Daytona will set it as the default IDE and display a confirmation message.
```text
Default IDE: Terminal SSH
```
You can now use the `daytona code` command to automatically start an SSH session already connected to your Workspace.
---
title: Prebuilds
description: Learn how to manage and reuse Prebuilds across Workspaces.
sidebar:
label: Prebuilds
---
Prebuilds are designed to accelerate development by pre-building your Workspace. When you start a Workspace, the prebuilt environment is used, ensuring that the Workspace is initiated almost instantly.
Prebuilds achieve this by setting up a [project configuration](/docs/usage/projects#project-configuration) that monitors changes in the connected Git Provider's repository.
Prebuilds work by registering a listener for webhook events from the Git Provider. A public API endpoint is provided, which the Git Provider uses to send these requests.
:::note
Daytona currently supports GitHub, GitLab, and GitLab Self-Managed as Git Providers for Prebuilds.
:::
## Add a Prebuild
1. Run the following command to add a new Prebuild:
```shell
daytona prebuilds add
```
Upon running the command, Daytona will prompt you to select a project configuration you plan to work on. You can then decide on a commit interval (e.g. `5`, _every 5 commits_) after which a build should be triggered, any specific trigger files whose changes should immediately start the build process, and build retention (the maximum number of builds to store at a time).
```text
Select a Project Config To Prebuild
1 item
MyConfig
https://github.com/username/myproject.git
```
```text
Commit interval
Leave blank to ignore push events
>
```
```text
Trigger Files
Enter full paths for files whose changes you want to explicitly trigger a prebuild. Use new lines for multiple entries.
```
```text
Retention
Maximum number of resulting builds stored at a time
>
```
Subsequent `daytona create` calls will automatically detect the most recent existing build and use it to create the project.
## Use a Prebuild
Once you added a Prebuild, it becomes active immediately based on the [project configuration](/docs/usage/projects#project-configuration) you provided. The Prebuild will automatically run whenever the specified conditions are met, such as when the defined number of commits is reached.
For instance, if you specified a commit interval of `5`, the Prebuild will run after every `5` commits to the repository. Populate the **Trigger files** field with files whose changes you want to immediately trigger a Prebuild, without having to wait for the commit interval. Use the **Retention** field to define how many successful builds you want Daytona to remember (defaults to `3`).
As soon as you add a Prebuild, a build process will automatically start in the background unless you have configured it otherwise. The initial build process may take some time to complete, but subsequent builds will be significantly faster. You can view the initial build's progress by running `daytona builds list`.
Once the build process is complete, run the following command to create a Workspace using the configured project configuration:
```shell
daytona create [PROJECT_CONFIG_NAME]
```
Upon running this command, Daytona will detect the most recent Prebuild associated with the selected project configuration. The Workspace will then use this Prebuild, significantly speeding up the setup process by utilizing the cached environment
During the Workspace creation process, if the initial Prebuild has finished, the setup will be almost instantaneous. Otherwise, a new build will be triggered, potentially slowing down the Workspace creation.
## List Prebuilds
Daytona provides an option to list all Prebuilds, providing you with an overview of the properties stored within each Prebuild configuration.
1. Run the following command to list all Prebuilds:
```shell
daytona prebuilds list
```
Upon running this command, Daytona will display a list of your Prebuilds. You will be able to view the project configuration, the branch it is linked to, the commit interval, the trigger files, and the build retention.
```text
Project Config Branch Commit Interval Trigger files Build Retention
────────────────────────────────────────────────────────────────────────
MyConfig main 5 None 3
```
## Prebuilds Information
Daytona provides an option to view detailed information of a Prebuild, providing you with an overview of the properties stored within it.
1. Run the following command to view the details of a Prebuild:
```shell
daytona prebuilds info
```
2. Select the Prebuild you want to view.
```text
Select a Prebuild To View
1 item
MyConfig (main)
abcd1234efg (every 5 commits)
```
Upon selecting the Prebuild, Daytona will display the details of the selected Prebuild. You will be able to view the Prebuild ID, the project configuration, the branch it is linked to, the commit interval, the trigger files, and the build retention.
```text
Prebuild Configuration Info
ID abcd1234efg
Project config MyConfig
Branch main
Commit interval 5
Build retention 3
```
## Update Prebuilds
Daytona provides an option to update a Prebuild, helping you manage and modify the Prebuild configuration.
1. Run the following command to update a Prebuild:
```shell
daytona prebuilds update
```
2. Select the Prebuild you want to update.
```text
Select a Prebuild To Update
1 item
MyConfig (main)
abcd1234efg (every 5 commits)
```
Upon selecting the Prebuild, Daytona will prompt you to update the Prebuild commit interval, trigger files, and build retention.
```text
Commit interval
>
```
```text
Trigger Files
Enter full paths for files whose changes you want to explicitly trigger a prebuild. Use new lines for multiple entries.
```
```text
Retention
Maximum number of resulting builds stored at a time
>
```
Upon updating the Prebuild configuration, Daytona will display a success message.
```text
Prebuild updated successfully
```
## Delete Prebuilds
Daytona provides an option to delete Prebuilds, helping you manage and remove those that are no longer needed.
1. Run the following command to delete a Prebuild:
```shell
daytona prebuilds delete
```
2. Select the Prebuild you want to delete.
```text
Select a Prebuild To Delete
1 item
MyConfig (main)
abcd1234efg (every 5 commits)
```
```text
Prebuild deleted successfully
```
---
title: Runners
description: Learn how to use and manage Runners in Daytona.
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
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.
Once deployed, the Runner starts up and connects to the [Daytona Server](/docs/usage/server), at which point its status is marked as `Running`.
The Runner sends all requests, while the Server only responds. The Runner sends requests such as _Heartbeat_ (to share its status) and _Job Requests_ (to ask Daytona Server for jobs assigned to it).
A single Runner can use multiple [Providers](/docs/configuration/providers), configured during deployment or later via jobs, enabling flexibility for various environments.
## Create a Runner
Daytona provides an option to create a new Runner, enabling you to deploy it on a target system and connect it to the Daytona Server.
1. Run the following command to create a new Runner:
```shell
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.
2. Paste the code snippet into the target system's terminal and execute it to configure the Runner.
## Start / Serve a Runner
Daytona provides options to serve a Runner in the foreground or start a Runner as a daemon/background process. Use the method that best suits your requirements.
```shell
daytona runner serve
```
```shell
daytona runner start
```
The Runner will connect to the Daytona Server and its status will be marked as `Running`.
## Configure a Runner
Daytona provides an option to configure a Runner, enabling you to update its configuration settings.
1. Run the following command to configure a Runner:
```shell
daytona runner configure
```
Upon running the command, Daytona will display the current Runner configuration settings and prompt you to update them.
```text
ID
Unique ID generated by the Daytona Server
>
Name
Unique name set on the Daytona Server
>
Runner API Port
Port used for exposing runner health-check endpoint
> 3983
Server API URL
>
Server API Key
>
Providers Directory
Directory will be created if it does not exist
> /Users//Library/Application Support/daytona-runner/providers
Telemetry Enabled
[Yes] [No]
Log File Path
File will be created if it does not exist
> /Users//Library/Application Support/daytona-runner/log
Log File Max Size
In megabytes
> 100
Log File Backups
> 7
Log File Max Age
In days
> 15
Log File Local Time
Used for timestamping files. Default is UTC time.
[Yes] [No]
Log File Compress
[Yes] [No]
```
Upon configuring the Runner, Daytona update the Runner configuration and display the following message:
```text
Runner configuration updated. To start running jobs, run 'daytona runner start'.
```
:::tip
View the current Runner configuration by running the following command:
```shell
daytona runner config
```
Upon running the command, Daytona will display the current Runner configuration settings.
:::
## Purge a Runner
Daytona provides an option to purge a Runner, enabling you to remove it from the Daytona Server.
1. Run the following command to purge a Runner:
```shell
daytona runner purge
```
Upon running the command, Daytona will display a list of Runners and prompt you to select the Runner you want to purge.
```text
Purging will remove the entire Daytona Runner configuration from the system, are you sure you want to continue?
This action is irreversible.
[Yes] [No]
```
2. Confirm the action by selecting **`Yes`**.
```text
The Daytona Runner has been purged from this device.
```
## Restart a Runner
Daytona provides an option to restart a Runner, enabling you to restart it on the target system.
1. Run the following command to restart a Runner:
```shell
daytona runner restart
```
Upon running this command, Daytona will restart the Runner on the target system.
## Stop a Runner
Daytona provides an option to stop a Runner, enabling you to stop it on the target system.
1. Run the following command to stop a Runner:
```shell
daytona runner stop
```
Upon running this command, Daytona will stop the Runner on the target system.
## Runner Logs
Daytona provides an option to view the logs of a Runner, enabling you to monitor its activities.
1. Run the following command to view the logs of a Runner:
```shell
daytona runner logs
```
Upon running this command, Daytona will display the logs of the Runner.
---
title: Samples
description: Learn how to create and manage samples in Daytona.
sidebar:
label: Samples
---
import Keyboard from "../../../components/Keyboard.astro"
Samples are quick-start repositories with predefined development configurations, environments, and dependencies used to create Workspaces.
## Custom Samples
Daytona provides an option to use custom Samples to create Workspaces. Creating custom Samples is a two-step process that involves:
- [**Sample Repository**](#sample-repository)
A repository containing the Sample code and a `devcontainer.json` file defining the development environment.
- [**Samples Index**](#samples-index)
Samples Index (`index.json`) file serving as a registry of available Samples for creating Workspaces.
### Sample Repository
Custom Sample repository is a Git repository that contains the Sample code and a `devcontainer.json` file that defines the development environment. The repository serves as the core content of the Sample and is used to create a Workspace.
1. Create a repository representing the custom Sample.
2. Define the custom Sample code, development configurations and dependencies.
3. Create a **`devcontainer.json`** file that defines the development environment.
- Use the [development container standard](https://containers.dev/) to define your development environment. Development containers vary based on the programming language, configurations, and tools used within the Sample.
Example of a **`devcontainer.json`** file for development environment using Go programming language:
```json
{
"name": "Go",
"image": "mcr.microsoft.com/devcontainers/go:1-1.21-bookworm",
"customizations": {
"vscode": {
"extensions": [
"golang.Go"
]
}
},
"postCreateCommand": "go test -v"
}
```
4. Host the Sample repository on a Git repository or another platform.
5. Add Sample properties to the [Samples Index](#samples-index).
Sample will be used to create a Workspace by cloning the repository and using the `devcontainer.json` file to define the development environment.
### Samples Index
Samples require a Sample Index (`index.json`) file that serves as a registry of available Samples for creating Workspaces. The Samples Index is used to display the available Samples when creating a Workspace.
1. Create an **`index.json`** file representing the Samples Index.
2. Define an array of JSON objects representing the Samples.
Each JSON object in the array represents a Sample:
```json
[
{
"name": "My Custom Sample",
"description": "My custom Samples description",
"gitUrl": "https://github.com//"
}
]
```
- **`name`**
Name of the Sample.
- **`gitUrl`**
Link to the publicly available Sample repository.
3. Host the **`index.json`** file publicly on a Git repository or another platform.
4. Run the following command to configure the Samples Index URL:
```sh
daytona server configure
```
5. Enter the public raw URL of the **`index.json`** file in the **`Samples Index URL`** field.
```text
Samples Index URL
Leave empty to disable samples
https://raw.githubusercontent.com////index.json
```
```text
Server configuration updated. You need to restart the server for the changes to take effect.
```
6. Restart the Daytona server to apply the changes.
```sh
daytona server restart
```
Custom Samples will be available available when creating a Workspace. The chosen Sample will be cloned and used to create the Workspace.
## Daytona Samples
Daytona provides a collection of default Samples with predefined development configurations, environments, and dependencies. Daytona Samples are available to choose from when [creating a Workspace](/usage/workspaces#create-a-workspace).
Daytona Samples are integrated via a Samples Index (`index.json`) file that serves as a registry of available Daytona Samples for creating Workspaces.
The chosen Sample will be cloned and used to create the Workspace. The Daytona Sample repository will serve as the core content of the Sample used to create a Workspace.
View the list of available Daytona Samples in the [Samples Index](https://github.com/daytonaio/daytona/blob/main/hack/samples/index.json).
:::tip
You can contribute to the Daytona Samples by suggesting new Samples to be added to the [Daytona Samples Index](https://github.com/daytonaio/daytona/blob/main/hack/samples/index.json).
:::
---
title: Targets
description: Learn how to manage Target configuration across Workspaces.
sidebar:
label: Targets
---
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.
## Create a Target
Daytona provides an option to create a Target. Creating a Target requires creating a Target Configuration and specifying the Provider to use.
1. Run the following command to create a Target:
```shell
daytona target create
```
2. Select the [Target Configuration](/docs/configuration/target-config) to use for the Target.
3. Select the [Provider](/docs/configuration/providers) for the environment you want to deploy to.
4. Enter a name for your Target.
```text
Target Name
>
```
5. Enter the appropriate configuration options when prompted. The configuration options vary based on the selected Provider. The following example shows adding a [local Docker Target Configuration](/docs/configuration/target-config#docker-local).
```text
Sock Path
> /var/run/docker.sock
```
6. Enter a name for your Target.
```text
Target Name
>
```
```text
✓ Request submitted
Creating target
```
## Start a Target
Daytona provides an option to start a Target.
1. Run the following command to start a Target:
```shell
daytona target start
```
2. Select the Target you want to start.
```text
Select Targets to Start
===
local (default)
Docker (local)
```
## Stop a Target
Daytona provides an option to stop a Target.
1. Run the following command to stop a Target:
```shell
daytona target stop
```
2. Select the Target you want to stop.
```text
Select Targets to Stop
===
local (default)
Docker (local)
```
## List Targets
Daytona provides an option to list all Targets.
1. Run the following command to list all Targets:
```shell
daytona target list
```
Upon running the command, Daytona will display a list of all Targets along with their configurations.
```text
Target Config Name # Workspaces Default Status
local (Docker) local 0 Yes /
AWS aws 0 No Started
```
## Restart a Target
Daytona provides an option to restart a Target.
1. Run the following command to restart a Target:
```shell
daytona target restart
```
## Delete a Target
Daytona provides an option to remove a Target.
1. Run the following command to remove a Target:
```shell
daytona target delete
```
2. Select the Target you want to delete.
```text
Select Targets to Delete
===
local (default)
Docker (local)
```
## Targets Information
Daytona provides an option to view detailed information about a Target.
1. Run the following command to view detailed information about a Target:
```shell
daytona target info
```
2. Select the Target you want to view information about.
```text
Select Target to View
===
local (default)
Docker (local)
```
Upon running the command, Daytona will display detailed information about the selected Target.
```text
Name: local
ID:
Provider: Docker
Runner: local
Default: Yes
State: Running
# Workspaces: 1
```
2. Select the Target you want to restart.
```text
Select Targets to Restart
===
local (default)
Docker (local)
```
Upon running the command, Daytona will restart the selected Target.
## Set Default Target
Daytona provides an option to set a Target as the default Target.
1. Run the following command to set a Target as the default Target:
```shell
daytona target set-default
```
2. Select the Target you want to set as the default Target.
```text
Select a Target To Set As Default
===
local (default)
Docker (local)
```
Upon running the command, Daytona will set the selected Target as the default Target.
```text
Target 'local' set as default
```
## SSH into a Target
Daytona provides an option to SSH into a Target.
1. Run the following command to SSH into a Target:
```shell
daytona target ssh
```
2. Select the Target you want to SSH into.
```text
Select a Target To SSH Into
===
local (default)
Docker (local)
```
Upon running the command, Daytona will SSH into the selected Target.
## Target Logs
Daytona provides an option to view logs for a Target.
1. Run the following command to view logs for a Target:
```shell
daytona target logs
```
2. Select the Target you want to view logs for.
```text
Select a Target To View Logs
===
local (default)
Docker (local)
```
Upon running the command, Daytona will display logs for the selected Target.
```text
local | Creating target local ()
local | ✓ Target creation complete
```
---
title: Workspaces
description: Learn how to create and manage Workspaces using Daytona.
sidebar:
label: Workspaces
---
Workspaces are isolated development environments containing your project’s codebase, dependencies, packages, and configuration, providing a consistent and reproducible setup for development, testing, and deployment.
Workspaces serve as a core component of Daytona, allowing you to create, manage, and collaborate on projects in a controlled and secure environment.
Workspaces are hosted using a suitable [Target](/docs/usage/targets) infrastructure, such as a cloud-based and on-premises environments. They ensure that changes in one project do not inadvertently affect another, promoting a more stable and reliable workflow. This is particularly beneficial in collaborative settings, as it ensures that all team members are working with the same configuration, reducing the likelihood of environment-related issues.
## Create a Workspace
Creating a Workspace in Daytona is a straightforward process that ensures you have a dedicated development environment for your projects.
Daytona provides two primary methods for creating a Workspace:
- [**From a Git Repository**](#from-a-git-repository)
- [**From an Arbitrary Git URL**](#from-an-arbitrary-git-url)
### From a Git Repository
Creating a Workspace from a Git repository sets up a new development environment using a [connected Git Provider](/docs/configuration/git-providers) or a custom Git repository URL.
1. Run the following command to create a Workspace from a Git repository:
```shell
daytona create
```
2. Select one of the three provided options:
- **Select from a List of Repositories**
If you [connected a Git Provider](/docs/configuration/git-providers), you will be presented with a list of your repositories from which you can select to connect with your Workspace.
- **Enter a Custom Repository URL**
Alternatively, select the 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 from a Sample project provided by Daytona. This option sets up a new development environment using quick-start templates.
```text
Choose a Git Provider
3 items
===
GitHub
Enter a custom repository URL
Create from Sample
```
3. Enter a name for your Workspace.
```text
Workspace name
>
```
4. Select a Target to deploy your Workspace to. Selecting a Target will prompt you to input the [Target configuration](/docs/configuration/target-config). 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.
```text
| ✓ Request submitted
| Creating workspace ()
| Pulling image...
| Pulling from daytonaio/workspace-project
| Digest: sha256: | Status: Image is up to date for daytonaio/workspace-project:latest
| ✓ Image pulled successfully
| UIDs and GIDs are the same (1000:1000).
| Cloning into '/workdir/'...
| UIDs and GIDs are the same (1000:1000).
| ✓ Workspace created
```
### From an Arbitrary Git URL
Creating a Workspace from an arbitrary Git URL sets up a new development environment by directly specifying the URL of the remote repository.
1. Run the following command to create a Workspace from a remote Git repository:
```shell
daytona create
```
**Example**
```shell
daytona create https://github.com/daytonaio/daytona.git
```
2. Select a Target to deploy your Workspace to. Selecting a Target will prompt you to input the [Target configuration](/docs/configuration/target-config). 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.
Once complete, the Workspace will be ready for use with the specified repository and configuration.
```text
| ✓ Request submitted
| Creating workspace ()
| Pulling image...
| Pulling from daytonaio/workspace-project
| Digest: sha256: | Status: Image is up to date for daytonaio/workspace-project:latest
| ✓ Image pulled successfully
| UIDs and GIDs are the same (1000:1000).
| Cloning into '/workdir/'...
| UIDs and GIDs are the same (1000:1000).
| ✓ Workspace created
```
## List Workspaces
Daytona provides an option to keep track of your development environments by listing all previously created Workspaces. This helps you manage multiple development environments and ensure that you can easily access and maintain your Workspaces.
1. Run the following command to list all your Workspaces:
```shell
daytona list
```
Upon running this command, Daytona will display a list of your Workspaces with their details. You will be able to see the Workspace name, the repository it is connected to, the target of the Workspace, and its status.
```text
Workspace Repository Target Status Branch
─────────────────────────────────────────────────────────────────
MyWorkspace user/repository local STARTED (30 minutes) master
```
## Open An Existing Workspace
Daytona provides an option to open an existing Workspace in your IDE. This enables you to quickly access and work on your Workspaces in your preferred development environment. With Daytona, you can effortlessly switch between different Workspaces and maintain an efficient workflow.
1. Run the following command to open an existing Workspace:
```shell
daytona code
```
Upon running this command, Daytona will display a list of your Workspaces with their details. You will be able to see the Workspace name, the unique identifier of the Workspace, and the repository it is connected to.
```text
Select a Workspace To Open
1 item
MyProject
abcdefg12hi3 (local)
github.com/username/MyProject.git
```
2. Select the Workspace you want to open.
:::note
Configure Daytona to use your preferred IDE.
Refer to **[Set the Default IDE](/docs/usage/ide#set-the-default-ide)** for more information.
:::
## Delete Workspaces
Daytona provides an option to delete one or more Workspaces, helping you manage your development environments by removing those that are no longer needed.
1. Run the following command to delete a Workspace:
```shell
daytona delete
```
Upon running this command, Daytona will display a list of your Workspaces with their details. You will be able to see the Workspace name, the unique identifier of the Workspace, and the repository it is connected to.
```text
Select Workspaces To Delete
1 item
MyWorkspace
abcdefg12hi3 (local)
github.com/username/MyProject.git
```
2. Mark Workspaces for deletion by highlighting them and pressing `x`.
3. Press `Enter` on the selected Workspace to delete it.
```text
Delete: MyWorkspace
abcdefg12hi3 (local)
github.com/username/MyProject.git
```
4. Confirm the action.
```text
Delete workspace(s): [MyWorkspace]?
Are you sure you want to delete the workspace(s): [MyWorkspace]?
[Yes] [No]
```
```text
Workspace MyWorkspace successfully deleted
```
### Non-Interactively
Daytona provides an option to delete one or more existing Workspaces non-interactively, allowing for quick and automated cleanup of your development environments without manual selection.
1. Run the following command, specifying the workspace names/UUIDs to delete:
```shell
daytona delete WORKSPACE_1 WORKSPACE_2
```
Upon running this command, Daytona will prompt you to confirm the deletion of the specified Workspace. You will be able to see the Workspace name that you are about to delete, and you will have the option to confirm or cancel the action.
```text
Delete workspace(s): [MyWorkspace]?
Are you sure you want to delete the workspace(s): [MyWorkspace]?
[Yes] [No]
```
2. Confirm the action to delete the selected Workspace.
```text
Workspace MyWorkspace successfully deleted
```
## Forward Ports from a Workspace
Daytona supports flexible port forwarding, allowing you to access services running in a Workspace locally or via a shareable public URL.
With port forwarding, you can work on your project in a Workspace and test your code externally.
### Access a Port Locally
You can access services running in a Workspace on your local machine.
**Prerequisite**
- A running Workspace with at least one service accessible via TCP/UDP.
1. Run the following command to forward a port from a running Workspace to your local machine:
```shell
daytona forward
```
**Example:** Allow local access to port 4321 of the `example-dev-env` Workspace.
```shell
daytona forward 4321 example-dev-env
```
Upon running this command, Daytona will establish a port forwarding connection from the specified port in the Workspace to your local machine. The terminal will display a message indicating the local port where the forwarded connection is available:
```text
Port available at http://localhost:4321
```
### Access a Port via Public URL
You can access services running in a Workspace via a generated public URL.
This allows you to share your work with others in real-time.
:::note
This feature uses a free public proxy service hosted by Daytona Platforms, Inc.
By using this feature, you acknowledge that your data is processed in accordance with Daytona's [Privacy Policy](https://www.daytona.io/company/privacy-policy) and [Terms of Service](https://www.daytona.io/company/terms-of-service).
:::
**Prerequisite**
- A running Workspace with at least one service accessible via TCP/UDP.
1. Run the following command to generate a public URL for a port on a running Workspace:
```shell
daytona forward --public
```
**Example:** Generate a URL to access port 4321 of the `example-dev-env` Workspace.
```shell
daytona forward 4321 example-dev-env --public
```
Upon running this command, Daytona will first establish a local port forwarding connection and display a message indicating the local port where the forwarded connection is available.
```text
Port available at http://localhost:4321
```
Then, Daytona will proceed to forward the port to a public URL. The terminal will display progress information and, upon completion, provide the generated public URL.
```text
Forwarding port to a public URL...
Port available at:
https://4321-ABC1DeF2GhI3JkLmNoP4RSTuVZ5.try-eu.daytona.app
```
This URL can be shared with others to provide real-time access to the service running on the specified port in your Workspace.