Regions

Learn how to list, choose, and configure deployment regions in Andasy.

Regions are the geographic locations where Andasy runs your application. Region selection affects latency, data residency, and availability.

What Is a Region?

A region determines where machines are created for your app. You can configure one region or multiple regions to:

  • Reduce user latency
  • Meet data-residency requirements
  • Improve resilience through multi-region deployment

Use andasy regions list as the source of truth for region codes available to your account.

List Available Regions

andasy regions list

This command prints region codes (for example, kgl, cdg) and descriptions.

Command aliases:

  • regions
  • region

Region Resolution

Region values can come from:

  • andasy.hcl (app.primary_region, app.regions)
  • --region CLI flag
  • ANDASY_REGION environment variable
  • App region data returned by the API

Override precedence:

  1. --region
  2. ANDASY_REGION
  3. Config (app.regions, then app.primary_region)
  4. API-provided app regions (when applicable)

Region codes must be lowercase.

Defaults and Deploy Behavior

  • Some non-deploy commands may fall back to the default region kgl when no value is resolved.
  • andasy deploy does not silently default if no region is resolved; it returns an error and asks you to configure one.

Configuring Regions in andasy.hcl

Configure regions in the app block.

Primary Region

Set one region with primary_region:

app_name = "my-app"

app {
  primary_region = "kgl"

  env = {}
  port = 8080

  compute {
    cpu       = 1
    memory    = 256
    cpu_kind  = "shared"
  }

  process {
    name = "web"
  }
}

Multi-Region Deployments

Set multiple deployment regions with regions:

app_name = "my-multi-region-app"

app {
  primary_region = "kgl"
  regions        = ["kgl", "fsn"]

  env = {}
  port = 8080

  compute {
    cpu       = 1
    memory    = 256
    cpu_kind  = "shared"
  }

  process {
    name = "web"
  }
}

During deployment, Andasy uses app.regions when present; otherwise it falls back to app.primary_region.

Using --region and ANDASY_REGION

Use runtime overrides when needed:

  • --region <code>
  • ANDASY_REGION=<code>

Examples

Deploy with environment variable:

ANDASY_REGION=kgl andasy deploy

Deploy with CLI flag:

andasy deploy --region kgl

Choosing the Right Region

  • Choose regions close to users for lower latency.
  • Keep legal or compliance boundaries in mind.
  • Use multiple regions only when you need additional resiliency.

Volumes and Region Changes

If a machine has an attached volume, that machine is pinned to the node where the volume exists. Because of this, you cannot move that machine to another region. In practice, workloads that depend on attached volumes are constrained to the region where those volumes were created.

Flags

FlagDescription
-h, --helpShow help for the command
-j, --jsonOutput result in JSON format
-v, --verboseVerbose output