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

# Fly.io Deployment

> Practical examples and patterns for typical Fly.io deployment workflows

***

## Prerequisites

<Accordion title="Install and authenticate `flyctl`">
  ## Install `flyctl`

  #### <Icon icon="apple" /> macOS

  If using homebrew,

  ```bash theme={null}
  brew install flyctl
  ```

  Otherwise,

  ```bash theme={null}
  curl -L https://fly.io/install.sh | sh
  ```

  <Warning>
    If you used curl to install flyctl, then you need to add the flyctl directory to your shell rc file. Check the output of the install script for the entries to copy and paste into the file. Now you can use the fly command from any directory.
  </Warning>

  #### <Icon icon="linux" /> Linux

  ```bash theme={null}
  curl -L https://fly.io/install.sh | sh
  ```

  #### <Icon icon="windows" /> Windows

  ```bash theme={null}
  pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"
  ```

  ***

  ## Authenticate `flyctl`

  ```bash theme={null}
  fly auth login
  ```
</Accordion>

## Deploy to Fly.io

<Card title="Fly Commands" icon="wrench" href="/documentation/cli-v2/command-reference#param-name-name-6">
  Commands and configuration for Fly.io via the CLI
</Card>

<Steps>
  <Step title="Add Fly.io instance">
    ```bash theme={null}
    helix add fly --name production
    ```

    <Note>
      If you don't have a project setup, you can do so with `helix init fly`.
    </Note>
  </Step>

  <Step title="Build and deploy">
    ```bash theme={null}
    helix push production
    ```
  </Step>

  <Step title="Check deployment">
    ```bash theme={null}
    fly status -a my-app-production
    fly logs -a my-app-production
    ```
  </Step>
</Steps>
