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

# Fly.io

<AccordionGroup>
  <Accordion title="Prerequisites" icon="list-check">
    * An Enkryptify workspace with admin access
    * A Fly.io account with access to the target organization
    * At least one Fly.io app in that organization
    * A Fly.io API token that can list apps and manage app secrets
  </Accordion>

  <Accordion title="Permissions" icon="scroll-text">
    Enkryptify connects to Fly.io with the API token you provide during setup. The token is encrypted and reused when you create additional Fly.io syncs.

    * The token must allow Enkryptify to:
      * List Fly.io apps available to your account
      * Create and update secrets on the selected app
      * Delete secrets from the selected app when they are removed from Enkryptify

    > Fly.io tokens inherit the permissions of the account or organization scope they are created for. Use the narrowest token that can manage secrets for the apps you want to sync.
  </Accordion>
</AccordionGroup>

## Steps to complete

<Steps>
  <Step title="Create a new sync">
    * Go to the `Syncs` tab of your project and click on `Fly.io`.
  </Step>

  <Step title="Create a Fly.io API token">
    * Open your Fly.io dashboard.
    * Go to your account or organization access token settings.
    * Create a token that can access the Fly.io API and manage secrets for the target app.
    * Copy the token before leaving the page.

          <img src="https://mintcdn.com/enkryptify-39ddac35/iPQ9H9JPySgj2K7Z/images/sync/flyio/create-token.png?fit=max&auto=format&n=iPQ9H9JPySgj2K7Z&q=85&s=44afa8fe512a24e31564dbaa2285ed05" alt="Create a Fly.io API token" width="2582" height="1810" data-path="images/sync/flyio/create-token.png" />
  </Step>

  <Step title="Authenticate in Enkryptify">
    * Paste the Fly.io API token into Enkryptify.
    * Continue to validate the token.
    * Enkryptify will fetch the Fly.io apps available to that token.
  </Step>

  <Step title="Select your Fly.io app">
    * Choose the Fly.io app that should receive your secrets.
    * Apps are shown with their organization name so you can confirm the correct target.
  </Step>

  <Step title="Link an Enkryptify environment">
    * Choose the Enkryptify environment to sync from.
    * Secret names and values from this environment will be written to the selected Fly.io app.
  </Step>
</Steps>
