DEV Community

Cover image for Do you care about your privacy? Maybe it is time to set up your own Dropbox.
Rémi Lavedrine
Rémi Lavedrine

Posted on

Do you care about your privacy? Maybe it is time to set up your own Dropbox.

Image from Syncthing


There is a very famous meme over the internet that said

"There is no cloud, it's just someone else's computer"

There is no cloud, it is just someone else's computer


It can give you some anxiety, and when you have a look at the very big and famous data breaches, it is important to understand that it is not a matter of IF (you are going to have a data breach), but it is a matter of WHEN (you are going to have a data breach).

But we are very lucky because as the open source technology is growing, so are the possibilities for everyone to install our own substitution for very popular services.
I can highlight Evernote for a note taking application and Dropbox to have your files available everyone within your computer file system.

So let say that we want to really own your files and not leave them to a company that could unilaterally change their Terms and Conditions.

Personally I am a very huge user of Evernote for note taking available on a lot of my device and of Dropbox to have my files available anywhere and on all my devices.

If I want to still use Dropbox but you want to be sure that no one at Dropbox can read your files, you can use a software that would encrypt it on your hard drive before you send anything to Dropbox.

Cryptomator is a very good tool that can do this and encrypt your data before you send it to the cloud.

Cryptomator

That is a huge upgrade to any cloud you have used. Especially in case of a data breach. If you choose a strong enough password, you are good.

Hint : "Use KeePassXC Password Manager to keep all of your passwords for you."

But this solution can be problematic at some point, because you can't decrypt your data easily when you are on the go, on your smartphone.
And you have the hassle to enter a password every time you want to have a look at a file.

So let's move to another method, as easy to set up but much more usable on the long term and that supports your privacy.


You are in control of your files

I am going to present you something absolutely amazing, that is open source (very important as you are going to give it all of your files, even the most private ;-))

Move from Dropbox

logo-horizontal.svg

Syncthing is multi platform, it works on Linux, MacOS and Windows. It also has application available on Android (no iOS sorry, but if you are an iOS developer and you find this too sad to be true you should solve this ;-)).
Furthermore, Syncthing can be installed on ARM devices. That means it is available to some NAS.
So if you have a QNAP or Synology (among others) NAS, you can just installed it as you would for an app on a smartphone.

