---
title: "Netlify CLI tokens now stored in your system’s secure keychain"
description: "Starting in v27.18.0, Netlify CLI stores authentication tokens encrypted at rest in your OS keychain across macOS, Windows, and Linux instead of on disk."
source: "https://www.netlify.com/changelog/2026-11-17-netlify-cli-keychain-storage/"
last_updated: "2026-11-17T15:40:55.000Z"
---
Starting in version 27.18.0, Netlify CLI stores authentication tokens encrypted at rest in your operating system’s native secure keychain rather than in plain text on disk. This update protects your account credentials across macOS, Windows, and supported Linux distributions.

Previously, Netlify CLI saved login tokens in plain text in a local configuration file (such as `~/Library/Preferences/netlify/config.json` on macOS). Because these tokens grant full access to manage your Netlify account and projects, plain text storage left them exposed to any malicious script or local process with disk read access. Storing tokens directly in your device’s secure credential store mitigates that risk and limits the blast radius of local machine breaches or prompt injection attacks.

## How it works

Netlify CLI now integrates directly with platform-native credential managers:

-   **macOS**: Keychain
-   **Windows**: Windows Credential Manager
-   **Linux**: Secret Service API (standard on GNOME and KDE, and configurable elsewhere)

When you run `netlify login`, new tokens are automatically saved to the OS keychain. Depending on your system settings, your device may occasionally ask for biometric authorization (such as Touch ID or fingerprint) or your password when the CLI accesses your credentials.

## Migrating your token

![Netlify CLI prompting to migrate an authentication token to the system keychain](/images/changelog/netlify-cli-keychain-migration.png)

When an existing plain text token is detected during an interactive command, Netlify CLI prompts you to migrate to keychain storage. Approving the prompt initiates a login refresh, saves your token securely to the keychain, and removes the legacy plain text file entry. If you decline, your choice is remembered so you aren’t nagged again. You can also trigger the migration at any time by running `netlify login --new`.

If keychain storage is unavailable on your system or writes fail, Netlify CLI automatically falls back to plain text storage. To verify where your active token is stored, run `netlify status`. You can also set `NETLIFY_USE_LEGACY_AUTH_STORAGE=1` to disable keychain storage if required in your environment.

## What you need to do

To update your Netlify CLI to the latest version, run:

```
npm install -g netlify-cli@latest
```

The next time you run an interactive command requiring authentication, press Enter at the prompt to migrate your token to your system’s keychain, or run `netlify login --new` to migrate immediately.

When updating, keep the following in mind:

-   **Multiple global CLI installs**: If you have multiple global installs of Netlify CLI across different Node managers (such as `nvm`, `pnpm`, or Homebrew), update all of them so an older version doesn’t revert your credentials back to plain text storage.
-   **Local Netlify MCP**: If you use the local Netlify Model Context Protocol (MCP) server, ensure you have `@netlify/mcp` version 1.22.1 or later to support keychain-stored credentials.

Learn more about managing your credentials in the [Netlify CLI documentation](https://docs.netlify.com/cli/get-started/) or view the changes in the [Netlify CLI repository](https://github.com/netlify/cli).