diff --git a/docs/applications/syncthing.md b/docs/applications/syncthing.md new file mode 100644 index 00000000..51dba03a --- /dev/null +++ b/docs/applications/syncthing.md @@ -0,0 +1,35 @@ +# Syncthing: Open Source Continuous File Synchronisation + +Homepage: [https://syncthing.net/](https://syncthing.net/) +Github: [https://github.com/syncthing/syncthing](https://github.com/syncthing/syncthing) +Docker: [https://hub.docker.com/r/syncthing/syncthing](https://hub.docker.com/r/syncthing/syncthing) + +Syncthing is a continuous file synchronization program. It synchronizes files +between two or more computers. It strives to fulfill the goals below in summary. +Syncthing should be: + +1. Safe From Data Loss +2. Secure Against Attackers +3. Easy to Use +4. Automatic +5. Universally Available +6. For Individuals +7. For eveything else see the goals document + +## Usage + +Set `syncthing_enabled: true` in your `group_vars/all.yml` file. + +## Specific Configuration + +Open the web interface at :8384 to configure. + +The tasks/syncthing.yml sets +```yaml + env: + STGUIADDRESS: "" +``` +which disables admin GUI access from anywhere except localhost. You can either +remove this (at which point it is visible to your whole network), or use +Traefik. In either case you should consider setting an admin password in the +syncthing GUI. diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index f0f8e848..86cfa26a 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -7,6 +7,8 @@ By default, applications can be found on the ports listed below. | Couchpotato | 5050 | | | Bitwarden "hub" | 3012 | Web Not. | | Bitwarden | 19080 | HTTP | +| Syncthing admin | 8384 | HTTP | +| Syncthing P2P | 22000 | | | Duplicati | 8200 | | | Emby | 8096 | HTTP | | Emby | 8920 | HTTPS | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 6b316b22..1812032a 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -68,6 +68,9 @@ thelounge_enabled: false # Password Management bitwarden_enabled: false +# Syncthing +syncthing_enabled: false + # Finance firefly_enabled: false @@ -550,6 +553,12 @@ bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321 # Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden bitwarden_allow_signups: false +### +### Syncthing +### +syncthing_available_externally: "false" +syncthing_data_directory: "{{ samba_shares_root }}/syncthing" + ### ### Firefly ### diff --git a/nas.yml b/nas.yml index c351ca5e..be898125 100644 --- a/nas.yml +++ b/nas.yml @@ -160,6 +160,10 @@ when: (bitwarden_enabled | default(False)) tags: bitwarden + - import_tasks: tasks/syncthing.yml + when: (syncthing_enabled | default(False)) + tags: syncthing + - import_tasks: tasks/nzbget.yml when: (nzbget_enabled | default(False)) tags: nzbget diff --git a/tasks/syncthing.yml b/tasks/syncthing.yml new file mode 100644 index 00000000..9dbc65ea --- /dev/null +++ b/tasks/syncthing.yml @@ -0,0 +1,22 @@ +- name: Create Syncthing Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ syncthing_data_directory }}" + +- name: Syncthing Docker Container + docker_container: + name: syncthing + image: syncthing/syncthing:latest + pull: true + network_mode: host + volumes: + - "{{ syncthing_data_directory }}:/var/syncthing:rw" + env: + STGUIADDRESS: "" + labels: + traefik.web.frontend.rule: "Host:syncthing.{{ ansible_nas_domain }}" + traefik.enable: "{{ syncthing_available_externally }}" + traefik.port: "8384" + restart_policy: unless-stopped