Self-hosting ideas

Posted on 2021-May-31 in networking

self-hosting

Self-hosting is about running your own cloud services on your own hardware. Remember: there is no cloud, you are just using somebody else's computer. Sometimes it makes sense, sometimes you don't want to entrust that someone else with your data. In some cases it is a lot cheaper to host a service yourself than delegate it online, like hoarding terabytes of media files. Self-hosting is also a good way to learn the latest fashions: Virtual Machines, containers, and how to automate everything around those.

The downside is that you have to manage everything yourself and your uptime is unlikely to match what is offered by cloud service providers. If you are your only customer that should be fine, but if you end up managing the service for multiple users you will need to figure out what to do when you are not interested any more or if you get run over by a bus. Size your risks and make the right decision.

The self-hosting community is fairly active on Reddit. Check out those two subreddits if you haven't yet:

If you are looking for ideas about what to self-host, this curated list has everything you want:

https://github.com/awesome-selfhosted/awesome-selfhosted

Just for fun, here are some self-hosted services I have either used or contemplated using.

Bitwarden

Bitwarden is a commercial service offering storage for your online passwords. There are a lot of similar services but this one has a perfectly usable free tier. You also have the possibility to host your own server, so your passwords are never stored on anybody else's computer. That latter is not officially supported by Bitwarden but apparently fully operational, though I haven't tried it myself.

Best thing about Bitwarden is that you have browser extensions and mobile apps so it is actually usable where you need it.

A Dropbox replacement

The Seafile experience is very similar to dropbox. Install it on a server and give it its own disk space, then access it through a web interface or one of the many clients (including mobile). Seafile has its own storage system, files are not mapped 1:1 to a local filesystem but stored inside containers that can only be unwrapped using a seafile client -- though they have a seafile-fuse utility for mounting a seafile container as a local directory.

Advantages: Seafile is really fast compared to Owncloud/Nextcloud, but not meant to store large collections of gigabyte-sized files. Useful when sharing PDFs or similar. The Seafile mobile client is nice.

I had a lot of trouble with the brittle install procedure. As soon as you deviate from defaults it tends to crash in mysterious ways and your best bet is to restart the procedure again. But once installed, it works great! Just don't stray off the defaults.

Nextcloud and Owncloud are two similar projects aiming at providing a full solution for file-sharing and communication in teams. Useful to share files among a small group. I only tried Nextcloud.

Installing Nextcloud is a major pain in the butt. I could not manage to get it to a working state with either docker images or a freshly installed virtual machine. The only thing that worked for me was installing dietpi on a Raspberry Pi and running the automated Nextcloud install from there, but I will admit having very little patience with those things.

My biggest gripe with Nextcloud is the sheer amount of software it relies on, including an Apache/PHP combination I would rather avoid. Nextcloud also requires a database engine to work. Though it can technically be satisfied with an Sqlite3 database, it keeps moaning that you won't have a true Nextcloud experience until you install MySQL or Postgres. My experience running it on a Raspberry Pi 4 was not fantastic as the interface is rather slow. The mobile app had trouble importing photos, ending up with a large number of duplicates all over the place. Your mileage may vary.

The main advantage of Nextcloud is the large community around it.

On the topic of file synchronisation: Syncthing is a portable solution that will maintain a data directory identical on all machines connected to the same account. Add/modify/delete a file on one machine and the status will be replicated everywhere. It is extremely convenient for effortless backups.

Syncthing does not work instantaneously though. Synchronisation is based on torrents that can take a while to start, so do not expect to use it for collaborative tasks between users. I prefer rsync for my own needs because I like to know when directories get synchronised, but Syncthing offers an excellent hands-free alternative to dropbox.

filebrowser

If you are looking for a much simpler alternative to Seafile/Nextcloud, look no further! filebrowser is a Golang single-file executable that requires no Apache/PHP, no database engine, and runs in a single process. Place your carefully sorted files into a directory and let filebrowser do the butler service for you. There are no client apps, just a web-based interface that works extremely fast.

