> ## 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.

# Installation

> Install Lightfold and deploy your first app in minutes

## Installation

### Homebrew (macOS/Linux)

```bash theme={null}
brew tap theognis1002/lightfold
brew install lightfold
```

### Manual Installation

**Download Pre-built Binary:**

Visit the [releases page](https://github.com/theognis1002/lightfold-cli/releases) and download the binary for your platform.

**Build from Source:**

```bash theme={null}
git clone https://github.com/theognis1002/lightfold-cli.git
cd lightfold-cli
make build
sudo make install
```

## First Deployment

<Steps>
  <Step title="Navigate to your project">
    ```bash theme={null}
    cd your-project
    ```
  </Step>

  <Step title="Run deploy">
    ```bash theme={null}
    lightfold deploy
    ```

    Lightfold will:

    * Auto-detect your framework
    * Prompt you to select a cloud provider
    * Create infrastructure
    * Configure the server
    * Deploy your app
  </Step>

  <Step title="Access your app">
    Your app will be live at the IP address shown in the output.
  </Step>
</Steps>

## Provider Setup

Lightfold supports multiple cloud providers. You'll need an API token for automated provisioning.

<AccordionGroup>
  <Accordion title="DigitalOcean" 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. Run: `lightfold config set-token digitalocean`
  </Accordion>

  <Accordion title="Vultr" 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. Run: `lightfold config set-token vultr`
  </Accordion>

  <Accordion title="Hetzner Cloud" 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. Run: `lightfold config set-token hetzner`
  </Accordion>

  <Accordion title="Linode" 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. Run: `lightfold config set-token linode`
  </Accordion>

  <Accordion title="Fly.io" icon="paper-plane">
    1. Create a [Fly.io account](https://fly.io)
    2. Install flyctl: `curl -L https://fly.io/install.sh | sh`
    3. Generate token: `fly auth token`
    4. Run: `lightfold config set-token flyio`
  </Accordion>

  <Accordion title="Bring Your Own Server (BYOS)" icon="key">
    Already have a server? Use BYOS mode:

    ```bash theme={null}
    lightfold create --provider byos --ip YOUR_IP --user YOUR_USER --ssh-key ~/.ssh/id_rsa
    ```
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Commands" icon="terminal" href="/commands">
    Learn about all available commands
  </Card>

  <Card title="Deployment Guide" icon="rocket" href="/deployment">
    Understand the deployment flow
  </Card>

  <Card title="Configuration" icon="gear" href="/configuration">
    Customize your deployments
  </Card>

  <Card title="Supported Frameworks" icon="code" href="/frameworks">
    See all supported frameworks
  </Card>
</CardGroup>
