> ## Documentation Index
> Fetch the complete documentation index at: https://lightfold.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported Providers

> Cloud providers and deployment options supported by Lightfold

## Available Providers

### DigitalOcean

Full provisioning support with automatic server creation.

<AccordionGroup>
  <Accordion title="Setup" icon="digital-ocean">
    1. Create a [DigitalOcean account](https://www.digitalocean.com)
    2. Generate an API token in [API settings](https://cloud.digitalocean.com/account/api/tokens)
    3. Store token: `lightfold config set-token digitalocean`
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider digitalocean \
      --region nyc1 \
      --size s-1vcpu-1gb
    ```

    **Available regions:** `nyc1`, `nyc3`, `sfo1`, `sfo3`, `ams3`, `sgp1`, `lon1`, `fra1`, `tor1`, `blr1`

    **Popular sizes:**

    * `s-1vcpu-1gb` - \$6/mo
    * `s-1vcpu-2gb` - \$12/mo
    * `s-2vcpu-2gb` - \$18/mo
    * `s-2vcpu-4gb` - \$24/mo
  </Accordion>
</AccordionGroup>

### Vultr

Full provisioning support with automatic server creation.

<AccordionGroup>
  <Accordion title="Setup" icon="cloud">
    1. Create a [Vultr account](https://www.vultr.com)
    2. Generate an API key in [API settings](https://my.vultr.com/settings/#settingsapi)
    3. Store token: `lightfold config set-token vultr`
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider vultr \
      --region ewr \
      --size vc2-1c-1gb
    ```

    **Available regions:** `ewr`, `sea`, `lax`, `atl`, `ord`, `dfw`, `ams`, `lhr`, `fra`, `sgp`, `syd`

    **Popular sizes:**

    * `vc2-1c-1gb` - \$5/mo
    * `vc2-1c-2gb` - \$10/mo
    * `vc2-2c-4gb` - \$18/mo
    * `vc2-4c-8gb` - \$36/mo
  </Accordion>
</AccordionGroup>

### Hetzner Cloud

Full provisioning support with automatic server creation.

<AccordionGroup>
  <Accordion title="Setup" icon="server">
    1. Create a [Hetzner Cloud account](https://www.hetzner.com/cloud)
    2. Generate an API token in [API tokens](https://console.hetzner.cloud/)
    3. Store token: `lightfold config set-token hetzner`
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider hetzner \
      --region nbg1 \
      --size cx11
    ```

    **Available regions:** `nbg1`, `fsn1`, `hel1`, `ash`, `hil`

    **Popular sizes:**

    * `cx11` - €3.79/mo (2GB RAM, 1 vCPU)
    * `cx21` - €5.83/mo (4GB RAM, 2 vCPU)
    * `cx31` - €10.90/mo (8GB RAM, 2 vCPU)
    * `cx41` - €20.10/mo (16GB RAM, 4 vCPU)
  </Accordion>
</AccordionGroup>

### Linode

Full provisioning support with automatic server creation.

<AccordionGroup>
  <Accordion title="Setup" icon="cloud">
    1. Create a [Linode account](https://www.linode.com)
    2. Generate an API token in [API Tokens](https://cloud.linode.com/profile/tokens)
    3. Store token: `lightfold config set-token linode`
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider linode \
      --region us-east \
      --size g6-nanode-1
    ```

    **Available regions:** `us-east`, `us-west`, `us-central`, `us-southeast`, `eu-west`, `eu-central`, `ap-south`, `ap-northeast`, `ap-southeast`

    **Popular sizes:**

    * `g6-nanode-1` - \$5/mo (1GB RAM, 1 vCPU)
    * `g6-standard-1` - \$12/mo (2GB RAM, 1 vCPU)
    * `g6-standard-2` - \$24/mo (4GB RAM, 2 vCPU)
    * `g6-standard-4` - \$48/mo (8GB RAM, 4 vCPU)
  </Accordion>
</AccordionGroup>

### Fly.io

Container-based deployment with automatic global distribution.

<AccordionGroup>
  <Accordion title="Setup" icon="paper-plane">
    1. Create a [Fly.io account](https://fly.io)
    2. Generate an API token: `fly auth token`
    3. Store token: `lightfold config set-token flyio`
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider flyio \
      --region iad \
      --size shared-cpu-1x
    ```

    **Available regions:** `iad` (Ashburn), `lax` (Los Angeles), `sjc` (San Jose), `ewr` (Secaucus), `ord` (Chicago), `ams` (Amsterdam), `lhr` (London), `fra` (Frankfurt), `sin` (Singapore), `syd` (Sydney), `nrt` (Tokyo)

    **Popular sizes:**

    * `shared-cpu-1x` - \~\$2/mo (256MB RAM, 1 shared vCPU)
    * `shared-cpu-2x` - \~\$5/mo (512MB RAM, 2 shared vCPU)
    * `dedicated-cpu-1x` - \~\$30/mo (2GB RAM, 1 vCPU)
    * `dedicated-cpu-2x` - \~\$60/mo (4GB RAM, 2 vCPU)

    **Note:** Fly.io uses container-based deployments with nixpacks (no SSH access). Pricing includes automatic scaling and global distribution.
  </Accordion>
</AccordionGroup>

### BYOS (Bring Your Own Server)

Use any existing server with SSH access.

<AccordionGroup>
  <Accordion title="Requirements" icon="key">
    * Ubuntu 20.04+ or Debian 10+ (recommended)
    * SSH access with key-based authentication
    * Root or sudo privileges
    * Open ports: 80 (HTTP), 443 (HTTPS), 22 (SSH)
  </Accordion>

  <Accordion title="Usage">
    ```bash theme={null}
    lightfold create --target myapp \
      --provider byos \
      --ip 1.2.3.4 \
      --user deploy \
      --ssh-key ~/.ssh/id_rsa
    ```

    **Parameters:**

    * `--ip` - Server IP address
    * `--user` - SSH username
    * `--ssh-key` - Path to SSH private key
  </Accordion>
</AccordionGroup>

## Coming Soon

<CardGroup cols={2}>
  <Card title="AWS EC2" icon="aws">
    Amazon EC2 support
  </Card>

  <Card title="Google Cloud" icon="google">
    Compute Engine support
  </Card>

  <Card title="Azure" icon="microsoft">
    Azure VMs support
  </Card>
</CardGroup>

## Provider Comparison

| Provider     | Provisioning | Cost        | Regions | Notes                        |
| ------------ | ------------ | ----------- | ------- | ---------------------------- |
| DigitalOcean | ✅            | \$6-24/mo   | 11      | Great for beginners          |
| Vultr        | ✅            | \$5-36/mo   | 11      | Good price/performance       |
| Hetzner      | ✅            | €3.79-20/mo | 5       | Best value in Europe         |
| Linode       | ✅            | \$5-48/mo   | 9       | Reliable, good support       |
| Fly.io       | ✅            | \~\$2-60/mo | 11      | Container-based, global edge |
| BYOS         | ❌            | Varies      | Any     | Use existing server          |

## Multi-Provider Deployments

Deploy different targets to different providers:

```bash theme={null}
# Production on Hetzner (cost-effective)
lightfold deploy --target prod --provider hetzner

# Staging on DigitalOcean
lightfold deploy --target staging --provider digitalocean

# Development on BYOS
lightfold deploy --target dev --provider byos
```

## Provider Configuration

Configuration is stored per target in `~/.lightfold/config.json`:

```json theme={null}
{
  "targets": {
    "myapp": {
      "provider": "digitalocean",
      "provider_config": {
        "digitalocean": {
          "ip": "192.168.1.100",
          "username": "deploy",
          "ssh_key": "~/.lightfold/keys/lightfold_ed25519",
          "region": "nyc1",
          "size": "s-1vcpu-1gb",
          "provisioned": true,
          "droplet_id": "123456789"
        }
      }
    }
  }
}
```

API tokens are stored separately in `~/.lightfold/tokens.json` (0600 permissions).

## Choosing a Provider

<AccordionGroup>
  <Accordion title="For beginners" icon="graduation-cap">
    **DigitalOcean** - Great documentation, simple interface, solid performance.
  </Accordion>

  <Accordion title="For cost savings" icon="dollar-sign">
    **Hetzner Cloud** - Best value, especially for European traffic. **Fly.io** for smallest workloads (\~\$2/mo).
  </Accordion>

  <Accordion title="For existing infrastructure" icon="building">
    **BYOS** - Use your current server or on-premise infrastructure.
  </Accordion>

  <Accordion title="For global reach" icon="globe">
    **Fly.io** - Automatic global edge distribution with container-based deployments. **Vultr** for traditional VMs with more regions.
  </Accordion>

  <Accordion title="For reliability & support" icon="handshake">
    **Linode** (Akamai) - Enterprise-grade reliability with excellent customer support.
  </Accordion>
</AccordionGroup>

## IP Recovery

If your local state gets corrupted, Lightfold can recover server information:

```bash theme={null}
lightfold sync --target myapp
```

This fetches current server details from the provider API and updates your config.
