How to turn an old laptop into a home server
An evening, a cable and a laptop from the back of a drawer will give you a quiet server that costs about as much to run as a lamp.
An old laptop makes a good home server. It has a screen for emergencies, a battery that doubles as protection against short power cuts, and it uses about as much electricity as a bedside lamp. Anything made in the last twelve years will do. This guide assumes you have one, a network cable and an evening.
The steps
- Back up and wipe it. Copy off anything you want to keep, then erase the disk. A server should start clean, with no trace of the previous owner's browser history.
- Install a minimal Linux distribution. Choose the plain server edition with no desktop. It uses less memory, has fewer things to break, and you will be working from another machine anyway.
- Give it a fixed address. In your router's settings, reserve one address on the home network for the laptop. Write it on a sticky note and put the note on the lid.
- Stop it sleeping when the lid closes. This is the setting people forget. Without it the server vanishes the first time you tidy the shelf.
- Log in with a key, not a password. Generate a key pair on your main computer, copy the public half across, then disable password login. It takes five minutes and shuts out nearly every automated attack.
- Install one service. Choose something you will use this week, such as a file share or a feed reader. A server with five services you do not use is a hobby you will abandon.
- Schedule a backup. Copy the data to a USB drive weekly. Then, once, restore from the drive to prove that it works.
Keep the laptop somewhere with air around it, not in a cupboard, and clean the fan vents once a year. Check the logs on the first of each month. Most of the time there will be nothing worth reading, and that is what you wanted.
One warning. Do not make the machine reachable from the wider internet until you understand what you are exposing. For a first month, reach it only from inside your own home. A file share that only your household can see is already more useful than most of the services it replaces, and it will not wake you at three in the morning with a message from a stranger.