Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can make Claude Code behave consistently on several Macs by using Syncthing to share a short, deliberately chosen list of user-level files, while installing and logging in to Claude Code separately on each machine. Syncthing should carry your personal preferences, not your whole ~/.claude folder. Project instructions belong in each repository under version control, and credentials, session history and machine-specific values should stay local.

Decide what is actually shared

Claude Code reads configuration from several scopes, and they do not behave the same way. Anthropic’s memory documentation describes ~/.claude/CLAUDE.md as user memory for personal preferences across projects, and ./CLAUDE.md as project memory that teams share. Memory files load at startup, and Claude Code searches upward from the working directory for instruction files. The settings documentation describes three settings files: ~/.claude/settings.json for user settings, .claude/settings.json for shared project settings, and .claude/settings.local.json for project-local settings.

That split determines what Syncthing should handle. A personal setup that should follow you between Macs is a user-level concern. A project’s shared defaults are a repository concern. A local override is a deliberate per-machine difference. Mixing these together is the most common reason synced configuration produces surprises.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which files to sync and which to leave alone

Configuration item Where it lives Who it applies to Sync with Syncthing?
User memory ~/.claude/CLAUDE.md You, across all projects Yes. This is the main candidate.
User settings ~/.claude/settings.json You, across all projects Yes, after you check it for tokens and Mac-specific paths.
Project memory ./CLAUDE.md in each repository Everyone working on the project No. Commit it to the repository.
Shared project settings .claude/settings.json in each repository Everyone working on the project No. Commit it to the repository.
Local project overrides .claude/settings.local.json One machine, one project No. Let it differ on purpose.
Project MCP servers .mcp.json in the repository Everyone working on the project Use version control, not Syncthing. Supply secrets per machine.
User-scoped MCP servers User-level MCP configuration You, across all projects Review first. Definitions often hold machine-specific paths or credentials.
Credentials and session history Managed by Claude Code on each machine One machine No. Anthropic’s documentation does not describe syncing these as a supported method.

How precedence affects what you see on each Mac

Anthropic’s IAM documentation gives a precedence order in which project-local settings override shared project settings and user settings, and all of them remain subject to higher-level policy and command-line inputs. Synced user settings therefore do not guarantee identical behavior. If a project’s local file or an organization policy sets a value, the synced file will lose that contest on one or both Macs. When a setting behaves differently between machines, check which file defines it before you edit anything.

Step 1: Set up Claude Code on each Mac separately

Anthropic’s setup documentation lists macOS 10.15 or later among supported systems. Install and log in on each Mac on its own. Claude Code stores credentials securely on the machine, and the setup documentation points to a separate credential-management reference. Do not copy one Mac’s authentication state to another.

  1. On each Mac, install Claude Code by following the current setup instructions in Anthropic’s documentation.
  2. Run claude in a terminal and complete the login flow on that Mac.
  3. Confirm that Claude Code starts and responds in each Mac’s own session before you add any synced files.

Step 2: Set up Syncthing with a dedicated folder

Syncthing refers to each participating computer as a device. Both Macs need Syncthing running and paired, and the shared folder must be accepted on both sides. Keep the folder small and dedicated to Claude configuration so that it cannot pick up session data or project files by accident.

  1. Install Syncthing on both Macs and open its web interface on each one. By default, this interface is available only on the Mac itself, at port 8384 of the local address.
  2. On the first Mac, add the second Mac as a remote device by exchanging device IDs. Confirm the pairing on both sides.
  3. On the first Mac, add a folder such as ~/Sync/claude-user-config. In the folder’s sharing settings, select the second Mac.
  4. On the second Mac, accept the shared folder and choose a local path for it, such as ~/Sync/claude-user-config.
  5. Before copying anything, open ~/.claude/settings.json and remove any API keys, tokens or machine-specific paths. Move those values into environment variables or the machine’s credential store instead.
  6. On the first Mac, copy only the files you have chosen into the synced folder:
mkdir -p ~/Sync/claude-user-config
cp ~/.claude/CLAUDE.md ~/.claude/settings.json ~/Sync/claude-user-config/

Wait until Syncthing reports the folder as up to date on both Macs, and confirm that both files appear on the second Mac.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 3: Point each Mac’s Claude folder at the synced copies

Once the files are in the synced folder, replace the local copies in ~/.claude with links. Back up the originals first. Run the following on each Mac, and change the file names if you chose different ones:

mv ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak
ln -s ~/Sync/claude-user-config/CLAUDE.md ~/.claude/CLAUDE.md
mv ~/.claude/settings.json ~/.claude/settings.json.bak
ln -s ~/Sync/claude-user-config/settings.json ~/.claude/settings.json

Syncthing’s own documentation explains how it handles symbolic links. Read that section before you rely on this layout, because the link behavior determines whether the files stay in step. If you prefer to avoid links, you can instead copy the files manually after each change, which is simpler but easy to forget.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Step 4: Edit on one Mac at a time

Make changes on one Mac, wait for Syncthing to report the folder as up to date, and then check the result on the other Mac. Do not edit the same file on both Macs at the same time. Syncthing’s documentation describes how it handles conflicting edits, and you should understand that behavior before you depend on it.

Keeping secrets out of the shared setup

Anthropic’s MCP documentation supports environment-variable expansion in configuration files, which lets you keep sensitive and machine-specific values out of a shared file. In a project’s .mcp.json, you can refer to a variable instead of pasting a key:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
"Authorization": "Bearer ${API_TOKEN}"

Set API_TOKEN separately on each Mac, for example in your shell profile or another local mechanism, so that the value never enters the repository or the synced folder. Do not put real API keys into any file that Syncthing shares.

Verify the setup on both Macs

  • Run ls -l ~/.claude/ on each Mac and confirm that the synced files show as links pointing into ~/Sync/claude-user-config.
  • Open Syncthing on each Mac and confirm that both devices are connected and the folder shows as up to date.
  • Start a new Claude Code session inside a project and confirm that an instruction from your user memory file takes effect.
  • Confirm that a project-local file still differs on each Mac where you intended it to.
  • Confirm that each Mac still requires its own login, and that no credentials appear in the synced folder.

Troubleshooting

  • A file does not arrive on the second Mac. Check that both devices are paired and connected, that the folder is shared on both sides, and that you accepted the folder on the second Mac.
  • A change appears on one Mac only. Confirm that the file in ~/.claude is still a link. If you replaced it with a copy, the link no longer updates.
  • Claude Code behaves differently on one Mac. A project-local file, a shared project setting or a policy may be overriding your user setting. Check the precedence order before changing the synced file.
  • Claude Code asks you to log in on a new Mac. This is expected. Authentication is set up per machine.

Use this approach only for the narrow set of files described above. A synced folder that includes session history, credentials or project files is outside what the cited documentation supports, and it is the setup most likely to cause problems later.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.