Differences between revisions 5 and 19 (spanning 14 versions)
Revision 5 as of 2021-02-20 11:22:09
Size: 778
Comment:
Revision 19 as of 2021-02-20 11:59:55
Size: 2487
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * File ignore patterns
Line 11: Line 12:
=== GlusterFS === Start by installing syncthing
Line 13: Line 14:
start by configuring the system as a glusterFS client {{{
apt-get install syncthing
}}}

== Filesystem ==

Configure your system as a [[GlusterFS Client|GlusterFS client]], so you have the following in your fstab.
{{{
/etc/glusterfs/home.vol /srv/home glusterfs defaults,_netdev,rw 0 0
}}}
Line 16: Line 26:

For each user that is going to synchronize against this system, create a directory for them in `/srv/home` and give it the correct ownership.

{{{
mkdir /srv/home/kale
chown -R kale:kale /srv/home/kale
}}}

For each user add the syncthing service to default runlevel and start it.

{{{
systemctl enable syncthing@kale.service
systemctl start syncthing@kale.service
}}}

When the syncthing service starts, it creates a set of config files in the users home directory. Edit `/home/kale/.config/syncthing/config.xml` and look for the section below. Change the address, so the service listens on all interfaces `<address>0.0.0.0:8384</address>`, instead of just localhost. Notice that when you make this change, your syncthing service is public. Everyone can change it.

{{{#!highlight xml
<gui enabled="true" tls="true" debugging="false">
    <address>127.0.0.1:8384</address>
    <user>kale</user>
    <password>password hash</password>
    <apikey>apikey</apikey>
    <theme>default</theme>
</gui>
}}}

Restart the service for the specific user.
{{{
systemctl restart syncthing@kale.service
}}}

== GUI ==

It should now be possible to connect to the syncthing GUI on https://syncthing:8384 and configure it.

=== Credentials ===

Start by setting up a username, a password and force https. This is done in the settings dialog in the GUI tab. Your installation should now be secure.

{{attachment:syncthing-settings-gui.png||align="top"}}

Syncthing

Syncthing is a modern file synchronization tool. It synchronizes files between various devices and operating systems. It is a great tool for automatic backup of personal files and smartphones. It has several usefull features:

  • Easy easy and simple configuration
  • File versioning
  • File ignore patterns

For this setup we will use GlusterFS as the file store backend.

Software

Start by installing syncthing

apt-get install syncthing

Filesystem

Configure your system as a GlusterFS client, so you have the following in your fstab.

/etc/glusterfs/home.vol /srv/home glusterfs defaults,_netdev,rw 0 0

Configuration

For each user that is going to synchronize against this system, create a directory for them in /srv/home and give it the correct ownership.

mkdir /srv/home/kale
chown -R kale:kale /srv/home/kale

For each user add the syncthing service to default runlevel and start it.

systemctl enable syncthing@kale.service
systemctl start syncthing@kale.service

When the syncthing service starts, it creates a set of config files in the users home directory. Edit /home/kale/.config/syncthing/config.xml and look for the section below. Change the address, so the service listens on all interfaces <address>0.0.0.0:8384</address>, instead of just localhost. Notice that when you make this change, your syncthing service is public. Everyone can change it.

   1 <gui enabled="true" tls="true" debugging="false">
   2     <address>127.0.0.1:8384</address>
   3     <user>kale</user>
   4     <password>password hash</password>
   5     <apikey>apikey</apikey>
   6     <theme>default</theme>
   7 </gui>

Restart the service for the specific user.

systemctl restart syncthing@kale.service

GUI

It should now be possible to connect to the syncthing GUI on https://syncthing:8384 and configure it.

Credentials

Start by setting up a username, a password and force https. This is done in the settings dialog in the GUI tab. Your installation should now be secure.

syncthing-settings-gui.png

Instances

References

* https://theselfhostingblog.com/posts/how-to-set-up-a-headless-syncthing-network/

None: Syncthing (last edited 2022-02-12 09:39:51 by Kristian Kallenberg)