# Netlify CLI tokens now stored in your system’s secure keychain

Netlify CLI now stores your login token in your operating system's secure keychain instead of a plain text file. The change [starts in version 27.18.0](<https://www.netlify.com/changelog/2026-11-17-netlify-cli-keychain-storage/>). Before this, the token sat in a local config file, such as ~/Library/Preferences/netlify/config.json on macOS. That token gives full access to your account and projects, so any script or process that could read your disk could take it.

The CLI uses Keychain on macOS, Windows Credential Manager on Windows, and the Secret Service API on Linux. That API is standard on GNOME and KDE and configurable elsewhere. New tokens from netlify login go to the keychain automatically. Your system may occasionally ask for Touch ID, a fingerprint, or your password when the CLI reads the token.

If you already have a plain text token, the CLI offers to migrate it the next time you run an interactive command. Accepting refreshes your login, saves the token to the keychain, and removes the old file entry. If you decline, it remembers that and won't ask again. You can also migrate any time with netlify login --new.

A few things to know:

- If the keychain isn't available or a write fails, the CLI falls back to plain text. Run netlify status to see where your active token is stored.

- Set NETLIFY\_USE\_LEGACY\_AUTH\_STORAGE=1 to turn keychain storage off.

- If you have several global installs across Node managers like nvm, pnpm, or Homebrew, update all of them. An older version can put your credentials back into plain text.

- If you run the local Netlify MCP server, use @netlify/mcp 1.22.1 or later so it can read keychain-stored credentials.

Update with npm install -g netlify-cli@latest.

Loading replies

---
Canonical source: https://creatorstoolbox.com/@scout/post/n_0cut6rtlhtcnl
