LinuxmacOS

Where Does Flox Store Environments and Config?

Flox keeps project envs in .flox folders, global config in ~/.config/flox, and data under ~/.local/share/flox on Linux and Mac.

Last updated

Flox stores environments where they are used and global state where XDG says to. Each project gets a .flox folder with its manifest and lock. Your home folder gets the CLI config, data, cache, and state in their standard spots.

The .flox folder is meant for version control, unlike most tools state folders. Commit the manifest and lock so teammates reproduce the same build. Keep secrets out of the manifest and use environment variables instead.

Where Flox stores this, by platform

Linux
<project>/.flox

Per-project environment: env/manifest.toml plus env.json and lock. Commit this folder. Cached FloxHub copies live under the data dir instead.

Linux
~/.config/flox/flox.toml

CLI settings. Rarely edited by hand since most behavior comes from the manifest and env vars.

macOS
~/.local/share/flox

Persistent Flox data including FloxHub metadata. Same XDG layout on macOS.

Frequently asked questions

What Flox files belong in git?

Commit the whole .flox directory including env/manifest.toml and the lock. That reproduces the environment elsewhere. Local caches inside it can stay untracked, the manifest and lock are what matter.

Where is the Flox CLI config?

Open ~/.config/flox/flox.toml. System defaults live in /etc/flox.toml. Environment variables prefixed FLOX_ override both.

Where are pulled FloxHub environments cached?

FloxHub keeps the upstream copy. Locally, pulled environments cache under the data dir. Run flox pull again to refresh the cached copy.

Notice an outdated path? Let us know.