Setting up My First Homelab

Setting up My First Homelab

Getting Started: Preventing Sleep Mode on an Old ThinkPad

After setting up Ubuntu Server on an old ThinkPad, I needed to prevent it from going to sleep when the lid is closed. This keeps the server running continuously, especially handy when tucked under my desk.

sudo vim /etc/systemd/logind.conf

In the logind.conf file, I set:

HandleLidSwitch=ignore

Then, to apply the changes:

sudo systemctl restart systemd-logind

Enabling Remote Access: My Apartment’s Network Limitation Installing SSH was straightforward, but connecting to the ThinkPad from outside my apartment was a different story. Since I live in a managed apartment, my internet comes directly from a wall connection, with no access to a personal router. This ruled out typical configurations like port forwarding or Dynamic DNS, as I couldn’t access or modify router settings to enable external connections.

The Solution: Tailscale and JuiceSSH To bypass these restrictions, I needed a way to establish a secure, remote connection without tampering with the apartment’s network. Tailscale offered the perfect solution—a VPN-like, mesh network that connects devices as if they’re on the same local network.

  1. Setting Up Tailscale on the ThinkPad After installing Tailscale on the ThinkPad, it generated a private IP, making it possible to securely connect with other devices on the same virtual network without needing router access.

  2. Connecting My Android with Tailscale I installed Tailscale on my Android device to link it to the same network, allowing it to connect directly to the ThinkPad’s private IP.

  3. Accessing the ThinkPad with JuiceSSH With both devices connected via Tailscale, I opened JuiceSSH on Android, set up a new connection using the Tailscale IP, and was able to SSH into the ThinkPad effortlessly.

Wrapping Up Using Tailscale and JuiceSSH, I achieved a secure, remote setup that bypasses the typical router-based restrictions in a managed network. Now, I can manage, code, or document my homelab from any device, even on the go. This method provides a straightforward, reliable way to access a homelab server in environments where traditional networking isn’t an option, making remote server management accessible and hassle-free.