hello friends! new(ish)!

Home server: Difference between revisions

From InstallGentoo Wiki v2
Jump to navigation Jump to search
>4ab41
(Removed SSH server setup, added to setting up server)
>4ab41
(Added containers)
Line 4: Line 4:
==Hardware==
==Hardware==
Depends on your use case. A simple file server can be run on an SBC with a couple hard drives attached. If you want to do more fancy things like virtualisation, streaming 4K movies, etc you are going to want better hardware. If you plan on using [[ZFS]] or Btrfs, server grade hardware and ECC ram are recommended but not required.
Depends on your use case. A simple file server can be run on an SBC with a couple hard drives attached. If you want to do more fancy things like virtualisation, streaming 4K movies, etc you are going to want better hardware. If you plan on using [[ZFS]] or Btrfs, server grade hardware and ECC ram are recommended but not required.


== Operating systems ==
== Operating systems ==
Line 54: Line 52:
===Software v Hardware===
===Software v Hardware===
Software raid typically has a number of features that are more beneficial than just standard RAID. Best in class at this moment is ZFS which has automatic file self healing and file system level checksums to combat bitrot. Btrfs is also good if you want an alternative to ZFS, but is still in development so be careful. Unraid is more noob friendly (but you pay for it). Snapraid+merger FS is a viable (free) alternative to Unraid if you don't feel like spending money on your OS.
Software raid typically has a number of features that are more beneficial than just standard RAID. Best in class at this moment is ZFS which has automatic file self healing and file system level checksums to combat bitrot. Btrfs is also good if you want an alternative to ZFS, but is still in development so be careful. Unraid is more noob friendly (but you pay for it). Snapraid+merger FS is a viable (free) alternative to Unraid if you don't feel like spending money on your OS.
===ZFS===
===[[ZFS]]===
A long standing, reliable file system and software raid solution that works on BSD and Linux.
A long standing, reliable file system and software raid solution that works on BSD and Linux.


Line 63: Line 61:
If you plan on using RaidZ make sure you know what your array is going to be beforehand, you won't be able to add to it later.
If you plan on using RaidZ make sure you know what your array is going to be beforehand, you won't be able to add to it later.


Server hardware and at least 8gb ECC memory recommended. Using old hardware or consumer hardware is not recommended.   
Server hardware and at least 8gb ECC memory recommended. Using old hardware or consumer hardware is not recommended.
 
