Estimated read time: 5 minutes
TL;DR My answer here is rclone (mount) + insert-favorite-cloud-storage (I use Jottacloud) + Seafile on top. Multiple levels of accessibility, no more Dropbox and worrying about hard drives. Scroll to the bottom for a best effort Draw.io diagram. (-:
Perhaps you can relate; I had a Dropbox account on a free tier, always 90% full — and I had images, videos and random stuff laying around on multiple laptops and servers, wherever stuff made sense in the moment. Everything in my Dropbox was encrypted with encfs, but except for that, the situation was not ideal.
I decided to make a change for the better when I bought myself a new mobile phone and found out that Dropbox had introduces a max limit on the number of connected devices. So short story long;
I needed to
- buy or find something to replace Dropbox, meaning; have a folder on each
personal computer and server that is
- synced across devices,
- actual files on the file systems and
- encrypted at third party.
- find some kind of archive system to dump archive graded stuff without
making them inaccessible.
- I really would like to not worry about physical hard drives.
- Bonus if I can mount the archive as a local file system.
I was discussing Plex with a colleague, he had all of his
media content encrypted in his Google Drive account, mounted – like sshfs
–
to his server with rclone! Interesting!
I am really not an advocate for Google's products, but rclone supports a range of backends and one of them happens to be Jottacloud! There is nothing unique with Jottacloud, but they are Norwegians and it feels good to support Norwegian cloud provides when I can! The $7.5 per month plan gives me «unlimited storage» 1, and with rclone I will have a layer of indirection in case I ever want to swap backend.
This fixed my archive problem, but did not work well as a Dropbox replacement. Editing files which are mounted (very) remotely can sometimes take multiple seconds to open and write. And every now and then I want to access my files while I am offline or on a low bandwidth connection.
/r/selfhosted suggested Seafile! I have used it briefly in the past, at a former workplace, but it looks a lot more mature now.
So my life now looks like this! ↓
In short; I now got two folders on every client (desktops and servers) I use
where sync
is an Seafile folder with offline content, and archive
; being a
slower, albeit unlimited, file system folder. With this I can edit and use my
notes and daily files via the former, and run borg backup 2, image/video gallery
etc in the latter.
torvald@gauda ~/sync $ ls
bin certs docs dotfiles gpg scrape mailattachments notes projects tickets work www
torvald@gauda ~/jotta/archive $ ls
backups gitrepos lekvam_cam pictures videos www
Run rclone config
to add your preferred cloud storage resources. Add
additional layers with encryption. I divided the two use cases, but one remote
folder with two subfolders is also a possibility. 3
torvald@gauda ~ $ rclone listremotes --long
jotta-archive-encrypted: crypt
jotta-archive-raw: jottacloud
jotta-sync-encrypted: crypt
jotta-sync-raw: jottacloud
Further, rclone allows us to mount external resources to your file system with
rclone mount
. Make it persistent with systemd.
[Unit]
Description=Mount jotta crypt archive
Wants=network.target
Before=network.target
[Service]
Type=forking
User=torvald
Group=torvald
WorkingDirectory=/home/torvald
ExecStart=/usr/bin/rclone mount --allow-other --daemon jotta-archive-encrypted: /home/torvald/jotta/archive
[Install]
WantedBy=multi-user.target
Seafile comes with a well written guides for both server setup as well as
desktop
and CLI clients.
Seafile's data directory is simply pointed to my rclone mounted sync
folder.
The default SQLlite did not work well with this approach, so I set up a Seafile
with MySQL. No PostgreSQL support is a bummer.
Bonus: The Seafile android app also allows for auto photo upload, archiving my photos to a «selfhosted» encrypted location automatically.
-
They limit bandwidth when you exceed 5TB, but I guess I'm good for a couple of years as is. ↩
-
A friend have already blogged about this ↩
-
You can instead encrypt your content with Seafile if you want, but if you want to add unencrypted Seafile libraries as well (i.e for sharing) rclone encryption is a nice default anyhow. ↩