Back to HomeTurboCI Docs

Multi-Cloud Setup

Deploy the same application across multiple cloud providers with a single configuration file.

Why Multi-Cloud?

Multi-cloud deployments provide redundancy, reduce vendor lock-in, and allow you to optimize costs by using the best provider for each region.

High Availability

If one cloud provider has an outage, your application continues running on other providers.

Cost Optimization

Use cheaper providers for development and expensive providers only for production.

Geographic Distribution

Deploy to the provider with the best presence in each region for lower latency.

No Vendor Lock-In

Switch providers anytime without rewriting your infrastructure code.

Basic Multi-Cloud Configuration

Simply define multiple deployments with different providers. TurboCI handles the rest:

# turboci.yaml
deployments:
  - deployment_name: web_hetzner
    provider: hetzner
    region: eu-central
    services:
      - service_name: web
        image: myapp:latest
        instances: 3
        port: 3000
        
  - deployment_name: web_aws
    provider: aws
    region: us-east-1
    services:
      - service_name: web
        image: myapp:latest
        instances: 5
        port: 3000
        
  - deployment_name: web_gcp
    provider: gcp
    region: us-west1
    services:
      - service_name: web
        image: myapp:latest
        instances: 3
        port: 3000

Environment Variables

Set up API keys for each provider you want to use:

# .env
TURBOCI_HETZNER_API_KEY=your_hetzner_key
TURBOCI_AWS_API_KEY=your_aws_key
TURBOCI_GCP_API_KEY=your_gcp_key

TurboCI automatically uses the correct API key for each deployment based on the provider specified.

Deployment Duplication

One of TurboCI's most powerful features is deployment duplication. The same configuration works across all providers without modification:

Single Command, Multiple Clouds

turboci up

This single command deploys your application to Hetzner, AWS, and GCP simultaneously. No provider-specific configuration needed.

Selective Deployment

Deploy to specific clouds using the targeting feature:

Deploy only to Hetzner

turboci up -t web_hetzner

Deploy to AWS and GCP, skip Hetzner

turboci up -s web_hetzner

Update only AWS deployment

turboci up -t web_aws

Advanced: Different Configurations Per Cloud

While TurboCI excels at deployment duplication, you can also customize each cloud deployment:

deployments:
  # Production on AWS with more instances
  - deployment_name: web_aws_prod
    provider: aws
    region: us-east-1
    services:
      - service_name: web
        image: myapp:latest
        instances: 10
        port: 3000
        env:
          NODE_ENV: production
          
  # Staging on Hetzner with fewer instances
  - deployment_name: web_hetzner_staging
    provider: hetzner
    region: eu-central
    services:
      - service_name: web
        image: myapp:latest
        instances: 2
        port: 3000
        env:
          NODE_ENV: staging

Next Steps

Explore real-world examples of TurboCI configurations.

Continue to Examples →