Using Nextcloud as an alternative to iCloud on a Raspberry Pi

Good afternoon everyone,

I would like to try out and maybe use Nextcloud as an alternative to iCloud. I have used a few cloud services so far, such as iCloud, OneDrive, and also Google Drive.

I only use Apple devices such as Mac, iPhone, iPad and also the Apple Watch. For this reason, I already have a Raspberry PI running HomeBridge. The HomeBridge is used to use Apple HomeKit with devices that don’t actually support it.

But now to my question: 1. Can I use Nextcloud on a Raspberry PI that already runs other software? Is it possible to install Nextcloud on the Raspberry PI with a command? I want to avoid flashing an SD card because otherwise I would lose the HomeBridge.

Does it even make sense to host a cloud at home?

Thank you for all the answers.

You really ought to open your mind to better products. Don’t just follow the most gimmicky marketing campaign. You’ve already taken the first step by looking into Nextcloud in order to take better control over your data, now take the next step and take the rest of your data back as well. On Desktop/Laptop, any Linux distro will be much more secure in protecting your private data than what you are using, and while I’m sure you’ll have some kind of argument about google being the only viable alternative to apple in the mobile space and not being any better at respecting your privacy, you do have the option, especially with “google pixel” hardware, of running google-free AOSP. Nextcloud can fill in for all of the google services. It can be a bit of a challenge to switch over to Linux and Android since you’ll have to re-learn how to do everything and what software to use to do particular tasks, but once you do it, you’ll realize that you can do infinitely more, and much more easily, and you’ll wonder why you didn’t do it years before.

Hosting Nextcloud at home may or may not be suitable, and depends a lot on where you will be using it (for the most part), and the characteristics of your home network (reliability, up and downstream bandwidth, latency). If you have reasonably fast symmetric bandwidth (say 100/100 mbps or better) and a good and reliable connection, it could very well be practical to host it at home. But if you have a horribly asymmetric connection (say 10 up/100 down) and it frequently disconnects, then you really should look at hosting it outside your home. Or, if you have a highly unreliable connection but access it mostly FROM home, then you could actually be BETTER off hosting it at home, since you would save yourself from any issues with the home internet connection.

I would generally recommend staying back as far as you can from raspberry pi hardware. It is the epitome of weak hardware – there are much better SBC’s out there.

But if you do really want to stick with that horrible weak hardware, then there’s no reason you need to use someone else’s preconfigured nextcloud image on it. You just need to set up Apache, PHP, MariaDB, and Redis servers on it, and run the Nextcloud web installer (copy the installer’s php file into your web space and call it from a browser) and follow the prompts.

Yes, but setting up Nextcloud is always a multi-step process, be it ncp or snap.

A reasonable point. My recommendation is:

  1. Join a hosted Nextcloud service in order to try it out
  2. Backups
  3. Setup your Pi or other machine with Nextcloud at home if you want to learn how to host.

:slight_smile: Good luck.

I really appreciate your answer. I want to say that I don’t have any plans to switch from Apple devices to another platform. I love the company and their products - and I can get my data back by disabling iCloud.

My main intention to use Nextcloud is to store securely, encrypted my personal photos. Other things I want to do is to store my Calendar events and my Contacts in Nextcloud.

Now the question is: What is now to do? I want the cheapest solution with the maximum of privacy and security. I have a Raspberry Pi 4 which is not really in use - it’s just for HOOBs/HomeBridge.

Which external server provide would you choose? I live in Germany, so it is significant that the servers are located in Germany, to make sure that the German privacy and data protection laws will apply.

But I am also comfortable with self-hosting Nextcloud at home, when I find a solution to back up the data.

Hetzner or
to join the chat on selfhosting for Pi hardware with ncp

If countless others can figure it out, no doubt you can as well. :+1:

1 Like

Thank you very much.

I appreciate this immensely.

