Give an old laptop a second life
From dusty drawer to data center. A very small data center.
That laptop in the drawer has a built-in battery backup, a screen for emergencies and very low power use. In other words, it's a great first server. You'll install Linux, manage it remotely, and run your first app in a container.
🧰 What you need
- An old laptop (anything from roughly the last ten years with 4 GB of RAM or more)
- A USB stick of 8 GB or more
- Another computer to control it from
Let's build it
Make an installer USB
Download Ubuntu Server LTS and write it to the USB stick with balenaEtcher or Rufus. This erases the stick.
Install Ubuntu Server
Boot the laptop from the USB (usually F12, F2 or Esc at power-on). Follow the installer, and when asked, tick Install OpenSSH server. This wipes the laptop, so save anything you need first.
Find it and log in remotely
After it reboots, log in on the laptop and run ip a to find its address. From now on, work from your main computer:
ssh your-username@192.168.1.60Keep it running with the lid closed
sudo nano /etc/systemd/logind.confFind the line #HandleLidSwitch=suspend, change it to HandleLidSwitch=ignore (removing the #), save with Ctrl+O, exit with Ctrl+X, then:
sudo systemctl restart systemd-logindUpdate it
sudo apt update && sudo apt upgrade -yInstall Docker
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USERLog out and back in so the group change applies.
Run your first app
docker run -d --name hello-web --restart unless-stopped -p 8080:80 nginx✅ How you know it worked
On any device at home, open http://192.168.1.60:8080. "Welcome to nginx!" means you have a working server running an app in a container.
💥 Break it on purpose
Run docker stop hello-web and reload the page: gone. docker start hello-web and it's back in a second. Then try docker rm -f hello-web and run the command from step 7 again. The app is recreated from scratch in seconds. That's the magic of containers: the app is disposable.
🧠 What's really going on
Ubuntu Server is Linux without a desktop, so almost all of the laptop's power goes to what you run on it. SSH lets you control it from anywhere on your network. Docker packages an app with everything it needs into a container, isolated from the rest of the system, and -p 8080:80 connects port 8080 on the laptop to port 80 inside the container.
← Back to all network labs · Stuck? Email me