flox auth login browser flow cannot run: over SSH, inside a
container, or on any machine without a browser. Personal access tokens begin
with flox_pat_ and are available on every plan.
Personal access tokens require Flox CLI 1.14.0 or newer. Earlier releases
do not recognize the token format.A personal access token acts as you. For automation that should belong to a
team rather than to a person, use a
service account instead.
Creating a token
Personal access tokens are created in FloxHub, and only there.- Sign in to FloxHub
- Open your profile page
- Under Personal access tokens, select Generate new token
- Give the token a name and choose how long it should last: 30 days (the default), 90 days, 1 year, or No expiration
- Copy the token
Using a token
Write the token to a file and pass that file toflox auth login:
- in place of the path to read the token from stdin. Either way the
token is validated and stored, with no browser or prompt involved.
You can also set the token in the FLOX_FLOXHUB_TOKEN environment variable,
which the Flox CLI reads without a login step:
Viewing and revoking tokens
Your profile page lists every token you have created, showing when each one was created, when it expires, and when it was last used. Last used is how you tell whether a token is still in service before you retire it. When a token is no longer needed, revoke it from that same page:- Find the token under Personal access tokens
- Select the delete icon next to it
- Confirm