NEWn1n v2.0.1 is live! Enterprise Unified LLM API Gateway with 500+ AI Models, up to 90% off, Try now

How to Share Claude Code Accounts Across Multiple Development Machines

Authors
  • avatar
    Name
    Nino
    Occupation
    Senior Tech Editor

Working across multiple development machines—such as a primary laptop, a home desktop, and a Windows testing rig—introduces a frustrating maintenance routine for AI-assisted engineers. If you rely heavily on CLI-based developer tools, you are likely familiar with the dreaded prompt to re-authenticate when an idle session expires. When managing multiple accounts across two or three computers, this cycle of manual re-authentication can disrupt your development flow weekly.

To solve this, developers can leverage ccdeck, an open-source local dashboard designed for Claude Code and Codex CLI. By integrating a companion tool called claude-swap, ccdeck allows you to manage multiple credentials, migrate them instantly using a base64-encoded share string, and establish automated peer-to-peer syncing across a local network or via a Tailscale tailnet.

Before diving in, it is worth noting a foundational rule: this setup is strictly meant for managing your own multiple accounts across your own hardware. It is not designed for circumventing usage tiers or sharing a single subscription with other users.

Getting Started with ccdeck and Multi-Account Management

ccdeck operates locally on your machine, opening a web dashboard at http://127.0.0.1:4317 when you execute npx ccdeck in your terminal. This interface provides a live visualization of active sessions, subagents, tool executions, token consumption costs, and remaining quotas.

To manage your authentication tokens, you interact with the Claude accounts panel:

  1. Launch the dashboard by running npx ccdeck.
  2. Press A on your keyboard or click the Claude accounts icon located on the left navigation stripe.
  3. Click the + button, select Open the sign-in page, and complete the authentication flow in your browser for the target account.

When you sign in normally, the system updates your live credentials. If you are adding a secondary profile, the dashboard safely preserves your previous context and lets you switch instantly.

Each account row displays real-time 5-hour and 7-day usage meters. For advanced orchestration, you can enable Auto-switch, which monitors your active token utilization against customizable thresholds (ranging from 50% to 99%) and seamlessly migrates your agentic workloads to a fresh account once limits are approached, provided an eligible backup exists.

Pro Tip for macOS Users: On macOS, Claude Code stores your login credentials inside the system Keychain. Always execute npx ccdeck from an active Terminal window or configure it as a login item rather than running it over a remote SSH session. Otherwise, claude-swap will fail to read the keychain, resulting in a "Keychain unreadable" status across your dashboard rows.

Migrating Credentials Instantly via Secure Share Strings

When setting up a brand-new development environment, manually logging into every single developer profile is tedious. Instead, you can transfer your entire account pool in a single paste operation.

On the source machine that already contains your authenticated profiles:

  1. Open the accounts panel within ccdeck.
  2. Click the share icon (↗) located in the header.
  3. Review the list of accounts (all are ticked by default; untick any profile you wish to keep local).
  4. Click Share N accounts to copy the encoded string to your clipboard.

On the destination machine:

  1. Open the accounts panel, click +, and select Paste a share.
  2. Paste your string and click Import.

The system evaluates each token, returning an informative status line:

  • imported: The machine successfully acquired a new profile.
  • already here: The target profile already existed and remains untouched.
  • dead token replaced: An expired local login was automatically healed by the incoming valid share.

Security Warning: The share string is simply a compressed, base64-encoded export generated by claude-swap. It is not cryptographically encrypted. Anyone who intercepts this string can utilize those accounts. While the dashboard blocks imports older than ten minutes, tokens inside remain technically valid. Always transmit this data through secure channels you trust, and immediately revoke compromised logins via Anthropic if a leak occurs. For robust enterprise-grade secret management and high-speed LLM routing, developers often rely on aggregators like n1n.ai to handle API keys securely.

Automating Multi-Machine Syncing via Local Networks

While manual sharing handles initial provisioning, the ultimate cure for recurring login expiration is local network pairing.

At the bottom of the accounts panel, toggle the Local network switch. Once active, running instances of ccdeck on the same subnet broadcast their presence every 30 seconds via UDP port 45317, listening for peer instances on designated TCP ports. If a login expires on your laptop, a paired desktop machine that still holds a valid copy will automatically propagate it.

To configure sharing permissions securely:

  1. Click the sliders icon inside the Local network view.
  2. Under Share these accounts, explicitly tick the profiles this specific machine is allowed to export to peers.

Handling Network Boundaries and Remote Access

If you operate across complex network topologies, standard UDP broadcasts will not cross subnets, guest networks, or strict VPN boundaries. You have two alternatives to resolve this:

  • Manual Invites: Click the chain-link button to open the Add a deck menu, generate an invite string on one machine, and paste it into the other. Invites expire after ten minutes.
  • Tailscale Integration: If you utilize a private tailnet, toggle the Look for my devices switch within the network dialog. This automatically discovers ccdeck instances across your authenticated tailnet without manual IP entry.

When integrating various LLM workflows and managing multi-region endpoints, maintaining high availability is critical. Platforms like n1n.ai provide robust API infrastructure that complements local development setups by ensuring low-latency routing and enterprise-grade reliability for all your model calls.

Summary Checklist for a Frictionless Setup

To completely eliminate maintenance overhead across your development fleet, follow this streamlined checklist:

  1. Execute npx ccdeck on your primary workstation.
  2. Import your historical accounts or generate a share string to provision secondary devices instantly.
  3. Enable Local network pairing on all participating machines and authorize specific export tokens.

By unifying your account architecture, you can focus entirely on writing code rather than managing credentials. For developers seeking reliable, lightning-fast API integrations alongside their CLI workflows, explore the advanced routing capabilities available at n1n.ai.

Get a free API key at n1n.ai