Skip to main content

Deploy to DigitalOcean

This tutorial will show you how to deploy your services to your own DigitalOcean account using Defang.

Pre-requisites

Step 1 - Navigate to your project directory

Head to the folder where your project is located.

$ cd path/to/your/project

Step 2 - Authenticate Defang to use your DigitalOcean Account

Defang will look for your DigitalOcean credentials in your shell environment and expect to find the following credentials:

  • the DIGITALOCEAN_TOKEN environment variable
  • and, the SPACES_ACCESS_KEY_ID and SPACES_SECRET_ACCESS_KEY environment variables

Step 3 - Deploy

Invoke the defang compose up CLI command with the --provider=do flag or set the DEFANG_PROVIDER=do environment variable.

For example:

$ defang compose up --provider=do

Step 4 - Inspect your deployment

Defang will provision resources in your DigitalOcean account and deploy your services. You can inspect the resources created in your DigitalOcean Dashboard.


For a deeper discussion of the Defang DigitalOcean Architecture, see our DigitalOcean Provider docs.