{"id":21560474,"url":"https://github.com/lu0/syncthing-config","last_synced_at":"2026-05-16T22:07:31.060Z","repository":{"id":132823731,"uuid":"286416450","full_name":"lu0/syncthing-config","owner":"lu0","description":"My config files for Syncthing, a continuous file synchronization program. Only non-sensitive data (folder and device IDs).","archived":false,"fork":false,"pushed_at":"2021-05-12T05:00:32.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T13:43:18.327Z","etag":null,"topics":["configuration-files","file-synchronization","linux","syncthing"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lu0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-10T08:15:55.000Z","updated_at":"2021-12-09T16:57:56.000Z","dependencies_parsed_at":"2023-07-04T17:45:23.530Z","dependency_job_id":null,"html_url":"https://github.com/lu0/syncthing-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lu0/syncthing-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu0%2Fsyncthing-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu0%2Fsyncthing-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu0%2Fsyncthing-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu0%2Fsyncthing-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lu0","download_url":"https://codeload.github.com/lu0/syncthing-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu0%2Fsyncthing-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326739,"owners_count":24232496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-files","file-synchronization","linux","syncthing"],"created_at":"2024-11-24T09:15:10.699Z","updated_at":"2026-05-16T22:07:26.018Z","avatar_url":"https://github.com/lu0.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# syncthing-config\nThis repo tracks the [Syncthing](https://github.com/syncthing/syncthing) config files of my phone and my laptops.\n\n  - [What do I sync?](#what-do-i-sync)\n    - [Home directory](#home-directory)\n    - [Phone](#phone)\n  - [Installation](#installation)\n  - [Setup](#setup)\n    - [Desktop config](#desktop-config)\n    - [Android config](#android-config)\n    - [Run at startup](#run-at-startup)\n    - [Sensitive files and folders to be ignored by git](#sensitive-files-and-folders-to-be-ignored-by-git)\n\n## What do I sync?\nI sync some folders of my home directory between my laptops, and some folders of my phone.\n\n### Home directory\nUsual folders:\n* Documents\n* Home\n* Downloads\n* Music\n* Pictures\n* Templates\n* Videos\n\nCustom folders:\n* Artwork\n* Code\n* Mobile\n\n### Phone\nCurrent Android versions only grants Syncthing read-only access to the SD card, so I store all my data in the internal storage. I set dummy folders anyways in case Android 11 allows Syncthing to write to the SD card.\n* DCIM\n* Pictures (created by apps)\n* Downloads\n* Whatsapp media\n* Voice recordings\n* Backup folder of syncthing\n\n## Installation\nGet the latest stable release.\n```zsh\ncurl -s https://api.github.com/repos/syncthing/syncthing/releases/latest \\\n        | grep \"browser_download_url.*tar.gz\" | grep \"linux-amd64\" \\\n        | cut -d '\"' -f 4 \\\n        | wget -i - -O syncthing-latest.tar.gz\n```\n\nExtract its contents and create a local symlink to the binary.\n```zsh\nmkdir -p syncthing-latest\ntar -xf syncthing-latest.tar.gz -C syncthing-latest/ --strip-components=1\nrm syncthing-latest.tar.gz\nln -srf syncthing-latest/syncthing ~/.local/bin/\n```\n\n## Setup\nSyncthing [overwrites the config file](https://github.com/syncthing/syncthing/issues/6628) instead of editing it, so neither symlinks nor hardlinks from the config files to the repo will work. A workaround to track those files is to mount their parent directories in folders created inside the repo, stage the config.xml files and use the .gitignore to ignore files containing sensitive data.\n\u003cbr /\u003e\n\u003cbr /\u003e\nThe following steps uses paths of my machine for sake of example.\n\n### Desktop config\nSyncthing store the config files in ```~/.config/syncthing/```, mount this folder inside the repo to track its contents. \n```zsh\nmkdir -p ~/code/syncthing-config/desktop-config/\nsudo mount --bind ~/.config/syncthing/ ~/code/syncthing-config/desktop-config/\n```\nIf using Nemo, run the following script to hide \"link\" emblems and show Syncthing emblems on the synced folders.\n```zsh\n./emblems.sh\n```\nIn case you want to restore the default emblems, run:\n```zsh\n./restore-emblems\n```\n\n### Android config\nUse \"Import and Export\" in the app settings to store a backup of the config files in ```[internal data]/backups/syncthing/```. I sync this folder with my computer in ```~/mobile/DEVICE/int-syncthing```.\n```zsh\nmkdir -p ~/code/syncthing-config/android-config/\nsudo mount --bind ~/mobile/ga50/int-syncthing/ ~/code/syncthing-config/android-config/\n```\n### Run at startup\nIf everything works as intended, edit `/etc/fstab` with:\n```zsh\n...\n/home/USER/.config/syncthing/ /home/USER/code/syncthing-config/desktop-config/              none user,nodev,x-gvfs-hide,bind 0 0\n/home/USER/mobile/DEVICE/int-syncthing/ /home/USER/code/syncthing-config/android-config/    none user,nodev,x-gvfs-hide,bind 0 0\n```\n\n### Sensitive files and folders to be ignored by git\nThe ```.gitignore``` contains the list of files and folders that [must not be tracked](https://docs.syncthing.net/users/security.html#protecting-your-syncthing-keys-and-identity):\n* key.pem\n* cert.pem\n* https-key.pem\n* https-cert.pem\n* csrftokens.txt\n* sharedpreferences.dat\n* index-v0.14.0.db\n\nOnly folder and device IDs [can be tracked](https://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret), those IDs are stored in the ```config.xml``` files. However, these files include API keys. What I did was commit blank ```config.xml``` files, then pasted and committed the lines with non-sensitive data and lastly I added the sensitive data to the files but didn't commit them. I mantain the repo using a pre-commit hook to avoid commiting lines with API keys:\n\n```zsh\nln -srf pre-commit .git/hooks/\n```\nMake sure to unstage lines containing sensitive data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu0%2Fsyncthing-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flu0%2Fsyncthing-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu0%2Fsyncthing-config/lists"}