Install Daytona on DigitalOcean in Minutes
Tags: guides, howto
Published: 2024-02-16 09:11:55

---
title: Install Daytona on DigitalOcean in Minutes
published: true
date: 2023-12-20 00:00:00 UTC
tags: Guides, howto
canonical_url: https://www.daytona.io/dotfiles/install-daytona-on-digitalocean-in-minutes
---
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trozbwalcjewaz4jop3s.png)
This article provides a step-by-step guide on quickly setting up Daytona on DigitalOcean. You'll learn how to prepare your environment, configure necessary settings, and launch your Daytona instance efficiently.

## Preparing Your DigitalOcean Account for Daytona
 ![](https://www.datocms-assets.com/103916/1703258755-do-do.png)
1. Log in to your DigitalOcean account.

2. Create a droplet with the recommended specifications:

3. Choose Ubuntu 22.04 LTS (Jammy) for optimal compatibility with Daytona.

4. Ensure you have a domain, ideally hosted on DigitalOcean, for easier setup.

## Configuring OAuth and Domain

Set up an OAuth application on GitHub or GitLab, following the provided instructions:

- [GitHub OAuth App](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)

- [GitLab OAuth App](https://docs.gitlab.com/ee/integration/oauth_provider.html)

- [Bitbucket OAuth](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)

Values to set in the identity provider:

- Homepage URL: `https://{{ domain-name }}`

- Authorization callback URL: `[https://id.{{](https://id.{{/) domain-name }}`

## Setting Up the Environment

1. Access your DigitalOcean droplet's console.

2. Confirm Git is installed by running `git --version`.

3. Clone the Daytona repository using `git clone` followed by the repository URL.

4. Navigate to the installer directory and initiate the setup process.

```
git clone https://github.com/daytonaio/installer
cd installer
./setup.sh
```
 ![](https://www.datocms-assets.com/103916/1703258762-do-install.png)
## Agreeing to Terms and Installing Dependencies

1. Accept the terms of use for evaluation or home use. For commercial use, contact the Daytona team.

2. The setup will install Helm for Kubernetes application management and Certbot for TLS certificate management.

3. The setup will also configure the cluster with K3S and specify GitHub for version control integration.

4. Enter the required secrets for OAuth when prompted.

Here is the prompt you will receive if you choose Github IdP for example:

```
./setup.sh
...
Enter app hostname (valid domain) [FQDN]: daytona.example.com
Identity Providers (IdP) available [IDP]:
1) github
2) gitlab
3) bitbucket
4) gitlabSelfManaged
5) githubEnterpriseServer
Choose an IdP (type the number and press Enter): 1
Enter IdP Client ID [IDP_ID]: changeme
Enter IdP Client Secret (IDP_SECRET) (input hidden):
```

## DNS Configuration and Certificates

1. Add DNS records (`*` and `@`) in DigitalOcean to point to your Daytona instance.

2. In your droplet's console, clone the Daytona installer from our GitHub.

3. Run the setup script `./setup.sh`.

4. Set up the Acme challenge by creating the necessary DNS records for TLS certificate validation.

5. Wait for the DNS to propagate and verify the setup.

 ![](https://www.datocms-assets.com/103916/1703258751-do-dns.png)
## Finalizing the Installation

1. The installation will proceed to set up a K3S cluster and install Longhorn for storage requirements.

2. The process may take several minutes, during which you can monitor the progress.

## Launching Daytona

1. Once the installation is complete, navigate to your domain to access the Daytona instance.

2. Log in using GitHub OAuth to authenticate.

3. Create a new workspace by specifying a repository URL.

4. The workspace will launch, and you can begin using Daytona within minutes.

## Post-Installation Tips

- Consider pre-building images to speed up workspace launches.

- Ideally, you can utilize NVMe storage for faster performance.

## Full Tutorial on YouTube

To see these steps in action, you can view the full video tutorial on YouTube, which provides a comprehensive walkthrough of the entire process.

{% youtube aT1Oeo3QvDM %}

## Conclusion

Following these steps, you can have a fully functional Daytona environment on DigitalOcean in under half an hour. The process is straightforward, and the environment is just as easy to dismantle if needed.

Enjoy the speed and convenience of your new Daytona setup!