Syncthing4Swarm streamlines the deployment of Syncthing within Docker Swarm environments. With features like automatic peer discovery and zero-touch configuration, it simplifies the complexities of distributed file synchronization, making it ideal for modern containerized infrastructures.
syncthing4swarm is an automated deployment solution designed for running Syncthing within Docker Swarm clusters. This project streamlines the installation and management of distributed file synchronization across containerized infrastructures, enhancing the capabilities of real-time file sharing.
Key Features
- Global Deployment: Operates a dedicated Syncthing instance on every node within the Swarm cluster.
- Automatic Discovery: Effortlessly scans the overlay network to identify other running Syncthing instances, ensuring seamless connectivity.
- Auto-Configuration: Facilitates mutual device pairing and folder sharing without requiring manual setup, therefore saving time and reducing errors.
- Private Mode: Optimizes security by disabling relays and global discovery, thus limiting traffic to internal communications only.
How It Works
Each time a container is initiated, the following process occurs:
- The system waits for Syncthing to become fully operational.
- It disables all global features, including relays, NAT, and external discovery, to maintain a secure environment.
- If a shared folder does not already exist, it will be created automatically.
- A scan of the overlay subnet is conducted to locate other Syncthing devices.
- All discovered devices are mutually added using their static IP addresses, ensuring that each node is synchronized.
- The device list is updated across the shared folder, promoting efficient file management.
Configuration Options
The system offers several configurable environment variables:
STGUIAPIKEY: required API key for Syncthing interface.SYNCTHING_PORT: Defines the REST API port, default is8384.SYNCTHING_SYNC_PORT: Port designated for file synchronization, default is22000.SYNCTHING_FOLDER_ID: Identifier for the shared folder, default isshared.SYNCTHING_FOLDER_PATH: Path of the folder to be synchronized, default is/var/syncthing/data.SYNCTHING_FOLDER_LABEL: Display name for the folder, default isShared.SYNCTHING_DISABLE_GLOBAL: Boolean to disable relays and global discovery, default istrue.
System Architecture
The architecture of syncthing4swarm involves an interconnected setup of Syncthing instances across multiple Docker Swarm nodes, linked via an overlay network that supports internal traffic.
Requirements
To run this project, the following prerequisites are necessary:
- An initialized Docker Swarm (using
docker swarm init). - A properly configured overlay network.
- Consistent
STGUIAPIKEYacross all nodes to enable synchronization.
This project is built on the foundation of Syncthing, a powerful open-source file synchronization system, and acknowledges the contributions from the Syncthing community.
No comments yet.
Sign in to be the first to comment.