Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| gentoo:syncthing [2024/03/05 10:03] – created willy | gentoo:syncthing [2025/03/13 13:27] (current) – [SyncThing] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== SyncThing ====== | + | ====== |
| - | [[https:// | + | [[https:// |
| + | |||
| + | It also bypass the need for exposing your server to the internet due to the usage of an anonymous network or interface servers (which you could also host if you like). | ||
| It basically keep folders in synchronization between hosts. hosts can be computers and also mobile devices. | It basically keep folders in synchronization between hosts. hosts can be computers and also mobile devices. | ||
| + | |||
| + | __Remember: | ||
| + | (not even for your mobile devices, but if you [[selfhost: | ||
| + | |||
| + | Syncthing can be configured via a nice web interface. | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Line 12: | Line 19: | ||
| </ | </ | ||
| - | Then add it to default | + | Syncthing is configured via **/ |
| + | |||
| + | There is a wiki page on Gentoo [[https:// | ||
| + | |||
| + | You want to run Syncthing as the user you need your data synched as. | ||
| + | |||
| + | After you have set it up, you should login as that specific user and run it once manually: | ||
| <code bash> | <code bash> | ||
| - | rc-update add syncthing | + | syncthing |
| - | / | + | |
| </ | </ | ||
| + | then close it. This will create the basic internal configuration files needed. | ||
| + | |||
| + | You most probably don't want to run the standard instance of syncthing but always make a copy of it for the user or groups you want. For example, if you need to run a syncthing to sync your mobile phone stuff as user **myuser**, you will need to: | ||
| + | * copy **/ | ||
| + | * symlink **/ | ||
| + | |||
| + | then edit (see below) the config file and start the service: | ||
| + | <code bash> | ||
| + | rc-update add syncthing.myser default | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Configuration (per user) ===== | ||
| + | |||
| + | For SyncThing to be useful you need to run it as a specific user or group, and assign a unique port to it. | ||
| + | |||
| + | Edit the **/ | ||
| + | <file - synchting> | ||
| + | SYNCTHING_GUI_ADDRESS=" | ||
| + | SYNCTHING_USER=" | ||
| + | SYNCTHING_GROUP=" | ||
| + | SYNCTHING_HOMEDIR="/ | ||
| + | SYNCTHING_LOGFILE="/ | ||
| + | SYNCTHING_UMASK=003 # to allow pid file to be read by monitor utilities | ||
| + | </ | ||
| + | |||
| + | Remember to run syncthing manually once as the user: | ||
| + | <code bash> | ||
| + | su - myuser | ||
| + | syncthing | ||
| + | </ | ||
| + | then stop it, before launching the service. | ||
| + | |||
| + | ===== Reverse Proxy ===== | ||
| + | |||
| + | Running syncthing under NGINX is easy, take this as example: | ||
| + | <file - syncthing.conf> | ||
| + | location / | ||
| + | proxy_pass http:// | ||
| + | proxy_read_timeout 120s; | ||
| + | proxy_set_header Host 127.0.0.1; | ||
| + | access_log off; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Just make sure the port is correct. | ||
| ===== Usage ===== | ===== Usage ===== | ||
| - | Open your browser to **http:// | + | Open your browser to **http:// |
| + | |||