Post

Internship Stipend Well Spent My First-Ever Homelab Setup

In this comprehensive guide, we will delve into the art of setting up a self-hosted environment using an 8th Gen i5 Lenovo ThinkCenter as our foundation. Wel....

Internship Stipend Well Spent: My First-Ever Homelab Setup

In this comprehensive guide, we will delve into the art of setting up a self-hosted environment using an 8th Gen i5 Lenovo ThinkCenter as our foundation. We’ll cover installation, configuration, and operations of essential services like Pi-hole Next, Cloudflare Access, Tailscale, Bitwarden, and even hosting your personal resume website - all running smoothly on a budget.

Prerequisites

Before we begin, let’s ensure you have the following prerequisites ready:

  1. System Requirements: Install Ubuntu Server 20.04 LTS (Focal Fossa) on your Lenovo ThinkCenter. Ensure it has at least an i5 8th gen CPU, 8GB RAM, and a 256GB SSD.

  2. Software Requirements: Install Docker, Pi-hole Next, Tailscale, Bitwarden, and Nginx with PHP support. Ensure you’re using the latest stable versions for each service.

  3. Network Requirements: Set up a static IP address on your homelab device within your local network. Configure port forwarding rules to access services via their respective ports (e.g., Pi-hole Next on UDP 53).

  4. Firewall Considerations: Open the necessary ports for each service in your firewall settings (UFW by default).

  5. User Permissions: Use a dedicated user with sudo privileges for managing the homelab environment.

Installation & Setup

We’ll walk you through installing and configuring each service step-by-step.

Pi-hole Next

1
2
sudo apt update && sudo apt install -y pi-hole
sudo systemctl enable --now pi-hole

Edit /etc/pihole/gravity.list to include your preferred DNS providers (e.g., Cloudflare).

Tailscale

Install and configure Tailscale according to their official documentation: Tailscale Installation

Bitwarden

Follow the Bitwarden Docker Compose Setup Guide for a smooth setup.

Nginx with PHP Support

1
2
sudo apt update && sudo apt install -y nginx php php-fpm php-mysql
sudo systemctl enable --now nginx

Edit /etc/nginx/sites-available/default and set up a basic configuration for your resume website.

Configuration

Configure each service according to their respective documentation, focusing on security hardening, performance optimization, and customization options. For example, enable Two-Factor Authentication in Bitwarden and Pi-hole Next.

Usage & Operations

Perform routine monitoring, maintenance, backup, and recovery procedures as needed for each service. Consider setting up alerting mechanisms using tools like Nagios or Prometheus.

Troubleshooting

Address common issues such as DNS resolution problems in Pi-hole Next, connectivity issues with Tailscale, or authentication problems in Bitwarden and Nginx.

Conclusion

With this guide, you’ve successfully set up a comprehensive self-hosted environment using your internship stipend. You now have a foundation for further learning and exploration in DevOps and infrastructure management. To take your skills to the next level, consider delving into advanced topics like Kubernetes or Terraform.

For additional resources, visit the official documentation pages for each service: Pi-hole Next, Tailscale, Bitwarden, and Nginx. Happy homelabbing!

This post is licensed under CC BY 4.0 by the author.