How to Set Up a Home Linux Server on an Old PC
The old desktop in the closet is not junk. It has a processor, RAM, a power supply and drive bays, which is everything a home file and media server actually needs. What it lacks is a job, and giving it one takes about an evening.
This is the path worth walking: choose the machine, install Linux, share folders across Windows and macOS, stream films to the television, and back the whole thing up. Every piece of software involved is open source and runs happily on hardware nobody else wants.
What Old Hardware Can Realistically Do
Almost any x86-64 machine from the last decade will serve files without complaint. Four gigabytes of RAM is enough for a bare server; eight makes room for containers and a media library that has to scan metadata. A small SSD for the operating system transforms the experience, because spinning disks are slow at the thousands of tiny reads a server does all day. Bulk storage can stay on mechanical drives.
Two things deserve honest scrutiny before you commit. First, power. An older tower can idle in the tens of watts, and that runs continuously. It is not a reason to stop, but it is a reason to prefer a compact machine over a full gaming rig from 2012. Second, the drives. Install smartmontools, run a short self-test on every disk you plan to use, and read the reallocated sector count. A drive with a troubled history belongs in the recycling bin, not your only copy of family photos.
Wired networking matters more than CPU speed. Plug the server into the router. Wi-Fi will work, but large file transfers over it are miserable.
Pick a Distribution Without Overthinking It
Debian or Ubuntu Server
These are the sensible defaults. Debian is stable, quiet, and documented by two decades of forum posts. Ubuntu Server ships slightly newer packages and easier driver support. Either installs without a graphical desktop, which is exactly what you want: less to update, less to break, more memory left for services.
If You Want a Web Dashboard
Some people prefer clicking to typing. Cockpit gives a browser interface for storage, services and logs on top of a normal Debian install. OpenMediaVault and TrueNAS SCALE go further and build an entire NAS experience around a web UI. They are good projects, but they hide the plumbing, and when something goes wrong you still need to understand the plumbing. Starting with a plain server install teaches you more and constrains you less.
Install Linux and Lock Down the Basics
Write the ISO to a USB stick with balenaEtcher or dd, boot it, and accept the defaults. Then work through this list before you install anything fun:
- Create a normal user account with sudo rights. Never work as root.
- Update everything: sudo apt update, then sudo apt full-upgrade.
- Generate an SSH key on your laptop and copy it over with ssh-copy-id. Once key login works, disable password authentication in the SSH config.
- Give the machine a fixed address. A DHCP reservation on your router is simpler than editing netplan, and it survives reinstallations.
- Install unattended-upgrades so security patches arrive without you remembering.
- Enable the firewall: ufw allow ssh, then ufw enable.
Do not forward SSH through your router to the open internet. If you need access from outside the house, use a VPN such as WireGuard or Tailscale instead. It is less work and far safer.
Share Files Across the House
For a mixed household, Samba is the tool that matters. Windows, macOS, Android and Linux all speak SMB natively, so a single Samba share appears in Finder and File Explorer without extra software.
- Samba for anything that touches Windows or a Mac.
- NFS for Linux-only shares. Faster and simpler, but it trusts client IPs, so keep it inside the LAN.
- Syncthing if you would rather sync folders peer to peer than mount a network drive.
Permissions cause most Samba frustration. Create matching users and group IDs on the server, and give the share a group with write access. Set the minimum protocol to SMB3 in smb.conf, since old SMB1 support is a liability, not a feature. Add each user with smbpasswd -a, then restart the service.
A share your family cannot write to is a share they will stop using. Test with a real file from a real laptop before you call it done.
Turn It Into a Media Server
Jellyfin is the obvious choice for a fully open source media server. It organises films, shows and music, serves them to browsers, phones, smart TVs and Kodi, and never asks for a subscription. Plex is more polished in places, but Jellyfin keeps everything on your own hardware.
Install it from the project's repository or run it as a Docker container. Point its libraries at your storage directories and let it scan. Then follow two rules that save hours of confusion: name files the way the scrapers expect, with the title and year, and keep each film in its own folder. Metadata problems are almost always naming problems.
Transcoding is the only demanding task. If your CPU has Intel Quick Sync, enable hardware transcoding in the Jellyfin dashboard and it will handle multiple streams without breaking a sweat. Without it, store media in a format your players can play directly, such as H.264 in MKV, and let the server pass files through untouched.
For music, Navidrome is a lighter alternative that streams your library with a Subsonic-compatible API, so dozens of phone apps can connect to it.
Backups, Health and Power
Your server is not a backup. It is a convenient place to keep files, and it will eventually fail. Follow the old rule: three copies, on two kinds of media, with one off-site. A USB drive you rotate to a relative's house is unglamorous and effective. On the software side, restic or borg gives you encrypted, deduplicated snapshots; rsync is fine for simple mirrors.
Configure smartd to email you when a disk starts reporting problems. Put the machine on a small UPS if your power flickers, because sudden shutdowns damage filesystems. And keep the chassis somewhere with airflow rather than a sealed cupboard.
Keep It Running for Years
Resist the urge to install everything at once. Add one service, use it for a week, then decide whether the next one is worth it. Keep a plain text file listing what you installed, which ports it uses and where the config lives; future you will be grateful. Save the installer USB and your SSH key somewhere safe. Update monthly, check the logs occasionally, and let the machine do the boring work of holding onto your files while you get on with something else.
Photo: panumas nikhomkhai / Pexels





