Setting Up The Crypt Server
This post is the secont part of Crypt : A Personal Cloud.
I bought a 2 TB external hard disk and connected it to the Pi board. Time to mount it. First, create the directory where you want to mount the harddisk.
Now, identify the partition of your hard disk that you want to mount.
And now we’re good to mount it
If you want to mount the disk automatically every time the Pi board restarts, you’d need to find the Universally Unique Identifier (UUID) for your partition and put it in the /etc/fstab file with its mount point. You can find the UUID by listing all the block devices on your board.
And now you can mention this UUID in the fstab file.
All you need to do now is to clone my repo, build the docker image and spin up the container. These commands are also given on the GitHub repo Crypt-ARM-Syncthing.
Once everything is up and running, open up your favourite browser and visit the IP address of your Orange Pi, hit port 8080 and you should be able to see the Syncthing Screen (Something similar to the following screenshot). Remember, we can go to “Actions” and view the QR code for the device’s ID. We’ll use this QR to scan it from the mobile client.
Go to “Settings” and name your device. I chose Crypt.
Now, hit the GUI tab and set up a username and its password.
Hurray! Your server is now up and running perfectly. If you want your server to restart automatically every time the Pi reboots, simply set a cron job to fire the command ‘docker start syncthing’ at the time of reboot.
Configuring the Client
Go to Google Playstore and download the Syncthing app. Go to “Devices” tab, scan the device QR code and you have the mobile client all set up. You can set a static IP address for your Pi board from your router’s admin panel and put that IP here too.
Now you can select any folder you want to take a back up of. The “Folder Label” is the name of the folder where all the data of the selected folder will reside on the server side. Choe the “Folder Type” to “Send Only”. We don’t want any changes made in the data on the server to be reflected on mobile, do we? Do not forget to toggle the switch with “Crypt” (whatever your device name is) in front of it. It tells the client to share the folder with that device. You’ll be prompted on your Web Browser to accept the request and to select the location where you want to take the backup.
Now, you can wait a little for the data to start synchronising between the devices.
You can return from your office, your college, your wherever-you-go-to and simply turn the Wi-Fi on and all the data will be backed up without a fuzz!
Happy Backing Up!