Skip to main content

Getting Started

Install the CLI

Download the CLI appropriate for your system from

Authenticate with Defang

defang login

Build and Deploy a Service

Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more details:

  1. Generate new code using AI
  2. Deploy code using the CLI
  3. Deploy container using the CLI
  4. Deploy using Pulumi

Monitor a Service

By default, all the output (stdout and stderr) from your app is routed through the Defang log cluster. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service.

Upgrade a Service

To upgrade your app (for example, updating the base image of your container) you can run the same update command as before and it will build and deploy the latest version. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.