I saw this from Hetzner and the price is really okay. Is it a normal Nextcloud with all the functions like calendar, contacts and installable apps?

It’s just that I’m worried about security again. What about encryption? I actually always use Boxcryptor to encrypt data in the cloud. How is the data in a Nextcloud secured?

Thank you so much. What do you exactly mean with your second point “Backups” ?

If you want a suggestion, any semi-recent used laptop will be better than a pi.

Get a used laptop with a defective screen (cheap!), hook up an external monitor for setting up, then unplug the monitor and run headless.

My own Nextcloud runs on a 2014 laptop with a Celeron, broken keys, and a few other physical defects. I had a friend put a decent SSD in it - and it’s now my home file server :slight_smile:

There are good links about backup already - I’ll just add that it’s easy to access Nextcloud by webdav. This means you can back up your data to any computer on your network with a hard disk attached, for example. There are smarter ways, that one just seems easy to me.

Good luck!


Thank you for your reply. It’s really like a hamster wheel - I understand that it’s better if I manage the Nextcloud myself at my home, but what happens if someone breaks in or the apartment burns down?

I’m really looking for the best and most secure solution to keep my data. But when I leave Nextcloud with a provider, they can access the data, right?

Yes, a secure backup is a real concern.

One common answer is a rotation of two external disks, for example - take backups regularly on one, and swap it with a second one that you keep offsite, say once a month, or more frequently depending how much your data changes.

Cloud backup services promise you your data is encrypted… but you have to trust them, backup speed equals your outgoing internet speed, it’s not free for larger amounts of data, and not everyone has unmetered Internet connections.

Use boxcryptor. That should be fine. I don’t use hetzner, but reach out to them for all the details. I believe they might grant you administrative control over your nextcloud, so you can install any apps you want.

Avoid to run 2 different services on one machine, especially if you don’t know exactly what you are doing (e.g. solve a problem if one of them suddenly stops working).

You can use a (second) Pi as a Nextcloud Server, but I would recommend to use an old/used PC (or even a Mac if you can install Linux on it). I ran my Nextcloud for the first 2 years on a 10 year old desktop computer, then I upgraded to a maybe 5-6 year old one - works perfectly fine. You get used PCs for 100-200 EUR on eBay, and they will be much faster and much more reliable than the newest Pi (and use some watts more energy).

If you setup the server write a manual/documentation with all the steps you did to set it up (e.g. all commands you typed in to install it…),

Backup: Managing backups directly on the server is always a bit tricky (if you do: try “restic”). Easier, when you mainly want to backup the files (and not necessarely backup/restore the complete database):
Have all data on the server, and synchronize all data to one desktop machine. Then you already have everything on 2 different systems, so one of them can break and you still have all files. Then you backup the desktop (e.g. with time machine), and this backup you can take also to another location. Have 2 different backup disks to alternate. Then you have it on 4 different disks at least.

Encryption: You can and should encrypt the drive of your server (LUKS is standard when setting up e.g. Ubuntu), the main reason is to protect the data when the server is stolen or when you need to dispose the drive. But this does not protect the data when the server is running, so if someone hacks your server they will be able to access the files. Also encryption can be a reason for losing data, so you need to carefully manage keys/passwords…

Hosted Nextcloud: I can recommend Hetzner. But when you store files at their hosted server then they can typically access them. Data protection laws sound nice, but do not protect you. Especially not against any laws which may force providers to scan the files of their customers…
So a Hetzner Nextcloud is like iCloud or Google Drive, just with a more sympathic (and much smaller) hosting company. But it is still on other servers. Also hosted services get really expensive when you need a lot of storage (several TB or more).

Hosting at home: It is absolutely no problem to host a Nextcloud in your home, and access it from outside (you need a dynamic ip service). I have 30mbit upload, but also 10mbit upload (e.g. a 50/10mbit line) would work. Everything you sync is locally on the device anyway, just accessing files via the browser will be slower if the upload speed is low.