Syncthing
I want to start off my saying that Syncthing is awesome. I use it everyday to sync all of my important documents, files, pictures etc. If you have a RaspberryPi sitting around and doing nothing this could be a awesome tool you could use. I currently have a RaspberryPi as a retro gaming machine so ill explain how to install and get things ready by using a virtual machine that is running Debian. Every step here will work on the RapberryPi.
So when you connect to your pi or pc via ssh the first thing you need to do is update and upgrade your system. So here are the commands in order:
- sudo apt update
- enter your password
- sudo apt upgrade
If it asks you if you would like to install updates type y and hit enter. Now lets install Syncthing:
- sudo apt install syncthing
- hit enter
Start Syncthing by typing: syncthing. Then press enter. Let it run for 10 seconds or so and then end the process by hitting ctrl+c.
Now lets install my favorite text editor; NeoVim.
- sudo apt install neovim
Just to make sure we are in our home directory we need to type out:
cd ~/
Take note of your ip address by using: ip addr .
Now lets edit the config.xml file so that we can access the gui:
- cd .config/syncthing
- nvim config.xml
We will search for the line of text by first typing: / , then search for <address>. Press enter, scroll down to where it says 127.0.0.1:8384. (You can use j to move the cursor down l is right and j is left. Or you can use your arrow keys). Replace it with your local ip address but make sure to keep the ports (press i to start editing). For instance my local ip would be 10.0.0.64:8384. Once you edited the file press: esc, :wq.
Now lets start Syncthing again. Type out syncthing in the terminal. Open up a browser and type in the ip address you edited in the file. For example mine is 10.0.0.64:8384. If eveything went well you should see the Syncthing gui. From there you can secure it with a password if you like.
Once you finish your settings at the gui lets set up Syncthing as a service. That will make it so that everytime you restart you device it will automaticly start up. make sure to put your username where 'your username' is without the ''. The steps are as follows:
- ctrl+c to end process
- sudo systemctl enable syncthing@'your username'.service
- sudo systemctl start syncthing@'your username'.service
And.....thats it! you should have a working Syncthing server!