← All Writing
March 6, 20268 min read

How I Turned an Old Laptop Into a Headless Linux Server

Repurposing a 2011 gaming laptop into an always-on home server running Linux Mint — closed lid, no monitor, SSH access from anywhere

YieldAn always-on home Linux server you can SSH into from any device, running automated jobs 24/7 without a monitor
DifficultyBeginner–Intermediate (OS install, SSH config, systemd basics — no prior Linux required)
Total Cook Time~3 hours: OS install and config (~2 hrs) + SSH remote access setup (~1 hr)

Ingredients

The Problem: Automation Needs a Home

After building a few automated systems on my Mac — Garmin health recaps, website monitoring, AI batch jobs — I ran into the same wall: my Mac has to be awake for any of it to work. Sleep mode, lid close, a reboot for an update — any of it kills the cron jobs. I was waking up to missed recap emails more often than I wanted.

What I wanted was a machine that just… runs. Always on. Always connected. Something I could SSH into from anywhere, offload all my scheduled jobs to, and forget about. A home server.

I had an old gaming laptop from 2011 sitting in a closet. Small form factor, barely bigger than a MacBook Air, and it still works fine. The GPU is ancient, but for running Python scripts and shell jobs overnight, it’s overkill. The hardware was free. The OS was free. The whole project cost me an afternoon.

Session 1: Installing Linux Mint and Going Headless

Afternoon — ~2 hours

Pace: Methodical. OS installs have a lot of waiting. The configuration work was quick once the system was up.

Why Linux Mint?

I didn’t want to fight the operating system — I wanted to use it. Linux Mint is the most beginner-friendly Linux distribution available. It looks like a normal desktop, has a real package manager, and its hardware compatibility is excellent even for older machines. Ubuntu would have worked too, but Mint has slightly less friction out of the box.

For a headless server (no monitor, no desktop), a lot of guides recommend Ubuntu Server. I chose the full Mint desktop install anyway — I wanted the option to plug in a monitor and navigate normally if something went wrong. Once configured, the desktop just sits unused in the background. No real downside.

Phase 1: Flash the Installer

Downloaded the Linux Mint 22.1 ISO (~2.7GB), opened balenaEtcher, selected the ISO, selected the USB drive, clicked Flash. About 8 minutes. Plug the USB into the laptop, boot to the BIOS (F2 on mine), set the boot order to USB first, save and exit.

🔧 Developer section: Boot order change

From there, the Mint installer is a guided wizard. Chose "Erase disk and install Linux Mint," set a username and password, let it install. Took about 20 minutes. Rebooted, removed the USB, and was looking at a Linux Mint desktop.

Phase 2: Keep It Running with the Lid Closed

By default, closing a laptop lid suspends the machine. That defeats the purpose of a home server. One config file change fixes it:

🔧 Developer section: Lid close behavior

Closed the lid. The machine kept running. That’s the whole trick for "headless" — it’s not a special mode, it’s just telling the OS to ignore the lid sensor.

Power tip

Also disable auto-suspend in Power Settings (System Settings → Power Management → set suspend to "Never"). The logind.conf handles the lid, but the desktop power manager has its own idle sleep timer that can override it.

Phase 3: Install SSH Server

SSH (Secure Shell) is what lets me connect to the server from my Mac — I type a command in Terminal, it opens a session on the laptop as if I were sitting in front of it. Linux Mint doesn’t come with an SSH server running by default, but installing it takes 30 seconds:

🔧 Developer section: SSH server setup

First SSH test from my Mac: ssh username@[your-lan-ip] — use the IP from hostname -I. It prompted for the password I set during install. Typed it. Got a shell prompt on the laptop. Done.

Phase 4: Static IP via the Router

Dynamic IPs change. If the router assigns a new IP to the laptop overnight, my SSH config breaks. The fix: tell the router to always give the laptop the same IP. This is called a DHCP reservation (or "static IP") and every home router supports it.

🔧 Developer section: DHCP reservation (Google Wifi / Nest)

Now the IP never changes. Every SSH connection I make from my Mac goes to the same address, every time.

Session 2: SSH Config and Remote Access from Anywhere

Evening — ~1 hour

Pace: Fast. SSH config is mostly just editing one file and copying a key.

SSH Key Authentication

Typing a password every time I SSH in gets old fast. SSH keys replace passwords with a cryptographic key pair — a private key that stays on my Mac, and a public key that lives on the server. Once set up, I connect with no password prompt at all.

🔧 Developer section: SSH key setup

SSH Alias in ~/.ssh/config

Typing the full IP every time is fine but not ergonomic. A few-line config entry cuts it down to a single alias:

🔧 Developer section: ~/.ssh/config entry

On the local network

The SSH alias works instantly when you’re on the same WiFi. From outside your home network (a coffee shop, traveling), you’ll need either a VPN or port forwarding on your router. I handled this with port knocking — covered in the next post.

Setting the Hostname

The default hostname after install was something generic. I changed it to something short and recognizable — easy to remember at a glance in terminal prompts:

🔧 Developer section: Change hostname

Final Output

A fully operational home Linux server that:

Terminal — Mac → Home Server
$ ssh homeserver
Welcome to Linux Mint 22.1

user@homeserver:~$ uptime
07:14:23 up 12 days, 4:02, 1 user, load average: 0.08, 0.06, 0.05

user@homeserver:~$ hostname -I
192.168.x.x

One command from the Mac. The server responds instantly — lid closed, in another room.

What went fast

What needed patience

The hardware cost $0 (it was collecting dust). The OS cost $0. The total investment was an afternoon and a USB drive I already owned. The return is a machine that runs every script, job, and service I throw at it — indefinitely, without asking.

Once it was running, the obvious next question was: how do I make it secure? Especially for SSH access from outside the home network. That’s the next post.

← Back to all writing