# Leaked Fly.io Access Token? Revoke It and Audit Apps

> Fly.io token exposed on GitHub? List and revoke it with flyctl or the dashboard, review apps, machines and secrets, then rotate. Step-by-step.

Source: https://leakwatch.net/secrets/flyio-access-token

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Fly.io Access Token

Cloud · Secret guide

# Leaked Fly.io Access Token: what to do in the first hour

Critical severityDetected onlyLast verified October 19, 2026 · 4 min read

A [Fly.io](http://Fly.io) access token authenticates the `flyctl` command line and the Fly API. Depending on how it was issued, it can be limited to one app or cover a whole organization. With a broad token, an attacker can deploy images, start and stop machines, open SSH sessions to them, read and set app secrets, and attach volumes. Revoke the token first, then work out how far it reached.

[Check your GitHub account for leaked secrets — free](/)

Provider

Fly.io

Severity

Critical

Impact

Cloud infrastructure access

Checked live by LeakWatch

No

## What a Fly.io access token looks like

[Fly.io](http://Fly.io) tokens come in several shapes, all recognisable by a prefix:

```text
fo1_…XXXX    organization token, classic (masked, 43 characters after the prefix)
fm1a_…XXXX   macaroon access token (masked, long base64 string)
fm1r_…XXXX   macaroon refresh token (masked, long base64 string)
fm2_…XXXX    macaroon token, newer generation (masked, long base64 string)
```

The `fo1_` form has a fixed length. The `fm` forms are macaroons: signed tokens that carry the permissions attached to them, encoded in base64, so they are much longer, often more than a hundred characters, and may end with one or more `=` signs. A variable called `FLY_API_TOKEN` is the usual home of either. Do not confuse them with the application secrets you set with `fly secrets`, which are your own values and have no fixed format.

## How Fly access tokens get leaked

-   **CI pipelines.** `FLY_API_TOKEN` hardcoded in a workflow file rather than stored as a secret.
-   **Environment files.** A `.env` file or a Dockerfile `ENV` line that bakes the token into an image.
-   **Config files.** A copy of the `flyctl` configuration file from a home directory, committed with a dotfiles repository.
-   **Logs.** A deploy log or `fly auth token` output pasted into a bug report or a forum post.
-   **Macaroon length.** A very long token is easy to paste into a ticket or a screenshot without noticing what it is.

## What to do in the first hour

1.  **List your tokens.** Use `fly tokens list` from the command line, or open the tokens section of the Fly dashboard. Match the name, scope and creation date against what leaked.
2.  **Create a narrower replacement.** For a deployment pipeline, a token limited to a single app is a better fit than an organization token. Store it in your CI secret store.
3.  **Deploy the new token** and confirm that a release still works.
4.  **Revoke the exposed token** from the dashboard or with the `fly tokens revoke` command and the ID shown in the list. Requests with a revoked token are rejected.
5.  **Review activity.** List the apps, machines and images of the organization, and look for machines you did not create, unexpected regions, new volumes, changed IP addresses and new certificates.
6.  **Rotate app secrets.** If the token could read or set secrets, rotate the database passwords and third-party keys stored in them at their own provider.
7.  **Check the rest of the repository.** See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked from the same repository? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at Fly.io

Fly tokens are managed from the tokens section of the dashboard and from the `fly tokens` command group in `flyctl`. Sign in with an account that has access to the organization, find the exposed token and revoke it. For a token created by a deploy command, check the names listed to identify it. Fly documents the available token types and how to scope them. The dashboard and command names can change, so if what you see differs from this guide, look for the place where tokens are listed.

## How LeakWatch detects it

The rule is called [Fly.io](http://Fly.io) Access Token. It recognises three families by prefix and length: `fo1_` followed by exactly 43 characters, and the `fm1a_`, `fm1r_` and `fm2_` macaroon forms with at least 100 base64 characters and optional `=` padding. A prefix with the wrong length is not reported. The severity is **critical**, since a broad token controls running infrastructure. **This type is not checked live**: LeakWatch does not test the value against [Fly.io](http://Fly.io), so a finding means the string was seen, not that it still works.

LeakWatch detects this format but does **not** check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

## FAQ

Can someone open a shell on my machines with this token?

With a token scoped to the organization or to the app, yes, the Fly API allows it. Review your machines and revoke the token; also rotate any secret that was available inside them.

Why are some of the tokens so long?

Macaroon tokens embed the permissions they grant, signed and base64 encoded. The length is not a sign of strength you can rely on once the string is public.

Should a CI token have organization scope?

Preferably not. A token limited to one app limits what a leak can do. Use the narrowest scope that lets the pipeline deploy.

## Related

-   [DigitalOcean API Token](/secrets/digitalocean-token)
-   [Docker Hub Access Token](/secrets/docker-hub-access-token)
-   [Database Connection String](/secrets/database-connection-string)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with Fly.io.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
