Recovering a modicum of your privacy
There’s no such thing as a free lunch
In this article we’ll explore the motivation and rationale for using free cloud based file sharing applications and whether the cost benefit pendulum has swung back in favor of paying a little to strengthen our privacy. We’ll also provide a simple howto for creating your own cloud share along with a back-of-the-envelope cost breakdown.
Chances are pretty good that you’re using one or more of these file sharing applications:
- Amazon Drive
- Dropbox
- Google Drive
- OneDrive
I sure am!
Rationale: I have multiple colleagues, friends, family members, gadgets and devices that I can collaborate and share my data with.
Motivation: It’s simple, secure and free.
But is it really free? A nagging feeling in the back of my neck keeps telling me that there ain’t no such thing as a free lunch. It makes me wonder whether my data up in their cloud is being crunched on my machine learning algorithms? To infer more precise ways to selling me junk I don’t want or need. Or maybe running facial recognition on my photo’s to suss out patterns or networks or marketing strategies or maybe even a future episode of Black Mirror.
It’s nice to not have to worry about security, administration and backups for your data. To have all of these important concerns performed for you magically and for free. But, by not thinking about these concerns, problems can sneak up on you and cause things to break when you least expect it. There was a problem I encountered when leaving a job I was with for 3 years. I had Google Drive on my home laptop for a few years and added it to my work laptop shortly after joining.
When I left the company and cancelled my Google account on the work laptop, all the data I added to the Google Drive from the work laptop vanished. After some digging I found all 8GB of various files in the trash bin and was able to get it back. Cloud file sharing can also soak up a lot of processor, local disk and network resources when synchronizing data to the cloud. It’s probably not very noticeable if you only have a few files that you share. For power users it can be a lot.
There’s lots of OpenSource solutions for Cloud storage today such as: OwnCloud, Ceph, NextCloud and Seafile to name a few, which allow you to keep your data private and on premise. Should you decide to go with an OpenSource solution you trade-off the benefits described above for the free Cloud Providers, by giving them your data. When you make the decision to take back your data, you will also have to think harder about:
- Securing your data
- Buying hardware
- Administering the solution
- Tolerating or eliminating single points of failure
Having watched a recent YouTube on NextCloud by Kiril Peyansky it got me interested in finding out what it would take to give it a try on one of my Raspberry Pi 4’s. I also watch a YouTube on a NextCloud instance running on a Linode server to do a rough price comparison. A bare bones Linode sever would cost $60 per year for 1 CPU, 1 GB RAM and 25GB SSD. A Pi 4 model B, quad core 4GB RAM, 32G micro SD, case and power supply can cost around $75. Since I already have a few of these it made sense to plug in a new micro SD card and give it a try.
I began by downloading my NextCloud image and extracting the image on my Windows laptop. The image you download is package as a B-zipped file in a Tar file. You can use 7-Zip to extract it or if you have Git installed, use tar -xf imagefile from a bash shell. Once the image is extracted you can flash it to a Micro SD drive.
The flash Micro SD’s i’m currently using Balena Etcher.
The etcher is fast, easy to use and verifies the image after it’s been flashed. When the image is complete, pop it into your Raspberry Pi and boot it up connected to a LAN cable. You can also boot headless if you prefer. When the instance first boots it will resize the disk and prepare the OS for use. Be sure to run raspi-config to configure your timezone and country settings.
The documentation is good at walking you through what you will need for a successful configuration. There’s also some tips and trick for the Raspberry Pi. When you first login you’ll get two sets of credentials, the first set is for the website running on port 443, the next set is for the admin server running on port 4443. I chose to use DuckDNS as my DynDNS free provider. When I logged in to the website the first time it ran a wizard to configure my FIOS Router to forward port 443 to my Raspberry pi and configure some other settings.
The wizard failed when it got to the running Certbot as part of the Let’s Encrypt certificate creation. from the error it looked like I needed to provide my Email address, which I added in the Admin server settings. Rerunning the Let’s encrypt from the admin server completed the configuration and allowed me to connect to my Raspberry Pi using the DuckDNS FQDN.
The web interface is intuitive and professional. NextCloud also has android and IOS apps which you can download to sync data with your devices.
During the setup I decided to use the Micro SD card for storage. I’ll probably switch over to a couple of SSD’s configured as a Mirrored RAID. With the Pi 4 USB3 port this should provide a significant performance boost. though, the performance of the Micro SD isn’t bad.