How to Build Your Personal Home Server

How to Build Your Personal Home Server

Previously, I shared a lot of content about “home servers,” but some friends feedback that the information was too scattered, leading to many questions after reading. Therefore, I organized the entire process of building a home server and shared my experiences with everyone:

How to Build Your Personal Home Server

Step 1: Choose Hardware

The threshold for a personal server is lower than you think: a second-hand small host for two or three hundred yuan, or an idle old laptop for recycling, or assembling a low-power host with an ITX motherboard and a small case. If you have a sufficient budget and don’t mind the power consumption, you can even buy a tower server. In short, the price range for personal server hardware is very smooth, and you can find suitable options ranging from hundreds to tens of thousands. I recommend starting with a small host or an old laptop.

Common functions of home servers include: home NAS, download machine, smart home server, home theater, living room game console, soft router, surveillance recorder, etc. To meet the above needs, I have the following suggestions for small host hardware:

1. CPU with more than 4 cores and memory of more than 8GB to meet the performance requirements for multitasking;

2. At least 2 hard drive slots, or at least 1 onboard hard drive + 1 2.5-inch SATA hard drive slot (system and data are on two separate hard drives);

3. For small hosts used as soft routers, it is best to have more than 2 network ports, and for multimedia servers, it should support HDMI 2.0 or higher;

I recommend two reference configurations: CPU: J4105 memory: 8G or CPU: N4100 memory: 8G, which should currently be priced around five to six hundred yuan.

Another tip: Small hosts generally use 12V-19V DC power supply, and the cost of low-voltage DC power supply with UPS is much lower than that of AC power supply. There are many mature solutions for 18650 lithium batteries online, which come with DC male and female heads and are ready to use. Therefore, I recommend equipping a charging battery as a UPS for the small host, costing only a few dozen yuan.

How to Build Your Personal Home Server

The most suitable hardware for beginners’ home servers, I believe, is an idle old laptop. The advantages of old laptops are:

1. The laptop comes with a battery, equivalent to having a UPS;

2. The laptop comes with a screen, keyboard, and touchpad, making operation and maintenance convenient without needing other peripherals;

3. The running power of laptops is generally not high, and the power consumption during sleep mode is generally not more than 15W, which is not much higher than that of small hosts;

4. Laptops generally have 3 hard drive slots, making storage expansion convenient (the optical drive slot of the laptop can also be modified into a hard drive slot);

The price of old laptops is close to that of small hosts with the same performance, and you can find laptops that can serve as home servers for five to six hundred yuan. However, I also want to remind you of a few points:

1. The minimum performance of old laptops is recommended to support smooth operation of Windows 10; it is not recommended to choose too old computers even if they are cheap;

2. Lightweight laptops that do not support hard drive expansion and only have onboard hard drives (usually 64G, 128G) are not recommended;

Building your own host is more playable than the above two options. The advantages of a host compared to small hosts and laptops are:

1. It has PCI-E interfaces, providing strong expansion capabilities (installing 10G network cards, SAS disk array cards, etc.);

2. It can customize multi-bay cases, making it more suitable as a home NAS;

3. The performance ceiling is high; if power consumption is not considered, you can directly use high-power CPUs for stronger performance. You can build a decent personal server for around 2000 yuan; for example, a small host with Ryzen 5600G costs less than 3000 yuan, but its performance is not in the same league as NAS at the same price;

If your goal is a true commercial server, then rack servers, blade servers, and tower servers are suitable for home use, with tower servers being the most similar in size to home computers. You can check out Dell’s Power Edge series or HP’s MicroServer Gen series. Standard server hardware is more suitable for enthusiasts in terms of both price and power consumption; for general users, such hardware is severely overkill as home servers.

I believe that after reading the above content, everyone has a basic understanding of how to choose hardware and the price range of hardware. If you need me to recommend specific hardware, you can private message me or leave a comment directly.

