Review of Running a Server with a Mac Mini at Home for 2 Years (2)
Translated by GPT
Two Years of Running a Server at Home with a Mac Mini (2)
- Remote Access
A home server cannot be accessed from outside. It’s quite frustrating when you want to develop in a space like a café but can’t access your server. Therefore, you need to set up a VPN, but the process of building a VPN is complicated and can be insecure if not set up correctly. Leaving SSH open makes it even more vulnerable.
Moreover, there is no VPN server that supports the Mac environment. You would need to purchase a router capable of VPN or access through a separate Linux server, but I decided that buying additional equipment for external access was wasteful.
In the end, I decided to implement Tailscale. It’s free for personal use and allows seamless development in a remote environment with Mesh VPN (similar to P2P connection). It’s significantly faster than a typical VPN.
macOS provides VNC as a default option. Therefore, by connecting with Tailscale, you can access it directly by host name without additional installation. There’s no need to expose the VNC port, making it secure.
Additionally, you can change the DNS name, making access easier. For example, assuming there is an arbitrary address like 100.90.171.11, you can access it with a name like server/. You can easily access it without knowing the internal network IP.
- Monitoring
I manage it with Prometheus & Grafana. The basic option of the Mac Mini, 8 cores and 8GB, gets maxed out when running the Docker engine. It was fine when running a few light projects, but it almost reached its limit. Therefore, periodic monitoring is necessary.
Grafana allows you to set up Alerts. When memory or CPU usage spikes, it can send warnings via webhooks. In my case, I connected it to a Discord webhook so that when memory usage reaches a certain level, I get notifications on my smartphone.
Monitoring is the most important part of production operations. From a service perspective, using Google Analytics is much more convenient, but the information obtained from the server, the starting point of software, is much more diverse.
You can easily see which services are consuming a lot of memory at a glance. It’s also easy to manage storage. Once you set up a monitoring tool, it’s not cumbersome afterward.
Having the experience of running production stably is rare. Especially for junior developers. I think if you actively utilize a home server, you can gain a wide range of experiences.
It would be great if you could not only develop side projects but also run them on a home server. Unlike typical software, infrastructure should be approached conservatively. Above all, stability is a priority. Even I haven’t changed my Docker or nginx settings at all in two years. Once you automate it properly, there’s no need to touch it anymore. Occasionally, there’s the hassle of clearing Docker caches or logs, but if you monitor consistently, there won’t be any problems.
- For Those Hesitant About Home Servers
In the previous post, I listed the advantages of a home server. I strongly recommend building a home server from the perspective of experiencing the entire process from start to finish of a service, but I understand there might be situations where you hesitate. You might think there’s no great merit in environments like dormitory buildings or where port forwarding is difficult because it’s hard to expose the service address, but that’s not the case at all.
As long as you have internet access, you can create webhook services like Slack bots. You can even create a news curating bot by automatically scraping news. It’s also possible to build a webhook service on AWS, perform computations on the home server, and receive results on AWS. The only limitations in software are physical and theoretical limits.
Building and operating a home server broadens your perspective. The scope of applying side projects also expands. You create your own testbed where you can boldly take on challenges.
You don’t necessarily need a Mac Mini; you can build a home server using a second-hand PC. Buy a cheap second-hand PC from a marketplace like Danggeun Market, install Linux, and experiment. I’m sure it will help improve your development skills.
This concludes the post. Thank you for reading the two-part series on home server reviews.