hello friends! new(ish)!
Home server: Difference between revisions
>Mrsnooze m (category:howto category:hardware category:software) |
>4ab41 (Added hardware, more information on operating systems and RAID. Migrating information from /hsg/) |
||
Line 1: | Line 1: | ||
{{Move||Merge with [[Setting up a Server]]}} | {{Move||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]].''' | '''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 == | == Operating systems == | ||
===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. | [[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 | 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. | [[Gentoo]] is usually too much trouble to be worth it, but it's ok. | ||
You should also consider a NAS-centric operating system for a home server - FreeBSD-based | ===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. | |||
[https://www.truenas.com/docs/hub/ TrueNAS Documentation]. | |||
===Open Media Vault=== | |||
Good for storing infrequently changed files like media files. | |||
[https://www.openmediavault.org/ Website] doesn't have much to show for. Check the [https://forum.openmediavault.org/ forums] for guides. | |||
Supports Snapraid as a plugin. Can be used with mergerFS to pool drives together. [https://omv-extras.org/ Needed for mergerFS]. | |||
[https://forum.openmediavault.org/index.php?thread/23005-installation-and-setup-videos-beginning-intermediate-and-advanced/ Installation guide]. | |||
===RaspPi=== | |||
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. [https://arkos.io ArkOS main website] | 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. [https://arkos.io ArkOS main website] | ||
==Centralized storage== | ==Centralized storage== | ||
One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or samba, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronized. | One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or samba, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronized. | ||
You may want to consider a [[RAID]] array for long-term file storage. RAID is not backup, but will protect your files in case of drive failure. NAS4Free allows you to easily set up RAID arrays using UFS or ZFS. | You may want to consider a [[RAID]] array for long-term file storage. RAID is not backup, but will protect your files in case of drive failure. NAS4Free allows you to easily set up RAID arrays using UFS or ZFS. Use Mdadm + LVM, ZFS on Linux (ZoL), or Snapraid + mergerFS for Raid | ||
==Remote access== | ==Remote access== |
Revision as of 00:22, 20 December 2020
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
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.
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.
RaspPi
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
Centralized storage
One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or samba, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronized.
You may want to consider a RAID array for long-term file storage. RAID is not backup, but will protect your files in case of drive failure. NAS4Free allows you to easily set up RAID arrays using UFS or ZFS. Use Mdadm + LVM, ZFS on Linux (ZoL), or Snapraid + mergerFS for Raid
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)
Setting Up an SSH Server
On Windows
- Download Cygwin
- Choose "Install From Internet"
- Choose a mirror to download from
- When you get to the "Select Packages" screen, search SSH
- Choose to install the "Bin" version of the "openssh" package
- Download all dependencies and wait for setup to complete
- Open Cygwin and wait for the initial setup to complete
- Type "ssh-host-config" without the quotes
- Say yes when you get asked about privilege separation
- Say yes when asked to create a local user named sshd
- Say yes when asked to install sshd as a service
- When you see "CYGWIN=", type "ntsec tty" without the quotes (this guideexplains why)
- You should be done now setting up the SSH server. To start it, type "net start sshd" without the quotes.
If you see:
The CYGWIN sshd service is starting. The CYGWIN sshd service was started successfully.
Then everything went correctly. If not, you should Google the error.
On OS X
Simply go into sharing permissions and enable fucking everything.
GNU or BSD based systems
1. You usually enable the ssh server during the installation. Do this if possible, it is the simplest way.
2. If you did not setup sshd to auto start you can type:
/etc/rc.d sshd start
, if you use System V init.systemctl enable sshd.service && systemctl start sshd
, if you use systemd.
3. If that does not work, you need to install sshd
with your package manager.
Post-setup
- Forward port 22 to the server (Here's a guide if you don't know how)
- OPTIONAL: Assign the server an address, so you can type server.com instead of XXX.XXX.XXX.XXX (Read this)