Let me share my own hardware solution: since I work in a different location, I have two devices at home and my rental house: an N4100+8G small host (which I bought for 600 yuan) and a 6200U+8G ThinkPad (an idle laptop). I previously also had an HP T610 thin client: AMD T56N+4G (which I bought for 160 yuan), but the main issue was that the performance was not enough.

How to Build Your Personal Home Server

Step 2: Install the System

The technical threshold for personal servers is really not high; the only requirement is knowing how to install the system. When you have tried various systems, you can consider it a successful entry.

What system should the server choose? Unlike enterprise servers, personal servers do not need to consider year-round fault-free operation, redundancy, or even complex firewall settings, so the choice of system is quite free. Most things that NAS can do can also be done by Windows 10 with Docker for Windows installed. So if you don’t want to tinker, just install Windows 10. However, I still strongly recommend a Linux distribution because SSH is just too convenient.

If you want to learn Linux, you need to master three basic skills: 1. Basic Bash shell commands; 2. Basic operations of Vim; 3. Basic operations of SSH. You can find tutorials online to learn these skills.

There are many Linux distributions; I have used Ubuntu (currently in use), Manjaro, and Linux Mint (suitable for low-configuration computers). These can be used out of the box, and there are some online reference materials. For domestic Linux, you can choose Deepin. As for Arch Linux and Gentoo Linux, which require compilation and installation, they are not suitable for beginners. If your personal server has surplus performance (more than 8 cores, more than 32GB of memory) and you want to set up multiple systems, you can learn about ESXi and PVE to run multiple systems simultaneously through virtualization technology. However, I am not very strict about performance; Docker can meet the needs of most usage scenarios, so I have no need to set up ESXi myself.

As for “how to install the system,” I won’t explain it here, but I recommend a magical tool for system installation: Ventoy. After making the installation USB with Ventoy, it will generate two partitions. The smaller partition is the boot partition, while the larger partition is the data partition, where you can place system images and commonly used software packages.

How to Build Your Personal Home Server

After copying the system image to the Ventoy boot USB, set the BIOS to boot from the USB to start installing the system. The most powerful feature of Ventoy is that it supports copying multiple system images at the same time, allowing you to select the image for installation without having to repeatedly create the boot USB. If you are installing and maintaining Windows, and you prefer a more feature-rich PE, I recommend two that are quite useful: YQ and Wei PE; most other PE systems carry a lot of private goods.

Here’s a common misconception among beginners: Do you have to choose between Windows and Linux? First of all, never think about problems with a fandom mindset. Windows and Linux do not need to be mutually exclusive; both systems are very powerful and worth learning. It is more convenient to use Windows daily, but Linux is also very powerful in some professional scenarios.

Step 3: Network Settings

If your server has a public IP address, then accessing the server remotely is not a difficult task. However, most people currently do not have a fixed public IP, so solutions like zerotier and tailscale can help you. I first came into contact with zerotier, so I will take it as an example; tailscale is based on wireguard, which should also work well.

First, register an account on the zerotier official website, then create a virtual LAN on the Networks page. You will get a NETWORK ID, which allows other devices to join the same virtual LAN.

How to Build Your Personal Home Server

Next, install the zerotier client on different devices and join the NETWORK ID you set above. The Windows client has a UI interface, making it relatively simple to operate; I will mainly introduce the operations on the Linux side:

# Install zerotier
curl -s https://install.zerotier.com | sudo bash
# After successful installation, join the network
sudo zerotier-cli join NETWORK ID
# Restart the service to ensure the settings take effect
service zerotier-one restart
# Zerotier mainly has two commands for management: zerotier-cli (operating program) and zerotier-one (server)

In addition to Windows and Linux, zerotier can also be installed on openwrt routers and smartphones. After your devices join the network, there is one more step to do: enter the backend and check the box to allow the device to join the virtual LAN. At this point, you can see the device’s virtual LAN IP in Managed IPs. Through this IP, different devices can communicate as if they are in a LAN. Zerotier is based on UDP communication, so if both sides achieve direct connection, the speed is quite good. If direct connection is not achieved, the speed may drop below 1M with a latency of over 500ms. You can improve network conditions by setting up a moon server, which requires purchasing a cloud server; I will explain how to do this in the zerotier enhancement section.

