# Sign in to a tool from a workstation

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> Run a tool's sign-in command in a workstation, and its sign-in page opens in your browser.


Run a tool's sign-in command in a workstation, and its sign-in page opens in your browser. A
workstation has no browser, so without this setup the tool can't open its sign-in page. You
set it up once, then approve each link on your computer. The examples use Claude Code
(`claude`) and the GitHub CLI (`gh auth login`), but they are only examples: the steps are
the same for any tool that needs a browser sign-in.

## Prerequisites

- [Install Ringleader](https://docs-stg.ringleader.dev/install/), with the Ringleader application running.
- A running workstation on your computer, in the namespace `local`. The examples use a
  workstation named `my-box`; replace it with yours. To create one, follow the
  [Quickstart](https://docs-stg.ringleader.dev/quickstart/) and use your own name.
- A label on that workstation that selects it. The examples use `tier: dev`. To add it, run
  `rl workstation label my-box tier=dev -n local`.
- A tool in the workstation that signs in with a browser. The examples use Claude Code, added
  by the `claude-code` devtool in the file below. That is one example. To install another
  tool, declare its devtool, as [Devtools and tool configuration](https://docs-stg.ringleader.dev/workstations/packages-tools-settings/devtools-tool-configuration/)
  describes. For a coding agent, [Coding agent setup](https://docs-stg.ringleader.dev/workstations/coding-agents/coding-agent-setup/)
  has a table of how to sign in to each agent.

## Ask before your computer opens a link

Set your computer to ask before it opens a link from a workstation. The setting stays on your
computer and covers every workstation:

```bash
rl urlopenrules default queue
```

## Add browser sign-in to new workstations

Every workstation already has the `passthrough-www-browser` devtool, which hands a sign-in
link to Ringleader. The workstation also needs the tool, and your computer needs a LocalBinding
that forwards links. A `defaultLocalBinding` in a WorkstationConfig creates the LocalBinding.

1. Save this file as `browser-sign-in.yaml`. Change `tier: dev` to your label:

   ```yaml
   apiVersion: workstations.ringleader.dev/v1
   kind: WorkstationConfig
   metadata:
     name: browser-sign-in
     namespace: local
   spec:
     selector:
       matchLabels:
         tier: dev
     devtools:
       - name: claude-code               # an example tool: replace it with yours
     defaultLocalBinding:
       enabled: true
       autoForward:
         forwardAll: true
       urlForward:
         enabled: true
   ```

2. Run `rl apply -f browser-sign-in.yaml`. Ringleader then creates the LocalBinding, once, for
   each `Running` workstation this file selects.

If your workstations already have a configuration, add the `defaultLocalBinding` to it
instead.

## Sign in from a workstation

Start the tool's sign-in in the workstation, then approve its link on your computer.

1. Open a shell on the workstation with `rl shell my-box -n local`, and start the
   tool's sign-in. For example, run `claude`, or run `gh auth login`. For another tool, run
   its own sign-in command.
2. On your computer, in a second terminal, list the links that wait for you:

   ```bash
   rl urlopenrules history --pending
   ```

3. Approve the sign-in link by its ID, within 10 minutes of its arrival:

   ```bash
   rl urlopenrules approve <id>
   ```

   Your computer then opens the link in your browser.
4. Sign in on the page that opens. The tool in the workstation finishes the sign-in.

<div class="callout callout-tip">
  <p class="callout-title">Claude Code&rsquo;s own sign-in link</p>
  <div class="callout-body">
    Claude Code also shows a sign-in link in its own window. If you open that link, the sign-in
page gives you a code, and you paste the code where Claude Code asks for it.
  </div>
</div>


## Add browser sign-in to an existing workstation

Use this for a workstation that already has a LocalBinding from a template. It keeps that
LocalBinding, so a template you add later changes nothing for it. Turn on URL forwarding for
the workstation with a LocalBinding of your own.

1. If the workstation doesn't have the tool yet, run `rl apply -f browser-sign-in.yaml` with
   the file from
   [Add browser sign-in to new workstations](#add-browser-sign-in-to-new-workstations).
2. Save this file as `browser-sign-in-binding.yaml`. Change `my-box` to your
   workstation's name:

   ```yaml
   apiVersion: core.ringleader.dev/v1
   kind: LocalBinding
   metadata:
     name: browser-sign-in
     namespace: local
   spec:
     enabled: true
     workstationSelector:
       matchName: my-box
     autoForward:
       forwardAll: true
     urlForward:
       enabled: true
   ```

3. Run `rl apply -f browser-sign-in-binding.yaml`. Links from that workstation then reach
   your computer.

To turn it off again, run `rl binding disable browser-sign-in -n local`.

## Troubleshoot

- If the configuration created no LocalBinding, the workstation may be shared or bound to a
  node.
  [Default forwards from a workstation's configuration](https://docs-stg.ringleader.dev/workstations/connectivity/port-socket-forwarding/#default-forwards-from-a-workstations-configuration)
  explains. If the workstation already had a LocalBinding from a template, follow
  [Add browser sign-in to an existing workstation](#add-browser-sign-in-to-an-existing-workstation).
- If no link opens in your browser, the workstation may have no LocalBinding with
  `urlForward`. Without it, your computer doesn't read the link, as
  [Link handling](https://docs-stg.ringleader.dev/workstations/connectivity/browser-sign-in/#link-handling)
  explains.
- If the link is no longer in `rl urlopenrules history --pending`, it waited more than 10
  minutes and expired. Start the sign-in in the workstation again to get a new link.

## Next steps

- [Browser sign-in](https://docs-stg.ringleader.dev/workstations/connectivity/browser-sign-in/) explains what
  happens to a link, and how your computer decides whether to open it.
- [URL open rules](https://docs-stg.ringleader.dev/reference/cli/commands/url-open-rules/) lists the `rl urlopenrules` commands
  and their flags.
- [MCP servers for coding agents](https://docs-stg.ringleader.dev/workstations/coding-agents/mcp-servers/)
  declares an MCP server for your coding agents.

