Hello everybody,
my plan is to switch from Android to GrapheneOS. In this process, I want to get rid of my reliance on my google account as much as possible.
To this end, I’d like to selfhost some “critical” data, e.g.
- contacts
- calendar
- online drive for files (e.g. google drive alternative)
- some basic note-taking app (like google keep)
and so on.
I do some selfhosting already, though it is not that kind of “cannot lose this” data. So I’d like to share my thoughts and ask for your opinions and experience for the process.
More details for what I want
contacts
- have to be syncable to the phone
- if possible, some webinterface to edit / browse
calendar
- has to be syncable to the phone
- webinterface + sync to desktop / phone
- if possible, send invite-links to events to others
drive
- files of my choosing must be offline-available
- ever other file should not use storage on the phone
- if possible, able to share links to download files
- if possible, able to share links to view with online editor (see below)
document editor
- think google sheets / google docs
- if possible, able to share links to view documents online
smartphone photos
- auto-backup camera folder
There may be some things I’m not thinking about right now, but this seems to pretty much be it.
If possible, all of this should be accessible only via vpn.
What I already have
I have a pfSense physical appliance that’s already managing my home network, got an OpenVPN already setup, dynamic DNS working properly for the lack of a static IP, etc.
I own 2 mini-PCs (some Intel NUC, some passive-cooled zotac with an intel with 4c/8t). One of them (zotac) is currently running as my Proxmox Virtual Environment Hypervisor, managing 3 VMs.
I also have a second PC which misses some critical parts, so it is not currently in working condition. I think there’s an AM4 mainboard and 16 or 32GB of DDR4 RAM in there. I could make a NAS or a new hypervisor out of this, but the case (Fractal Design Define 7) is quite big and a full PC is probably worse for energy-efficiency than my 2 mini-PCs and is going to be more expensive.
Not much in terms of storage sadly
- 1x 6TB external USB HDD (used for backups)
- 1x 2TB external USB HDD (used for data)
What I plan to do
The kind of data I’m going to be hosting myself now is very import, so it cannot be lost or corrupted.
But the feature list doesn’t seem to be overly complicated. This seems like something nextcloud could do.
This means, I will probably need to buy
- 2x 4 TB HDD for storage for data RAID
- 2x 8-10 TB HDD for backups
- 2x external RAID case
Then I could connect the data RAID to the already running zotac pc and spin up new VMs for nextcloud and whatever else I might need and start serving my data from home.
The Intel NUC will be used as a Proxmox Backup Server, connected to the backup RAID. Keeping some daily, weekly and monthly backups.
On the phone-side, I’d have the vpn always active. Whenever active, sync of contacts, calendar entries, photos etc. should be possible.
Questions
Is there anything I missed? Did any of you already try something like that? Does anybody here see a potential problem with any of the above?
Can anyone recommend a RAID-1 external enclosure without a fan and some quiet and energy-efficient HDDs?
Went through the same thing. Paused between Murena (at that time they weren’t providing my personal domain / email address solution) and nextcloud, and proton. I went with proton. I could in theory do nexrcloud +proton. You do you.
And for notes, I went markdown route and obsidian.
I assume you basically want protection against disasters, but not high uptime.
(E.g. you likely can live with a week of unavailability if after a week you can recover the data.)
The key is about proper backups. For example, my Nextcloud server is running in a datacenter. Every night I replicate the data to a computer running at home. Every week I run a backup to a USB drive that I keep in a third location. Every month I run a backup to a USB drive on the computer I mentioned at home.
So I could lose two locations and still have my data.
There is much written about backup strategies, for example https://en.wikipedia.org/wiki/3-2-1_backup_rule … Just start with your configuration, think what can go wrong and what would happen, and add redundancy until you are OK with the risks.
I assume you basically want protection against disasters, but not high uptime. (E.g. you likely can live with a week of unavailability if after a week you can recover the data.)
Exactly. These are not business-data, but my personal data. No money or absolutely necessary thing is lost if I lose all of that.
The key is about proper backups.
Thanks to other commenters I realized, I can just export contacts, calendar events and photos every night to some on-disk location and back them up somewhere offsite. This would probably be a few GB only. The other ~1.5 TB of data is stuff like movies, music, old games that I’d probably never get anywhere else etc. My data is not life-threatening. It’s just “critical” to me.
Via google I found that you can export your calendars via a URL, so I my current backup plan is this:
- daily backup from onsite-hypervisor to onsite-backup server (all VMs and all data)
- daily export of calendar and contacts
- backup calendar, contacts and photos to offsite-location
This way, I’d still be compliant to the 3-2-1 rule (just not for all my data), while saving quite some money on the offsite data storage.
As you are already using nextcloud, could you verify if exporting calendars and contacts work with these 2 URLs?
# calendar export
https://${NEXTCLOUD_URL}/remote.php/dav/calendars/${NEXTCLOUD_USER}/${CALENDAR_NAME}/?export
# contacts
https://${NEXTCLOUD_URL}/remote.php/dav/addressbooks/users/${NEXTCLOUD_USER}/contacts/?export
This is the command used in this tutorial. The website is in german, scroll down for bash, python, nodeJS and windows powershell examples.
curl -L -J -O -u "$username:$password" "$downloadLink" --create-dirs -o "./$(basename "$url")"
my Nextcloud server is running in a datacenter. Every week I run a backup to a USB drive that I keep in a third location.
If you don’t mind me asking, how much are you paying for your datacenter server and the third location?
Nextcloud with a 3-2-1 backup strategy is ace. Proxmox can auto-backup, it’s slick.
I use Nextcloud (currently using their AIO docker images) for all of that. Not sure if it checks all the boxes perfectly, but if not it is probably as close as youll find ready-made.
Not sure if it checks all the boxes perfectly, but if not it is probably as close as youll find ready-made
That’s a good point. To have cohesion and good integration, some sacrifices have to be made. This seems better than having 20 independent services working with (and sometimes probably against) each other.
are you using any of the video/audio calls on that setup? how much horsepower does it need?
I have only tested them a bit and it worked fine, but I havent relied on it “in production”, as it were. I use that machine for too many things for it to be any kind of benchmark. Mine is running on an old HP workstation w/ a 7th gen iGPU chip. I am also relying on it for plex and unmanic using QSV for transcoding. It only ever has trouble if I over-tax it with those.
A few things. I also think nextcloud is the way to go for what you want. I’ve gotten rid of anything Google I can. Except for maps. Man, there just is no substitute especially when mobile.
I always do, but I’m going to suggest Unraid for a NAS. Pay the money and then just enjoy it. I fought with truenas for over a year before I succumbed. You can totally play around with zfs, striped arrays whatever. I do not recommend an external enclosure. I think you’ll come to hate it for lack of ability. I recommend biting the bullet and building a machine or putting your current PC components into a real case with upgradability if possible.
Also, I wouldn’t plan on running Nextcloud in a VM. Nextcloud is pretty beefy and a VM adds complexity that I suggest against. A docker AIO version of nextcloud running on as close to bare metal as you can is probably the best option for performance.
Except for maps. Man, there just is no substitute especially when mobile.
I thought there was an android app for open street maps, but I couldn’t find any on play.google.com either.
I do not recommend an external enclosure […] you’ll come to hate it for lack of ability
I feel kinda the same, but on the other hand, having a full-blown ATX system running in my living room isn’t going to be my first choice. If I can’t manage with the zotac mini PC, I can still take the drives out of the enclosure and put them in a full ATX case. That’s more of a “last resort” though.
A docker AIO version of nextcloud running on as close to bare metal as you can is probably the best option for performance.
I’m not worried about performance all too much. The only thing constantly connected will be my phone, for syncing contacts, calendars and, every now and then, a new photo or two. Sometimes I open the calendar in my browser on my desktop or laptop to add / change an event. I really don’t use it too extensively.
And to aid in CPU and performance of the VM, I can always have a VM with the “host” CPU type, which should forward CPU capabilities and features to the VM.
I think you can get Open Street Maps in the F Droid app store. But, as much as I appreciate OSM, it’s just not the same as Google maps. The speed, accuracy and information doesn’t seem to have an equal.
You definitely can run Nextcloud in a VM. With decent hardware, it will do it. I guess I would say it depends on needs and expectations. My install is not snappy to me. I’ve got what I feel is a very beefy server but still. Just feels a little slow at times. Totally functional. Just has a small amount of lag when doing anything. I’ve read people say they have none at all. But when you’re busy and relying on it, my suggestion is to eke out everything you can for it for a better experience. Not make or break by any means.
I don’t think it’s a problem per se, as much as it’s a difference in priorities. But the docker implementation in TrueNAS is more of an afterthought. I think they’ve fixed some issues but checking out their forums, many of the issues I faced seem to still exist. Docker packages corrupting and not being accessible in any way, not updating, just seemingly, not robust. Also, I disliked the file permission structure but that’s more preference I think. I would say TrueNAS is a great NAS just not the best hypervisor and NAS.