How to Build Your Personal Home Server

With a virtual LAN, you can set up various services on your home server through Docker and access these services remotely.

Step 4: Deploy Applications

Setting up web services is no longer a difficult operation. The emergence of Docker has made service setup very simple (current operations mainly revolve around cluster maintenance). Docker is based on Linux, but Windows has WSL, so it can also be installed. You can use Docker for Windows or install Docker in WSL. Let’s go into detail:

4.1 Install Docker

Install Docker on Ubuntu

sudo apt install docker.io
sudo systemctl start docker  
sudo systemctl enable docker
# If needed, you can also install docker-compose
sudo apt install docker-compose

To install Docker on Windows, you can go to the Docker official website to download the Docker Desktop for Windows installation package, and just run the installation. From the user experience, I recommend using Docker in a native Linux environment.

4.2 Deploy Applications

Server application deployment is just installing different programs based on demand; it’s hard to cover all this content in a short article. For example, setting up homeassistant as a smart home server involves a lot of content. Therefore, I will continue to supplement this in later articles. Here, I will mainly talk about two methods of application deployment:

The first method is direct installation. Software like Samba and Calibre can be installed directly. Both can be accessed through the LAN, and access can also be done externally through zerotier.

Samba——File Server

Setting up file sharing on Windows is very simple, and installing Samba on Linux is also very simple:

# Install samba
sudo apt install samba

Once installed, simply set the specified folder as shared, and other hosts can access the shared content by visiting the LAN host IP address.

Calibre——Personal E-book Library

The Windows version of Calibre is an installation package, while the Linux version can be installed via command line:

sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin

After installing Calibre, open Calibre to enable content services. All devices within the LAN can access the library through a browser.

The second method is to install via Docker. The advantage of installing via Docker is that it’s simple to install and easy to remove. It can help your server set up a lot of services while saving a lot of configuration time. Docker can also run on Windows; I will continue to explain Docker in detail later, but here I will briefly share a few applications:

For example, the speedtest service, by installing speedtest, you can know the speed between you and your personal server. Installing via Docker is very simple; after installation, just visit: http://local:8090 to perform the speed test.

# Pull the image
docker pull adolfintel/speedtest
# Run speedtest
docker run --restart=always -d -p 8090:80 adolfintel/speedtest

That’s all for now.

END

Selected Previous Articles

Three methods to reinstall a clean version of the system, why do computer stores fear installing a clean version?How many of the 14 different shutdown methods for Win10/11 do you know? 【Tested and Effective】Installation and activation tutorial for genuine Office 2021Installing Win11 into memory, performance is unbeatable

◆ Recommended 15 websites to watch TV dramas and movies for free, with URLs, tested and useful

7 methods to enter BIOS for Win11/10

These 8 high-quality Windows software can turn your computer into a black technology

In just a few steps, teach you how to use WeChat to receive and pay without binding a bank card

How to achieve scheduled power on and off for computers

Recommended 9 websites to watch movies for free, overseas blockbusters, latest movies available for online viewing, with URLs

How to download videos from WeChat video account?Five methods to transfer files between mobile phones and computersIt turns out that removing watermarks from Word and PDF files is so simple, learn it in 1 minuteHuawei mobile phone NFC function, teaching you to copy various cards with one clickCan a mobile phone control a computer or another mobile phone? It’s simple, just follow this operationHow to download videos from WeChat video account?Four methods to crack Windows system passwords 【Save for later】It turns out that removing watermarks from Word and PDF files is so simple, learn it in 1 minuteTeaching you how to recover accidentally deleted photos from WeChat + how to recover photos deleted from the phone?Six major reasons why computers won’t boot and solutions 【Save for later】

How to Build Your Personal Home Server

How to Build Your Personal Home Server
How to Build Your Personal Home Server

How to Build Your Personal Home Server

Leave a Comment