You can upload/download files or entire directories, preview media files, but mostly: you can manage your data directly on the filesystem. That piece of software runs on every single machine I use to store data. If all you care about is exposing a filesystem on a web interface for easy file management, go for it.

Navidrome

I have accumulated a large collection of music files over the years and finding the right kind of tool to access them has always proved to be difficult. Most programs will choke at the time of indexing a large media collection. I remember letting KDE's Amarok run for several days and finally giving up with some weird error message, but that was years ago. Things surely improved since then.

A rather recent project called navidrome seems to have the indexing issue in hand, and offers itself through a really fantastic web interface. Navidrome is a Golang single-file executable: point it to your music collection, point a browser to the main page, done. Your albums will start showing up immediately as they are indexed. No need to run a separate database, dedicated web server or PHP interpreter, everything works out of the box.

The only inconvenient is that you are only browsing your own music files. If you want to discover new talents, nothing replaces the usual music services we have today. Having navidrome gives me access to all of my music online but I still maintain my subscription to a music provider because it is so easy to use, available everywhere, and points me to artists I never heard about.

Media servers

So you have a large collection of movies and want to watch them? Plex seems to be the most popular choice today, offering a Netflix-like interface to your own media. Plex comes with a number of mobile apps in addition to a very nice web interface.
The downside is that Plex runs on a subscription, which means you have to log onto the Plex server to use your own instance. That's silly: if your Internet connection is down you won't be able to browse the movies you have in front of you in that media box. They have a free tier but I just can't accept the fact I have to be connected to a remote server to watch my own local media.

Last time I tried Plex (free tier), I was greeted with a screenful of ads for TV shows and programs that made it hard to find my own local content. Not really my cup of tea. Seems that Plex has become an ad distribution program with the ability to watch your own movies.

Alternatives to Plex are emby or jellyfin. Emby started its life as an open-source project and is now a (mostly) proprietary system attached to a company, like Plex. Jellyfin is an open-source project that looks like Plex or Emby without the ads. The web interface is not as nice and the Android client I tried had some bugs, but overall it mostly works and looks very promising. Give it a bit more time and it should become a true replacement for Plex.

If all you want is access to your local media, install Kodi and be done with it. Kodi works great on local media, even when they are stored on a Samba share. There are tons of interesting plugins to watch Internet TV if that's your thing.

Careful though: Kodi can be unstable. The latest major update broke a large number of plugins and skins, making it unusable for a few days. If all you want is browse a directory and watch movies, VLC also works very well on Android TV and any Linux box.

Minecraft

Setting up a Minecraft server for the kids was a blessing during those long lockdown days. Careful though: there are currently two versions of Minecraft. If you install the java-based Minecraft server, players who have the Microsoft version of that game won't be able to join. Make sure you read the docs before you purchase.

Source Control

A lot of self-hosters have their own github clone, based on something like Gitea.
If all you are looking for is source control for your own software, you should definitely give Fossil a try. This version control system is nothing short of amazing! Written by the same author who gave the world Sqlite, Fossil includes everything you need to support software projects: version control with branching and merging à la git, ticketing system, wiki, and notes. All of your project data are contained into a single file: an Sqlite database you can rsync around for backups.

I use it myself to document my various personal projects, keep notes handy, or store tidbits of information in a personal wiki. Fossil is a single executable programmed in C.

Online Book Storage

How do you browse your large collection of epub files? Calibre seems to be the most popular desktop solution, but it can be completed with calibre-web, an independent project that will read your Calibre library and make it available through a web interface. That allows you to read books directly on your web browser, including on mobile devices.

If you are into comics, CBR/CBZ files can be served by ubooquity, an easily-installed solution that offers directories full of comics on a web interface, saving the hassle of having to copy sometimes large files onto your tablet for reading.

There are many more things you could self-host if you give yourself some time to do it. Stay in control of your data!