But I am not that rich to have a NAS. :-(
But I am rich enough to have a RaspberryPi. :-D

A Raspberry Pi is a small and affordable computer that was initially developed to learn programming.
Raspberry Pi

But it is so powerful and versatile that the DIY (Do it Yourself) community embraces it and hack it in so many ways possible that the Raspberry Pi is now the go to device if you want to do something as a low cost.

I would consider that you installed Raspbian on your Raspberry Pi.

So now you just have to installed Raspbian on your Raspberry Pi (don't forget to check the integrity of your download through the signature (sha256sum file on Linux ;-)), you just have to download and installed Synchting for the RaspberryPi.

As Raspbian is based on Debian, you can follow the instructions from that page to install Syncthing on the RaspberryPi.


Configuration

Syncthing is based on Peer-to-Peer technology.
That means that only your devices are communicating between each other. There is no one to make some introduction at some point.

It is very easy to configure your Syncthing.

I love to have a master computer, the Raspberry Pi, which is the machine that is going to be the reference to any other of my machines.

Let's consider the following graphs.

Every machine pushes the changes on the master devices, the Raspberry Pi.

graph TD;

MacOS --> RaspberryPi
Ubuntu --> RaspberryPi
Windows10 --> RaspberryPi
Enter fullscreen mode Exit fullscreen mode

But the RaspberryPi pushes the changes it received from a device to the others as soon as they are on the network. So that everyone is synced.

graph TD;

RaspberryPi --> MacOS
RaspberryPi --> Ubuntu
RaspberryPi --> Windows10
Enter fullscreen mode Exit fullscreen mode

But the MacOS, Ubuntu and Windows 10 machines are not talking to each other.
Because the Raspberry Pi is always on, it is unnecessary to let the machines talk to each other. And it removes a lot of conflicts on a day to day basis.

If you compare this to Dropbox, Syncthing on the Raspberry Pi is our Dropbox. Always on, syncing our files modifications.

Syncthing is working in your browser.
Just launch localhost on port 8384.
And you have the syncthing interface, where you can discover new devices you own through a code mechanism (very straightforward).
!screenshot-720.jpg


 Advanced Configuration

You can configure a lot of things from the Web UI.
As soon as you are going to become more familiar with how Syncthing is working, you are going to move to some deep configuration through configuration files.
Everything is described in the very clear documentation from Synchting.


Move from Evernote

Now that we have a substitute for Dropbox that is up and running. I would love to have a note app that would synchronize on my Syncthing folder locally so that it would be available on all my machines.

After a lot of research to find the perfect note taking app for my needs, I come to discover Boostnote.

It is designed for developers with its very neat Snippets feature and it works on every major platform, Linux, MacOs and Windows10, which is essential to me.

Here is a good article on how an iOS developer is using snippets to improve its development.

1*6Af2MvBFeO2csxqS4cz96w.png

A notebook (as it is described in Evernote) is only a directory on your computer.
So you just have to choose a location that is synchronized with Syncthing and you have your own Evernote.

You can create as many notebooks as you want. You just have to create new folders on your synchronized Boostnote folder.

Boostnote is a very good software and most of all, it is open source. As Syncthing;, you can have a look at its source code on Github.


I hope that article was of interest to you and that it would decide you to own your bits.
I know that there are a lot of other possibilities to achieve this. Nextcloud is a very good one, Resilio as well, but I must admit that Syncthing and Boostnote have everything I need to solve my problems.
I would love to hear from you and the solutions you put in place to own back your bits.

Top comments (12)

Collapse
 
tux0r profile image
tux0r

Nextcloud is a very good one

nextCloud/ownCloud faces the issue that it can do a lot more than only file hosting, e.g. it has a calendar and a notes application, resulting in your server quickly becoming a single point of failure. I admit that it is a reasonably good file hosting service though.

Some alternatives I have stumbled upon during my own experiences:

  • File hosting: Pydio and the very good Seafile.
  • Calendars/Contacts: Radicale (supports both CalDAV and CardDAV synchronization).
  • Notes: To be honest, I have not found a good "self-hosted Evernote" just yet. For the moment, I work with org-mode, but, while the Android app (Orgzly) is lovely, the desktop version might not be suitable for everyone, especially since it is not WYSIWYG.
Collapse
 
balbooaaa17 profile image
Astrit Krasniqi • Edited

I'm using Seafile, never had a problem, the sync is faster then with Nexctloud. I use it to backup my photos from my Iphone and also to sync files that i need. In a nutshell Seafile is fast, easy and smooth to use

As per note taking and and personal documentation i use Bookstack, another awesome piece of software

Collapse
 
tux0r profile image
tux0r

Oh, thank you. BookStack is not entirely un-interesting... bookmarked. :-)

Collapse
 
kungtotte profile image
Thomas Landin

NextCloud (at least the NextCloudPi option) has backup features built in, both for files and the database.

It's trivial to set up secure backups. With NextCloudPi having basically zero hardware costs it's highly feasible to setup multiple systems and have them either federate (i.e. work like other cloud services) or use as off-site backup.

Collapse
 
shostarsson profile image
Rémi Lavedrine

Yes, love the NextCloudPi options. Ownyourbits makes a really great job with it.
But I found Syncthing to be more light and that fits my need much better.

Collapse
 
jkleiser profile image
Jon Kleiser

Thanks a lot for this very valuable information!

Collapse
 
kuboon profile image
Ohkubo KOHEI • Edited

I use this for several years
resilio.com/
It works perfectly on multiplatforms including iOS.

Collapse
 
shostarsson profile image
Rémi Lavedrine • Edited

Yes, but as it proprietary code, I prefer to just move from it especially as Syncthing works that smoothly. :-)
But it is a very good alternative as I mentionned in the article (if you don't care about closed source code, which you should on that topic). :-)

Collapse
 
perrydbucs profile image
Perry Donham • Edited

I've been using Seafile for years. I run it on a Linux server configured in RAID10, and it has all the clients that I need for my workflow. As Snowden pointed out, if you are storing your files on Dropbox et al, you might as well just mail them to the NSA. I would add 'even if they are encrypted'.

Collapse
 
cairocafe profile image
bleskop stevens

You could get nextcloud/owncloud running in minutes on a raspberry pi with a mounted usb stick using docker images for the app and the mysql instance if you don't already have it.

Using a letsencrypt cert and duckdns my raspberry pi is ssl-secured. You do not need a static ip address for this.

Collapse
 
ondrejs profile image
Ondrej

I would also recommend Git-Annex instead of DropBox (I use *BSD on laptop and it works for me perfectly).

Collapse
 
jeromesch profile image
jeromesch

NextCloud / OwnCloud works completly fine for me.
I've it hosted on a QNAP NAS TS251+

You can also secure the Cloud with a vpn.
That way the user needs the vpn-key, username, userpassword + IP.