We are still actively working on the spam issue.
Difference between revisions of "Home Server v2"
(→SmartOS) |
(→unRAID) |
||
Line 114: | Line 114: | ||
===unRAID=== | ===unRAID=== | ||
+ | [https://unraid.net/ UnRAID] advertises itself as the "NAS OS for gamers". Not free, you need to fork over some money to buy it. Supports differently sized physical disks and adding hard drives to expand as needed. | ||
+ | |||
+ | Unraid 6.8.3-6.9.2 | ||
+ | *SHA256: 18F75CA34A39632DC07270510E453243753CFF302F3D5ADD4FA8813D4ADB304D | ||
+ | *magnet:?xt=urn:btih:180782e4ff3e00b7efc8a0529239b896e0557f72&dn=unraid692.7z | ||
==Containers== | ==Containers== |
Revision as of 17:26, 19 February 2024
Contents
Home servers are about learning and expanding your horizons. De-botnet your life. Learn something new. Serving applications to yourself, your family, and your frens feels good. Put your /g/ skills to good use for yourself and those close to you. Store their data with proper availability redundancy and backups and serve it back to them with a /comfy/ easy to use interface.
Most people get started with NAS. It’s nice to have a /comfy/ home for all your data. Streaming your movies/shows around the house and to friends. Know all about NAS? Learn virtualization. Spin up some VMs. Learn networking by setting up a pfSense box and configuring some VLANs. There's always more to learn and chances to grow. Think you’re god tier already? Setup openstack and report back to /hsg/.
Things that are online today might not be online forever. It's good to have a copy of something because you never know when it might get taken down due to copyright strikes.—Anon, Standard /hsg/ OP
Welcome to /g/'s comprehensive guide on home servers! This guide is designed to assist you in setting up and managing your own home server, effortlessly navigating through the complexities that come with running servers in your personal spaces such as your basement or closet.
"Homelab" is a term you may have encountered, but what does it signify? Essentially, it refers to a personal data center located within your own home. It serves as a platform for acquiring new skills and solving technical problems in your own life. Many are drawn to this hobby by the promises of freedom from the winds of the larger internet. Within this homelab are your home servers. There can be as many, or as few, as you want.
Contrary to what some may suggest, there are no hard and fast rules in this hobby. However, there are certainly less effective ways of doing things. This guide aims to help you steer clear of common pitfalls that beginners often encounter.
What Can I do With a Home Server?
There are two reasons a man will run a home server:
- Solve a problem. Maybe he was fed up with cloud storage or maybe he was tired of the constant service outages? Or maybe the solution to his problem doesn't exist yet? Either way, he knows he can do it better himself.
- Learn a new skill and get a new hobby. Home servers and homelabs can scale infinitely. There is always room to learn something new or do things slightly different.
If you're here and considering building a lab, you probably already have a purpose in mind. If not, check out awesome-selfhosted for a gigantic list of applications you can host yourself. Some applications popular with /hsg/ anons include:
- Media streaming
- File storage
- NAS servers
- Game servers
- Personal websites
Your First Server
The first step to setting up your homelab is to acquire your first server. You have a few options to choose from:
- Old desktop machines
- Single board computers like the Raspberry Pi, Intel NUCs, or thin clients
- Used servers
- Build your own
Your old gaming PC, workstation, or laptop is a great option for a home server (provided it is not too old). Performance and capability will vary from machine to machine. When in doubt, post specs in /hsg/ and ask. Laptops are not really designed for 24/7 use but their battery does act as a built in UPS.
Hardware you already own is free, which is very appealing and a great way to get started. Keep in mind that older hardware can be less energy efficient and if power usage is a concern you may want to purchase newer hardware.
There is a lot of discussion about power efficiency in the homelab world. Part of that is because some people live in regions where electricity costs significantly more. But more often than not it's because our homelab has grown to the point where it eats a third to half of the power bill. This is a worthy investment for some but others aren't willing to spend that much. You need to decide how important power efficiency is to you.
Building a NAS
"uh guys, how do i build a nas?" is the most frequently asked question on /hsg/. Here's a dedicated section to point to when someone asks this question for the tenth time in a row.
Pro-tip: you will want a separate boot drive to install the OS onto. Your storage pool will be used exclusively for storing data.
If you are interested in a prebuilt system, check out Synology or QNAP. Many anons rag on Synology for being "underpowered" and "not worth the money" but what Synology does best is being a complete functional package that just works. Sure, it may be more cost effective on paper to build your own NAS but if you want something that will run forever with no maintenance then a Synology device could be perfect for you.
Building a Media Server
This is the second most asked question on /hsg/.
Basically, a media server can be as complex as something like Jellyfin and Plex or as simple as a network share that you play using VLC. The media server route is suited for serving multiple users at once (such as family and friends). It also works well when traveling or streaming on many different devices. On the other hand, the network share excels at simplicity.
Operating Systems
Looking for a server operating system? Check out the full list of the popular server operating systems.
Hypervisors
A hypervisor is a system that creates and runs virtual machines. The machine the hypervisor runs on is called the host machine, and each virtual machine (VM) is called a guest machine. Virtualization is the process of running an operating system in a virtual machine and allows for a more efficient use of computing resources.
Instead of installing all your services and applications on a bare-metal server, instead run each in its own VM. This makes management much simpler (and contains any mistakes you make to only that VM).
In order to run a hypervisor, your CPU must support virtualization. The tech is called VT-x on Intel and AMD-V for AMD. Directed I/O support is required if you wish to pass devices from the host machine to the VMs (VT-d on Intel, AMD-Vi for AMD). Nearly every CPU and motherboard made within the past 10 years supports these technologies, but older hardware may have compatibility issues and lack more modern virtualization tech.
Proxmox Virtual Environment
Proxmox is the premier open-source virtualization platform. If you're looking for a hypervisor, Proxmox is it.
Features:
- Built on Debian.
- Utilizes KVM, QEMU for virtual machines.
- Runs containers using LXC.
- Built in ZFS support and other advanced storage technologies.
- Tight integration with Proxmox Backup Server.
VMware ESXi
Those who work in IT will almost certainly be familiar with VMware ESXi. It's the most popular, feature rich hypervisor available. Unfortunately, it is a paid product and has a limited free tier with a limit of 8 cores per VM. No vSphere or most vStorage options like vMotion and distributed switching. These restrictions are probably fine for the non-professional homelab user but if you find yourself limited, try Proxmox.
If you use version 6.5 or 6.7 you can use this key to unlock all these features:
- vCenter: 0A0FF-403EN-RZ848-ZH3QH-2A73P
- vSphere: JV425-4h100-vzhh8-q23np-3a9pp
VMware 7.0 has dropped support form westmere-EP/gulftown (x5xxx) CPU's. If your system has these old CPU's you should consider upgrading to something later than Sandybridge if you want to use the latest version of ESXi.
SmartOS
If you are looking to get back to your roots, check out SmartOS. An open source spiritual successor to Oracle's Solaris. Home_Server/Operating_Systems#SmartOS
Storage-Focused (NAS) Operating Systems
These are operating systems that are designed to store and serve data over a network. While some of these have minor virtualization capabilities, if you are looking to run VMs and/or containers you should consider a true hypervisor like Proxmox. You could always virtualize your NAS.
TrueNAS
TrueNAS is a NAS appliance operating system that uses ZFS.
TrueNAS has two versions: CORE and SCALE. Both accomplish the same task.
CORE (formerly FreeNAS) is based on FreeBSD. This version is considered more stable.
SCALE is more recent than CORE and based on Linux. This version sports better hardware compatibility and stronger virtualization features. Can host Docker containers.
Open Media Vault
unRAID
UnRAID advertises itself as the "NAS OS for gamers". Not free, you need to fork over some money to buy it. Supports differently sized physical disks and adding hard drives to expand as needed.
Unraid 6.8.3-6.9.2
- SHA256: 18F75CA34A39632DC07270510E453243753CFF302F3D5ADD4FA8813D4ADB304D
- magnet:?xt=urn:btih:180782e4ff3e00b7efc8a0529239b896e0557f72&dn=unraid692.7z
Containers
Containers are a method of isolating running processes from the host OS and other processes. BSD calls them "Jails".
There are a number of reasons why containers are neat:
- Less overhead than standard virtual machines because you aren't virtualizing the entire kernel.
- Process isolation.
- Containers are portable (even more so than VMs). You can create a container, configure it however you want, and deploy it again somewhere else.
- Like VMs, removing containers, rebuilding from scratch, or restoring a backup is easy.
- Containers are incredibly easy to deploy and you can find pre-built container images online.
There are two types of containers: application and system. Application containers, such as Docker, are designed to package and run a single service. Once the application is packaged, it can be tested and deployed to different environments without any changes. This makes it easy to scale and manage the application.
System containers, on the other hand, are designed to simulate a full system. They are more like lightweight virtual machines. They can run full-featured environments, system services, and even contain their own process space, users, network stacks, and file systems. Examples of system containers include LXC.
Regardless of the route you decide to go, the best practice is to keep the host OS as clean as possible and install each individual application (such as PLEX, Samba, etc) in their own container.
Docker
Instead of simulating an entire Linux OS (like LXC), Docker virtualizes a single application. This makes management easy and safe since your applications never touch the base file system.
While popular and easy to learn, Docker has some downsides. Some people go overboard with Docker containerization and make things more complicated than they need to be. But Docker can excel when used in the right situations.
There are a number of platforms that make managing your numerous Docker containers easy:
Portainer: provides a GUI to "manage all your orchestrator resources (containers, images, volumes, networks and more)".
Podman: not strictly Docker. A platform to run all sorts of containers.
LXC
If you are considering LXC, take a look at Proxmox and its built-in LXC support. It offers a very convenient platform that makes container management a breeze.
benefits of containers
what are unprivileged vs privileged containers and why privileged containers break the container philosophy and introdcue security risks (just use a vm if you need a privileged container)
Hard Drives
Home_Server/Shingled_Magnetic_Recording
RAID
explain raid philosopy. why don't we just connect a bunch of disks and call it good ("disk 1 for pictures, disk 2 for videos, etc")?
don’t be greedy. 50% storage efficiency is plenty
Raid is an expansive subject so it's gotten it's own page.
If you are interested in file systems, check out the dedicated page on file systems.
Backups
specialized backup servers make backups effortless and automatic and restoring easy
Proxmox Backup Server
Networking
Switches
Routers
Multi-Gig LANs
Security
Opening to the Wider Internet
VPNs
Wireguard
OpenVPN
Mesh VPNs
Nebula
Tailscale
UnattendedUpgrades
Monitoring
Monitoring allows you to detect when things break rather than having months go by before discovering that something is wrong. Even if you have only one machine a monitoring platform can be helpful. Some good options include Icinga2, Zabbix, and Uptime Kuma.