Skip to content

Cloudflare login

Use layer login to save Cloudflare credentials for local direct deploys. Automatic mode uses a Cloudflare boot token to create a managed deploy token. The boot token and managed deploy token names share the same suffix in Cloudflare.

Manual mode saves the token that you provide. The token needs every permission listed in the Cloudflare template URL. Storage R2 signed URL credential maintenance also needs an R2 token-management token passed with --r2-token or CLOUDFLARE_R2_API_TOKEN.

Terminal window
layer login [status] [options]
OptionValueNotes
--account-id<id>Cloudflare account id.
--token<token>Cloudflare account API token.
--mode<mode>automatic or manual.
--boot-token<token>One-time Cloudflare token with Account API Tokens Read/Edit.
-h, --helpShow help.

Automatic mode prompts for a Cloudflare boot token with Account API Tokens Read/Edit. Layeron creates a managed deploy token with direct deploy permissions. Both token names include the same generated suffix so you can match them in Cloudflare.

Manual mode uses the direct deploy template URL. The manual deploy token does not include Account API Tokens permissions. Pass --r2-token or set CLOUDFLARE_R2_API_TOKEN when Storage needs to create, rotate, read, or retire Layeron-managed R2 tokens for signed URLs.

Terminal window
layer logout [options]
OptionValueNotes
--oauthUse the Cloudflare OAuth logout flow.
-h, --helpShow help.