The idea behind this setup is to make a so-called NAS (networked attached storage) which can be used as a remote back-up drive for your data. The setup is really meant as a low power, 'set and forget' solution. It connects to a public server via a VPN so it isn't publically accessible and doesn't need any open ports in a home router.
* A SATA Cable and a SATA-PWR cable, the SATAP-PWR cable needs a JST connector on one end. This can be easily DIY'd or purchased [via the Olimex website](https://www.olimex.com/Products/Components/Cables/SATA-CABLE-SET/)
* Powersupply that is able to feed both (5v, 1.2Ah).
* Access to a router and a ethernet cable
# Setting up the Olimex
## Installing Armbian on the Olimex
*In case you run into trouble during this part of the install, make sure you have read [Armbian's Troubleshooting](https://docs.armbian.com/User-Guide_Basic-Troubleshooting/)*
Grab the ['Armbian Jessie'](https://dl.armbian.com/lime-a10/Debian_jessie_next.7z) image from Armbian. It is the image described as suitable for servers.
After having copied the image to the SD card insert it in the board and connect it via the ethernet cable to the router and then connect the power supply, in that order.
In case you have access to the router's admin panel you should be able to find it quickly there.
Otherwise, using another computer connected on the same local network, try to find it running `nmap`:
`sudo nmap -p 22 --open 192.168.1.0/24`
This command will scan the entire local network and list devices with port 22 open. The olimex board should be listed there. Make sure you use the IP adress range that is applicable in your situation and don't just copy the above command.
After having found the IP adress of the board login for the first time:
`ssh root@192.168.0.105` use password `1234`
Upon a successful login you should be greeted with the welcome screen and a prompt to change the password and make a user.
## Updating Armbian and configuring the Olimex
Then we upgrade the system from Stretch to Jessie (assuming you still run as root):
First 'unfreeze' the kernel version by running `armbian-config` entering the 'hold' menu, unsetting the freeze and then exiting back to shell.
Replace the version in the sources file and updated the sources:
`sudo vim /etc/tinc/backupnet/tinc-down` containing:
```
#!/bin/sh
ifconfig $INTERFACE down
```
Make both these scripts executable with: `sudo chmod 755 /etc/tinc/backupnet/tinc-*`
## Share the keys & test the network
You'll now have:
* a file called `homeserver` in `/etc/tinc/backupnet/hosts/` on *homeserver*
* a file called `nas` in `/etc/tinc/backupnet/hosts/` on *nas*
Make you copy `homeserver` to `/etc/tinc/backupnet/hosts/` in *nas* and `nas` to `/etc/tinc/backupnet/hosts/`*homeserver* via scp or by copying the contents of each file from one terminal to the other.
After you've done that you should be able to test the network by running `sudo tincd -n backupnet -D -d3`**first** on *homeserver* and then on *nas*.