How to Authenticate Wrangler on a Remote SSH Server Without a Browser
2025-3-13
| 2025-3-13
0  |  阅读时长 0 分钟
type
status
date
slug
summary
tags
category
icon
password
When using Cloudflare Wrangler on a remote SSH server, wrangler login attempts to open a browser for authentication, which can fail in headless or remote environments. Here’s how to log in without requiring a browser.
You will get something like this.

Solve it Using API Token Authentication

Instead of wrangler login, authenticate using an API token.

Step 1: Generate an API Token

  1. Go to Cloudflare API Tokens.
  1. Click Create Token.
  1. Use the Edit Cloudflare Workers template or create a custom token with:
      • Account Settings: Read
      • Workers Scripts: Edit
  1. Click Create Token and copy it.

Step 2: Configure Wrangler with API Token

On your remote SSH server, run:
Now, verify authentication:
 
  • linux
  • 开发
  • cloudflare
  • worker
  • 从零开始实现debounceVariable declarations and immutables.
    Loading...