Nextcloud on a Raspberry Pi

I've always been a fan of self-hosted services. Back in the day that consisted of running a simple FTP file server at home. It expanded over time to include hosting a MediaWiki instance, an RSS aggregator, and a Turntable.fm bot. I think my most commonly-used services though have been a VPN tunnel and the lowly SSH SOCKS proxy, so that I could tunnel my browser traffic around company firewalls or safely over wifi in coffee shops and such.

Most of these ran on my home desktop server, but over time I started to realize that I had a bigger appetite for setting these things up than I did an actual need for them. I began to feel guilty for running a big tower 24 hours a day for a thing I would use once or twice per week. Eventually I picked up an old used $80 thin client PC (something like this)  with a low-power Intel Atom processor and no internal power supply.

Acer Veriton N260G

Around that same time though Raspberry Pi's were already catching up to thin clients in terms of performance. Currently I'm running the newer Raspberry Pi 4 Model B and it has 4 times the RAM, 4 times as many CPU cores, and consumes a fraction of the power (2.8 - 5 watts vs. 28 watts) of the thin client. They're really amazing little machines.

My Pi server sitting unceremoniously on an old unused tower

The newer Pis are more than powerful enough to handle newer server applications. The application I currently use most often is Nextcloud. It used to be that I would have compared Nextcloud to hosting your own Dropbox-type application, or at least that's mostly what I used it for (after switching away from Syncthing). But after having just walked through about a year's worth of updates I would compare it more to hosting your own Google Apps platform. Here's the dashboard after upgrading through version 20:

The Nextcloud Dashboard looks awesome

The Nextcloud app syncs calendars, stores files, allows for slick and seamless online document editing, stores contacts, and has dozens of apps for things like adding in a to-do apps, allowing for document collaboration, and playing media files directly within the app. You can share your documents via email or a link the same way that you do in Google documents, and the whole thing is very secure with features like 2-factor authentication and on-disk encryption (if you choose to enable them).

The killer feature for me is that it has polished desktop and phone clients, which is initially what drew me to it. I use both Windows and Linux on my laptop and Nextcloud syncs my documents across those operating systems as well as to my phone. The phone app also has a nice Markdown editor, which enables my current system for taking notes, a simple set of Markdown files.

Phone app browser and Markdown editor

I'm so impressed with this application, and I'm amazed at the fact that it's open source, and that they make it so easy for you to run it on your own device. I also really like knowing that my files and information aren't being monetized and used by a corporation for who-knows-what. The fact that you can get this whole setup up and running for $50 and a few hours of work is incredible.