refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / syncthing / README.md
1 ---
2 title: Syncthing
3 homepage: https://syncthing.net/
4 tagline: |
5   Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers.
6 ---
7
8 To update or switch versions, run `webi syncthing@stable` (or use `@beta` for
9 pre-releases).
10
11 ## Cheat Sheet
12
13 > Syncthing is like a self-hosted Dropbox or Google Drive. It keeps data safe,
14 > secure, and accessible.
15
16 You can have multiple syncs and shares. The "Default Folder" is `~/Sync/` (ex:
17 `/Users/me/Sync`).
18
19 Files are updated about every 30 seconds.
20
21 ### How to run Syncthing
22
23 You can test that syncthing was installed correctly by checking it's version:
24
25 ```bash
26 syncthing --version
27 ```
28
29 If that works, you'll want to set your system launcher to run it on login. You
30 can install and use [serviceman](/serviceman) to do this:
31
32 ```bash
33 webi serviceman
34 ```
35
36 ```bash
37 mkdir -p ~/.config/syncthing/
38 env PATH="$PATH" serviceman add --user --name syncthing -- \
39   syncthing --home ~/.config/syncthing/
40 ```
41
42 Serviceman is cross-platform and will create the correct _launchd_, _systemd_,
43 or Windows Startup config file.
44
45 If successful your browser will open to <http://127.0.0.1:8384/#settings-gui>
46 automatically.
47
48 ### Basic Setup & Sharing
49
50 You need to install syncthing on TWO OR MORE devices for it to be effective.
51
52 Go to <http://127.0.0.1:8384/#settings-gui> and make these changes:
53
54 - Actions > Settings > GUI > Uncheck "Start Browser"
55 - Actions > Settings > General > Minimum Free Disk Space > 15%
56 - Default Folder > Edit > File Versioning > Staggared File Versioning
57 - Actions > Show ID > (copy to clipboard)
58 - Remote Devices > Add Remote Device > (paste ID from other computer)
59   - (if you're on the same network you may be able to click to add)
60   - Set the remote computer name
61   - Then go to "Sharing" and select "Default Folder"
62   - Save
63   - NOTE: For every device add and folder share action you will get a popup
64     notification in the web admin, possibly alternating between both computers.
65     You will need to accept those for the sync to begin (oralternatively you can
66     set Auto-Accept on both).
67
68 You may also want to password protect the local GUI. It only runs on localhost
69 by default, so this may not be strictly necessary.
70
71 - Actions > Settings > GUI > (set username and password)
72
73 ### Do you need to Port Forward?
74
75 Maybe.
76
77 Syncthing will try to use UPnP. Check your router config and make sure UPnP is
78 enabled.
79
80 Otherwise, yes, forward both UDP and TCP ports 22000.
81
82 ### How to run Syncthing manually
83
84 It can be useful for debugging and testing configuration to run syncthing from
85 your Terminal. Just run `syncthing` pointing to the config directory:
86
87 ```bash
88 syncthing --home ~/.config/syncthing/
89 ```