Linux

Where Does flyctl Store Config and State?

flyctl .fly directory in home with config.yml, tokens and WireGuard state on Linux.

Last updated

The Fly.io flyctl CLI keeps auth tokens, organization context and WireGuard peer state in a .fly directory in your home folder. Apps themselves deploy from project fly.toml files kept in repos.

Tokens grant account access, so the directory needs strict permissions. Copy it to move login state, then re-authenticate if the API rejects stale tokens.

Where flyctl stores this, by platform

Linux
~/.fly/config.yml

Main config with tokens and default org beside state files in ~/.fly. Project wiring lives in each repo's fly.toml instead. Copy the .fly folder to migrate login; rotate tokens after any exposure.

Frequently asked questions

How do I switch Fly.io organizations?

Set the default org in the config above or pass flags per command. Auth tokens stay shared across orgs you can access.

flyctl lost login after moving homes. Why?

The .fly directory above did not travel with you. Copy it over or run flyctl auth login fresh.

Notice an outdated path? Let us know.