DEV Community

Chad Metcalf for Daytona

Posted on • Originally published at daytona.io on

Install Daytona on DigitalOcean in Minutes

Image description
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

  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:

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
Enter fullscreen mode Exit fullscreen mode

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):
Enter fullscreen mode Exit fullscreen mode

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.

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.

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!

Top comments (0)