Logo vun Syncthing Setup

Syncthing Setup

Communautéit
adityahimaone
syncthing-setup

Install and configure Syncthing for folder sync between macOS and Android devices. Covers brew install, service setup, web UI automation for folder creation, device ID extraction, and cross-device pairing instructions. Use when user needs to sync folders between Mac and phone/tablet.

Iwwersiicht

Editeuradityahimaone
Repositoryhermes-agent-rtk-caveman
Skill-Nummsyncthing-setup
Stären
84
Forks
4
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum adityahimaone op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Syncthing Setup an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/adityahimaone/hermes-agent-rtk-caveman/tree/main/skills/devops/syncthing-setup
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adityahimaone/hermes-agent-rtk-caveman.git /tmp/hermes-agent-rtk-caveman
mkdir -p .claude/skills
cp -r /tmp/hermes-agent-rtk-caveman/skills/devops/syncthing-setup .claude/skills/syncthing-setup
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Syncthing Setup an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Syncthing Setup automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Syncthing Setup net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Syncthing Setup

Install and configure Syncthing to sync folders between macOS and Android devices. Common use case: syncing Obsidian vaults.

When to Use

  • User wants to sync a folder from Mac to Android (or vice versa)
  • Setting up Obsidian vault sync between devices
  • Need real-time, encrypted, no-cloud file sync
  • User asks "how to sync files between Mac and phone"

Installation

bash
brew install syncthing
brew services start syncthing
sleep 4
# Verify running:
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8384
# Should return 200

Web UI Access

Open http://127.0.0.1:8384 and use browser tools to interact. The REST API has CSRF protection, so browser automation is more reliable than curl-based API calls.

Device ID Extraction

bash
curl -s http://127.0.0.1:8384/rest/system/status 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin).get('myID',''))"

This returns the full Device ID like: TIST2PB-54H2NQC-KHI5B3G-5OLLMZM-IGU7LC2-ARRMEIA-46VI6ST-AZFCPAJ

Adding a Folder via Browser Automation

  1. Navigate to http://127.0.0.1:8384
  2. Dismiss setup dialogs (click through: Yes for usage reporting, OK for crash reporting, OK for auth warnings)
  3. Click "Add Folder" button
  4. In the modal:
    • Set Folder Label (e.g., "CPNS-2026")
    • Set Folder ID (e.g., "cpns-2026") — must match on all devices
    • Set Folder Path (e.g., /Users/adityahimawan/Documents/Obsidian/CPNS-2026)
  5. Click "Save"

Adding a Remote Device

  1. Click "Add Remote Device" in the Devices section
  2. Enter the remote device's full Device ID (from their Syncthing app)
  3. Give it a friendly name (e.g., "Adit's Android")
  4. Click "Save"

Folder Sharing Setup

After devices are paired:

  1. Click on the shared folder in the Folders section
  2. Go to the "Sharing" tab
  3. Check the remote device
  4. Click "Save"

Android Setup Instructions (tell the user)

  1. Install Syncthing from Play Store (or Syncthing-Fork from F-Droid)
  2. Open app → accept TOS
  3. Note the Device ID (menu → ID & Alamat Jarak Jauh)
  4. Exchange Device IDs between Mac and Android
  5. Accept folder share on Android and set sync path to: /storage/emulated/0/Documents/Obsidian/CPNS-2026

Obsidian Android Setup

  1. Open Obsidian Android → "Open folder as vault"
  2. Navigate to the Syncthing sync folder
  3. Notes will auto-sync both directions

Multi-Vault Configuration

When syncing multiple folders (e.g., CPNS-2026 + Notes vaults), you need one <folder> element per vault in config.xml. Each folder must have:

  • Unique id attribute
  • Correct path attribute
  • A <device> child with the paired device ID

Example config structure (2 folders):

xml
<folder id="cpns-2026" label="CPNS-2026" path="/Users/adityahimawan/Documents/Obsidian/CPNS-2026" ...>
  <device id="DEVICE_ID" introducedBy=""><encryptionPassword /></device>
  ...
</folder>
<folder id="notes" label="Notes" path="/Users/adityahimawan/Documents/Obsidian/Notes" ...>
  <device id="DEVICE_ID" introducedBy=""><encryptionPassword /></device>
  ...
</folder>

Config Editing Patterns

ALWAYS backup before editing:

bash
cp ~/Library/Application\ Support/Syncthing/config.xml ~/Library/Application\ Support/Syncthing/config.xml.bak

Safe Python XML edit pattern (avoid list.remove errors):

python
import xml.etree.ElementTree as ET
tree = ET.parse(config_path)
root = tree.getroot()
# Use list() to make a copy before iterating
for la in list(options.findall('listenAddress')):
    options.remove(la)
# Then add new elements

Quick text fix (when XML editing is overkill):

bash
# Stop first
brew services stop syncthing