==[[Containers]]==
"Containers" are a method of isolating running software from both the host OS and other software. You may also hear them called Jails or Chroot Jails if you are running some variant of BSD (such as TrueNas CORE/FreeNas).
[https://docs.linuxserver.io/ Pre-configured container images].
 
===LXC and LXD===
[https://linuxcontainers.org/ LXC] is the standard Linux containers. Available on most distros. You will likely be using these if you are running a Proxmox server.
Since Linux containers are essentially just separate instances of Linux, you can't run Windows programs in them without using WINE.
LXD is a newer, more user friendly version of LXC. Has better management options for containers.
 
===[https://www.docker.com/ Docker]===
Instead of running as though it was an entire OS like LXC, Docker only virtualizes a single application.
Can run on Windows as well as Linux. You will still need WINE to run Windows apps on Linux.
Freemium software. Base software is free for individuals (you).
 
===[https://podman.io/ Podman]===
An alternative to Docker. Those using Docker can easily switch without issues.
Unlike Docker, it does not use a single large server daemon. Uses "pods" which can contain more than one container.
 
===Jails===
Jails are BSD's version of containers. Since TrueNas Core/FreeNas is freeBSD based you will be using these instead of LXC/LXD.


==Remote access==
==Remote access==

Revision as of 01:13, 20 December 2020

Imbox move.png
Imbox move.png
MOVE CANDIDATE
This page is being proposed to be moved to somewhere else. Relevant discussion may be found on the talk page. Reason: Merge with Setting up a Server

Please note: If you are going to run ANY services that can be accessed from the external internet, beyond the confines of your home, please secure your system per Setting up a Server.

Hardware

Depends on your use case. A simple file server can be run on an SBC with a couple hard drives attached. If you want to do more fancy things like virtualisation, streaming 4K movies, etc you are going to want better hardware. If you plan on using ZFS or Btrfs, server grade hardware and ECC ram are recommended but not required.

Operating systems

OMV is good enough if all you are storing is rarely accessed (pirated) media. Even standard Linux like Ubuntu supports software raid and filesystems like OpenZFS. TrueNAS core (formerly FreeNas) is BSD based and fairly simple to install and use but server grade hardware and ECC memory are recommended.

Linux

You should run Debian, RHEL or CentOS if you want GNU/Linux.

Debian based distros like Ubuntu are easy to work with and have plenty of documentation.

CentOS is a free alternative to RedHat and is also fairly popular.

Ubuntu usually does retarded things with their packages and versions (lib*-ubuntu1.l2), and pulls unstable software from Debian Sid.

Rolling release distros (Arch, Fedora) are not really good for a server, because it's supposed to stay working, and it shouldn't break/change it's behaviour on updates.

Gentoo is usually too much trouble to be worth it, but it's ok.

TrueNAS

You should also consider a NAS-centric operating system for a home server - FreeBSD-based TrueNAS, the successor and replacement for FreeNas. A FreeBSD based OS that utilizes ZFS. Has many available plugins for things like PLEX, bitorrent, and more.

Free software and has simple GUIs to set up your services. Keep in mind it will install to the ENTIRE DRIVE and you won't be able to use the install drive for anything else. Server grade hardware is recommended.

TrueNAS Documentation.

Open Media Vault

Good for storing infrequently changed files like media files.

Website doesn't have much to show for. Check the forums for guides.

Supports Snapraid as a plugin. Can be used with mergerFS to pool drives together. Needed for mergerFS.

Installation guide.

Proxmox

A Linux based Virtualization Environment that has built in ZFS support, Linux container support, and more.

Your CPU must support Virtualization in order to run [1]. (VT-x on Intel, AMD-V for AMD).

ECC Ram is recommended as per usual with ZFS.

Raspberry Pi

If you have a raspberry pi that you want to be put to use, ArkOS is a stable, Arch based distro for running a home server on a raspberry pi with a Web based GUI. ArkOS main website

File Systems and RAID

You may want to consider a RAID array for long-term file storage. RAID is not a backup. Not even RAID 1. RAID doesn't protect against accidental deletion or total failure of an array. We STRONGLY recommend a 3-2-1 backup strategy. 3 Copies, 2 on site, 1 remote. If you cannot afford that, backing up to external drives or the cloud is better than nothing.

Rebuilding a raid array is an intensive process and it's not uncommon for a second disk to fail during the process. Raid 5 and equivalents only offer 1 disk redundancy, so if a disk fails during your rebuild you're fucked. Try to aim for at least two disk redundancy, or do a raid 10 instead.

Software v Hardware

Software raid typically has a number of features that are more beneficial than just standard RAID. Best in class at this moment is ZFS which has automatic file self healing and file system level checksums to combat bitrot. Btrfs is also good if you want an alternative to ZFS, but is still in development so be careful. Unraid is more noob friendly (but you pay for it). Snapraid+merger FS is a viable (free) alternative to Unraid if you don't feel like spending money on your OS.

ZFS

A long standing, reliable file system and software raid solution that works on BSD and Linux.

Supports up to 3 disk redundancy (RaidZ3) and has checksums and self healing to prevent data corruption.

Has some limitations, one major one being expansion is cumbersome.

If you plan on using RaidZ make sure you know what your array is going to be beforehand, you won't be able to add to it later.

Server hardware and at least 8gb ECC memory recommended. Using old hardware or consumer hardware is not recommended.

Containers

"Containers" are a method of isolating running software from both the host OS and other software. You may also hear them called Jails or Chroot Jails if you are running some variant of BSD (such as TrueNas CORE/FreeNas). Pre-configured container images.

LXC and LXD

LXC is the standard Linux containers. Available on most distros. You will likely be using these if you are running a Proxmox server. Since Linux containers are essentially just separate instances of Linux, you can't run Windows programs in them without using WINE. LXD is a newer, more user friendly version of LXC. Has better management options for containers.

Docker

Instead of running as though it was an entire OS like LXC, Docker only virtualizes a single application. Can run on Windows as well as Linux. You will still need WINE to run Windows apps on Linux. Freemium software. Base software is free for individuals (you).

Podman

An alternative to Docker. Those using Docker can easily switch without issues. Unlike Docker, it does not use a single large server daemon. Uses "pods" which can contain more than one container.

Jails

Jails are BSD's version of containers. Since TrueNas Core/FreeNas is freeBSD based you will be using these instead of LXC/LXD.

Remote access

Setting up SSH access enables you to:

Tunneling

Create a tunnel and use it as a proxy for environments that block certain DNS requests or pages and to encrypt your data

Wake on LAN

Turn on a PC on your LAN Arch Wiki guide

Web hosting

Host webpages, use nginx or apache debian nginx guide

Proxy

You can use a proxy guide

Compression

Ziproxy (Opera style web compression, including images)

Media automation

Torrenting

Use a daemon like transmission or deluge

TV Series

You can use a daemon like Sickbeard

Movies

You can use a daemon like Couchpotato

Music

You can use a daemon like Headphones

VoIP

You can use mumble-server (free), ventrilo or teamspeak (non-free)