zacharybillman-hugo/content/posts/my-selfhosting-journey/index.md

47 lines
6.3 KiB
Markdown

+++
title = "My selfhosting journey."
author = ["Zachary Billman"]
date = 2022-07-02
tags = ["FOSS"]
categories = ["selfhosting"]
draft = false
+++
My interest in self-hosting began in my with my interests in internet privacy. Plastered all over the internet are stories about how much Google, Facebook and Amazon know about you. I deleted my Facebook account years ago, and I'm too paranoid to go back to the site because there's [a real possibility that Facebook has cached my account, ready to spin it back up](https://www.reddit.com/r/privacy/comments/6nmjfh/facebook_account_fully_recovered_3_years_after/) in case I try to login again. The ads served to me were too accurate for my liking.
{{% sidenote %}}
This is despite almost never clicking on them!
{{% /sidenote %}} I have become convinced of the idea that, if you are not paying for the product, you are the product. From this assumption, it follows that anywhere I trust with my data that I am not paying for (like Google Drive, Google Photos, Dropbox, Facebook, Twitter) is using my data to earn money. We know that [Google uses the labels you add to Photos to train it's AI](https://www.theverge.com/2020/11/11/21559930/google-train-ai-photos-image-labelling-app-android-update), and [Facebook uses (at least) Instagram photos to train it's AI](https://ai.facebook.com/blog/seer-the-start-of-a-more-powerful-flexible-and-accessible-era-for-computer-vision/). For some, the value proposition of allowing a company to use your data for a useful service in return is an acceptable one. I find this to be a reasonable stance, but I took my growing interest in internet privacy as a chance to learn about how I can take control of my data.
Initially, I lurked on forums like /r/privacy to learn what I could do to avoid big-tech's watchful eye. There were numerous comments along the lines of: "The only way to be in control of your data is to self-host your services." I had no idea what this meant!
{{% sidenote %}}
Hard to believe that less than a year later, I learned to use (and love) Linux as my primary OS, and have happily replaced Google Photos, Google Drive and other services with my own self-hosted alternatives.
{{% /sidenote %}} Self-hosting, I have since learned, is when you run useful programs from your own computer. By doing so, you have complete knowledge of where and how your data is stored and how it is being used. It has the additional effect of being a bottomless time sink.
To begin, I needed an always-on computer to run these useful programs. I began with a humble Raspberry Pi.
Gallery style image below.
{{< gallery match="images/*" sortOrder="desc" rowHeight="600" margins="5" thumbnailResizeOptions="600x600 q90 Lanczos" showExif=true previewType="blur" embedPreview="true" >}}
/my-selfhosting-journey/rpi.webp
![](/my-selfhosting-journey/rpi.webp)
./images/rpi.webp
![](./images/rpi.webp)
These are tiny, but capable computers that are great for fiddling with. The projects [people develop for these are amazing and diverse.](https://www.reddit.com/r/RASPBERRY_PI_PROJECTS/) With RPi in hand, I began with the ambitious project of replacing Google Drive with [Nextcloud.](https://nextcloud.com/) After much frustration with a bare metal installation, I found the [NextcloudPi project.](https://github.com/nextcloud/nextcloudpi) Surprisingly, it went pretty okay! At first, I was intimidated by Linux defaults, but over time I grew to appreciate, and indeed, prefer Linux as an operating system.
{{% sidenote %}}
My decision to use Linux over Windows/MacOS is because it is free and open source software (FOSS). This is a topic for a different post, but I think using FOSS when possible is a moral imperative of sorts.
{{% /sidenote %}} I used Nextcloud strictly from my home for a few months, without the ability to connect to it from the internet, to test the self-hosting waters. My first true cloud replacement spun up once I decided to access this lil' guy from the internet. To do so, I purchased a domain (not the one this site is hosted on) and pointed it to the IP of my house. I forwarded the appropriate ports of my router to the RPi.
This is when the real exploration began. I was able to access my files and images using Nextcloud, but the photo viewing service left something to be desired. No problem, why not spin up [an instance of Photoprism?](https://photoprism.app/) I use RSS feeds to keep on top of the latest science in the journals relevant to my field using Feedly. Why not host [my own RSS feed aggregator](https://freshrss.org/) so I can subscribe to as many feeds as I desire?
This cycle continued, and I accrued many cool applications, but in the back of my mind I worried about opening up my home network to the internet. I also struggled to run some programs because the RPi uses the arm64 architecture, and most services are written with amd64 in mind. These two forces eventually convinced me to purchase a server where I could manage all of my services remotely.
{{% sidenote %}}
Some would say that not owning the hardware that is running your own services is not "true" self-hosting. I think this is needlessly exclusive. Let everyone self host, dangit! Someday, when I have more stable internet and a more permanent home, I hope to host everything from my own home, but until then, I'm extremely pleased with my current stack.
{{% /sidenote %}} And that is where I am now. I happily host numerous services on my virtual private server that entirely replace Google Photos, Google Drive and GitHub for me. Even better, there are specialized services that fill a need I never realized I had. What's more, if I ever want to spin up a new service, all I have to do is add it to my to docker-compose file and it will be up within minutes. What a world!
I thought about making this into a "guide" style post. I nixed that idea because, quite frankly, I feel like I don't know what I'm doing. I am really happy with my setup, but I don't feel like I have the authority to tell people how to administer their own services. If you are interested, allow me to point you toward the guide [that really got me rolling: Ultimate Traefik Docker Compose Guide.](https://www.smarthomebeginner.com/traefik-docker-compose-guide-2022/)
For those of you wondering [what I am currently hosting, check out my current list at the link](https://www.zacharybillman.com/posts/zpb-current-selfhosted/) and let me know what you think!