# Then use patch or sed
# After edit, restart
brew services start syncthing

# Verify
lsof -i :22000
lsof -i :8384
grep -c "tcp://default" config.xml  # Should be 0

Renaming a Vault

When renaming a vault folder on macOS:

  1. Rename the folder on disk: mv OldName NewName
  2. Stop syncthing: brew services stop syncthing
  3. Update config.xml path and label attributes to match
  4. Also update folder id if you want consistency
  5. Restart syncthing: brew services start syncthing
  6. On Android: delete old folder entry in Syncthing app, add new one with matching folder ID

The folder ID must match between Mac and Android — if you change it on one side, the other side will reject the sync.

Troubleshooting

ProblemFix
Devices "Disconnected (Inactive)" — CRITICAL BUGCheck if port 22000 is listening: lsof -i :22000. If empty, config has <listenAddress>tcp://default</listenAddress> which means "resolve hostname 'default'" — not a keyword! Fix: Stop syncthing → edit config.xml → replace <listenAddress>tcp://default</listenAddress> with <listenAddress>tcp://0.0.0.0:22000</listenAddress> AND add <listenAddress>quic://0.0.0.0:22000</listenAddress> → restart syncthing. Also check <defaults><device> section for stale <listenAddress> entries and remove them.
CSRF errors on API callsUse browser automation instead of curl/API
Devices not discovering each otherMake sure both are on same WiFi or enable global discovery
Folder not syncingCheck folder is shared with the device in both directions
Permission denied on AndroidGrant "All files access" or specific folder permission to Syncthing app
Syncthing service won't startCheck brew services list, try brew services restart syncthing
Log shows "lookup default: no such host"This confirms the tcp://default hostname resolution bug — see fix above
Port 22000 not listening after restartCheck for ALL <listenAddress> elements in config.xml (both <options> AND <defaults><folder> sections). Replace any with tcp://default to tcp://0.0.0.0:22000
Python XML tree.remove(x) errorValueError: list.remove(x): x not in list happens when trying to remove elements while iterating. Always use list(element.findall('tag')) to create a copy before removing
Syncthing says "lookup default: no such host"This is NOT a DNS issue — it means <listenAddress>tcp://default</listenAddress> in config.xml. Syncthing treats "default" as a literal hostname to resolve, not a keyword. Search for ALL occurrences: grep -n "tcp://default|quic://default|default:22000" config.xml. This can appear in BOTH <options> AND <defaults><folder> sections. The <defaults><folder><listenAddress> variant is easy to miss and is a common cause of persistent failures even after "fixing" the <options> section

Pitfalls

  • tcp://default is NOT a keyword — Syncthing interprets this as "resolve the hostname 'default'" which fails with "no such host". This is a common issue on first-time macOS setup where brew pours a bad default config. Always verify port 22000 is listening with lsof -i :22000 after setup.
  • Don't use the REST API for configuration — CSRF protection makes it unreliable. Browser automation (browser_click, browser_type) works consistently.
  • Editing config.xml is sometimes necessary — normally use GUI, but the tcp://default bug requires direct XML edit. Only modify <listenAddress> elements in both <options> and <defaults> sections.
  • Device IDs must be exchanged in BOTH directions — Mac adds Android AND Android adds Mac, otherwise they can't connect.
  • Folder path on Android uses different conventions — /storage/emulated/0/ is the standard internal storage root, not ~ or /Users/.
  • "Listeners 0/1" in GUI = broken connection — If the GUI shows 0/1 listeners, port binding failed and devices will never connect.
  • .stfolder/ marker required — Every Syncthing folder MUST have a .stfolder/ directory in its root, or Syncthing shows "folder marker missing" error and shows "Out of Sync" with 0 inSyncFiles even when files exist. Fix: mkdir -p /path/to/vault/.stfolder && touch /path/to/vault/.stfolder/.syncthingignore then force rescan with API.
  • Force rescan fixes out-of-sync — When local ≠ global state, after fixing the root cause (e.g., adding .stfolder), rescan: curl -s -X POST "http://127.0.0.1:8384/rest/db/scan?folder=<id>" -H "X-API-Key: <key>"

Heefeg gestallte Froen

Wat mécht de KI-Skill Syncthing Setup?

Install and configure Syncthing for folder sync between macOS and Android devices. Covers brew install, service setup, web UI automation for folder creation, device ID extraction, and cross-device pairing instructions. Use when user needs to sync folders between Mac and phone/tablet.

Firwat Syncthing Setup op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Syncthing Setup besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Syncthing Setup an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/adityahimaone/hermes-agent-rtk-caveman/tree/main/skills/devops/syncthing-setup an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Syncthing Setup benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Syncthing Setup benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Syncthing Setup domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Syncthing Setup gratis?

Jo. De Skill gëtt vum adityahimaone ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