{"id":39470509,"url":"https://github.com/kastelo/syncthing-configd","last_synced_at":"2026-01-18T04:54:08.400Z","repository":{"id":212458093,"uuid":"511054050","full_name":"kastelo/syncthing-configd","owner":"kastelo","description":"A daemon that automatically manages certain aspects of the Syncthing configuration.","archived":false,"fork":false,"pushed_at":"2024-08-14T06:08:03.000Z","size":127,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-14T07:28:20.845Z","etag":null,"topics":["syncthing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kastelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2022-07-06T08:31:44.000Z","updated_at":"2024-08-14T07:28:24.474Z","dependencies_parsed_at":"2023-12-14T11:59:08.460Z","dependency_job_id":"10d23d02-22c1-4048-bced-8a1b7626d35a","html_url":"https://github.com/kastelo/syncthing-configd","commit_stats":null,"previous_names":["kastelo/syncthing-autoacceptd","kastelo/syncthing-configd"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kastelo/syncthing-configd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kastelo%2Fsyncthing-configd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kastelo%2Fsyncthing-configd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kastelo%2Fsyncthing-configd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kastelo%2Fsyncthing-configd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kastelo","download_url":"https://codeload.github.com/kastelo/syncthing-configd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kastelo%2Fsyncthing-configd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28530476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["syncthing"],"created_at":"2026-01-18T04:54:08.099Z","updated_at":"2026-01-18T04:54:08.368Z","avatar_url":"https://github.com/kastelo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syncthing-Configd\n\nA daemon that automatically manages certain aspects of the Syncthing\nconfiguration.\n\n## Principle of operation\n\nSyncthing-Configd is a sidecar process to Syncthing itself. It listens to\nevents, processes them according to a configured ruleset, and applies\nconfiguration changes to Syncthing accordingly.\n\n## Usage\n\n### Configuration\n\nThere is a [sample configuration\nfile](https://github.com/kastelo/syncthing-configd/blob/main/etc/configd.conf.sample)\nin the repository.\n\nA configuration file contains the Syncthing instance(s) to connect to,\npatterns to apply to incoming device connections, and other directives.\nInitially, one or more `syncthing` sections defines the Syncthing\ninstance(s) to connect to:\n\n```\nsyncthing {\n    address: \"127.0.0.1:8081\"\n    api_key: \"abc123\"\n}\nsyncthing {\n    address: \"127.0.0.1:8082\"\n    api_key: \"abc123\"\n}\n```\n\n### Adding devices and folders\n\nThe daemon listens to Syncthing events informing it of of \"rejected\ndevices\". A device is rejected when an incoming connection is received but\nSyncthing is not configured to accept a connection from that device.\n\nFor each rejected device it checks the configured patterns to see if source\naddress matches a known network. If so, it applies the pattern to add the\ndevice and share the relates set of folders with it. Folders can be created\nif they don't exist beforehand, with a pattern for the ID and path.\n\nPatterns are defined in the configuration file:\n\n```\npattern {\n    # Accept devices from 172.16.32.0/24\n    accept_cidr: \"172.16.32.0/24\"\n    accept_cidr: \"127.0.0.0/8\"\n\n    settings {\n        max_send_kbps: 250\n        max_recv_kbps: 150\n        num_connections: 1\n        max_request_kib: 1024\n    }\n\n    # Assign them the folder \"default\".\n    folder {\n        id: \"default\"\n    }\n\n    # Also an individual folder for each device. The `settings` are used if\n    # the folder needs to be created, otherwise the device is simply added\n    # to the existing folder configuration.\n    folder {\n        id: \"${name}\"\n        settings {\n            label: \"Device ${name}'s folder\"\n            type: SEND_RECEIVE\n            path: \"/var/device-folders/${name}\"\n            fs_watcher_disabled: true\n            rescan_interval_s: 86400\n            case_sensitive_fs: true\n            ignore_permissions: true\n        }\n    }\n}\n\n# Another pattern accepts devices from 10.0.0.0/8 and shares the \"images\"\n# folder with them.\npattern {\n    accept_cidr: \"10.0.0.0/8\"\n    folder {\n        id: \"images\"\n    }\n}\n```\n\nFor the full range of settings, please see [the Protobuf\ndefinition](https://github.com/kastelo/syncthing-configd/blob/main/proto/config.proto).\nIn general it closely mirrors the config options of Syncthing itself.\n\n### Garbage collecting unused device \u0026 folders\n\nDevices and folders that are no longer in use can be automatically removed.\nDevices are removed if they have not been \"seen\" (i.e., had an active\nconnection) for a given number of days. Folders are removed if they are not\nshared with any other device -- typically, after a device has been removed.\n\n```\ngarbage_collect {\n    run_every_s: 86400  # once a day, midnight UTC\n    unseen_devices_days: 90\n    unshared_folders: true\n}\n```\n\n## Installation\n\n### Docker Image\n\nIt's easiest to use the precompiled Docker image. Assuming a configuration file in\n`/etc/syncthing-configd/configd.conf`, something like the command below\nwill start syncthing-configd.\n\n```\n% docker run -d --restart always --name syncthing-configd \\\n    -v /etc/syncthing-configd/configd.conf:/etc/syncthing-configd/configd.conf \\\n    ghcr.io/kastelo/syncthing-configd:latest\n```\n\nNote that since a Docker container runs in a separate namespace it will not\nbe able to access a Syncthing instance on the same machine by using the\n`127.0.0.1` address.\n\n---\n\nCopyright \u0026copy; Kastelo AB. Licensed under the Mozilla Public License\nVersion 2.0.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkastelo%2Fsyncthing-configd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkastelo%2Fsyncthing-configd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkastelo%2Fsyncthing-configd/lists"}