Home Servers: Difference between revisions

From Bibliotheca Anonoma
No edit summary
 
(17 intermediate revisions by 2 users not shown)
Line 5: Line 5:
== Why run a Home Server? ==
== Why run a Home Server? ==


* Personal Cloud - It's time to make your own cloud. And you'll probably be all the better for it.
* [[Personal Cloud]] - It's time to make your own cloud. And you'll probably be all the better for it.
* IRC Bouncer - Stick around and get all the chat history and private messages using an IRC Bouncer.
* IRC Bouncer - Stick around and get all the chat history and private messages using an IRC Bouncer.
* Torrent Seedbox - If you're in college, you had better avoid using p2p on their guarded networks. Take the responsibility on yourself by downloading from a home seedbox.
* Torrent Seedbox - If you're in college, you had better avoid using p2p on their guarded networks. Take the responsibility on yourself by downloading from a home seedbox.
* You could also get a real seedbox which has protections against reports.
* You could also get a real seedbox which has protections against reports.
Explore other types of home servers [[Home Servers/Types|in this article.]]


== When to move to a real Server ==
== When to move to a real Server ==
Line 18: Line 20:


Guides to configuring Debian home servers.
Guides to configuring Debian home servers.
=== Hardware ===
* [[NAS/Devices]]
* [[Seedbox]]


=== Installation ===
=== Installation ===
Line 29: Line 36:
* [[Port Forwarding]] - To remotely access a server on the open internet, you must port forward the services.
* [[Port Forwarding]] - To remotely access a server on the open internet, you must port forward the services.
* [[Static IP]] - You should set a static IP for a server within the router DHCP subnet.
* [[Static IP]] - You should set a static IP for a server within the router DHCP subnet.
* [[Reverse SSH Tunnel]] - If necessary, an SSH reverse proxy allows devices to communicate to a server under a firewall disallowing incoming traffic.


=== Remote Access ===
=== Remote Access ===


* [[SSH]] - Remotely administer your server.
* [[SSH]] - Remotely administer your server. Also use SFTP, SSH Tunneling, X11 Forwarding, Reverse SSH Tunneling.
* [[SFTP|SSH#sftp]]
* [[SSH/Client]] - Access the SSH Server.
* [[SSH Tunneling|SSH#ssh-tunneling]]
* [[X11 Forwarding|SSH#x11-forwarding]]
* [[Reverse SSH Tunneling|SSH#reverse-ssh-tunneling]]
* [[SSH Client]] - Access the SSH Server.
* [[OpenVPN]]
* [[OpenVPN]]
* [[WebDAV]]
* [[WebDAV]]
* [[FTP]]
* [[FTP]]
* [[DNS]]
* [[DNS]] - You can use duckdns.org if you don't want to pay for a domain name, or namecheap if you do.
* [[DuckDNS|DNS#DuckDNS]]
* [[Shell]] - Which command line shell to use. Some modifications can significantly make your life much better.
* [[Namecheap|DNS#Namecheap]]


=== Services ===
=== Services ===
Line 49: Line 52:
* [[Torrents]] - Torrent Servers
* [[Torrents]] - Torrent Servers
* [[IRC Bouncer]] - IRC Bouncers are critical to idling on IRC servers and receiving private messages.
* [[IRC Bouncer]] - IRC Bouncers are critical to idling on IRC servers and receiving private messages.
* [[Quassel|IRC Bouncer#Quassel]] - Effective, elegant, and powerful IRC client for multiple platforms, including Android.
** [[IRC Bouncer#Quassel|Quassel]] - Effective, elegant, and powerful IRC client for multiple platforms, including Android.
* [[ZNC|IRC Bouncer#ZNC]] - Great for Palaver (iOS).
** [[IRC Bouncer#ZNC|ZNC]] - Great for Palaver (iOS).
* [[Web Server]] - Which web server is right for you?
* [[Web Server]] - Which web server is right for you?
* [[Syncthing]] - A dropbox replacement and multi-server replication solution,


=== Storage ===
=== Storage ===
Line 58: Line 62:
* [[LVM]] - Alternatively, Logical Volume Management allows partitions to be expanded or resized at will.
* [[LVM]] - Alternatively, Logical Volume Management allows partitions to be expanded or resized at will.
* [[fstab]] - Automount partitions at boot.
* [[fstab]] - Automount partitions at boot.
* [[SSD]] - Optimizations for ssd storage
* [[Bind Mount Directories]]
* [[Bind Mount Directories]]
* [[NAS]] - Build a Network Attached Storage array.
* [[NAS/Devices]] - Build a low power Network Attached Storage array for the home.
* [[Object Storage]] - Beyond 4TB RAID rebuild times start to become ineffective. Ceph and other object storage options will have to be explored.
* [[LTO Tape]] - The holy grail of archival storage on the cheap.
* [[LTO Tape]] - The holy grail of archival storage on the cheap.
* [[LTO Tape SCSI]]
** [[LTO Tape/SCSI]]
* [[LTO Tape FC]]
** [[LTO Tape/FC]]
* [[LTO Tape SAS]]
** [[LTO Tape/SAS]]
* [[Disk Recovery]] - If you accidentally blew away your partition table, you'll have to recover the data.
 
=== Computing ===
 
* [[GPU/Processing]] - A GPU can be used for much more than just games.


=== Misc ===
=== Misc ===
Line 69: Line 80:
* [[Disable Lid Suspend]] - Don't suspend when the laptop lid is down.
* [[Disable Lid Suspend]] - Don't suspend when the laptop lid is down.
* [[Disable PC Speaker Beep]] - It can be annoying if you accidentally press a wrong command and your server at home beeps randomly.
* [[Disable PC Speaker Beep]] - It can be annoying if you accidentally press a wrong command and your server at home beeps randomly.
* [[Systemd/Nspawn]] - Used to create simple linux containers under the same kernel.


== Dedicated Server ==
== Dedicated Server ==
Line 78: Line 90:
Always thoroughly test your dedicated server before you use it.
Always thoroughly test your dedicated server before you use it.


* [[Memtest]] - Test the sanity of your memory (especially non-ECC)
* [[Memtest]] - Test the sanity of your memory (especially non-ECC). use memtest86++ at boot (included on most linux distro livecds).
* [[Hard Drive Test]] - Test the reliability of your hard drives.
* [[Hard Drive Test]] - Test the reliability of your hard drives.
* [[Speed Test]] - Test connection speeds and peering worldwide, as well as read/write speeds.
* [[Speed Test]] - Test connection speeds and peering worldwide, as well as read/write speeds.

Latest revision as of 17:59, 27 October 2018

This is a guide to configuring a quick Debian Home Server (with some guides about CentOS), made to be accessed anywhere on the Internet. It is made for use with old laptops and ARM dev boards, since both computers save power.

Running a home server is a very useful way to gain experience before managing actual dedicated server blades in the cloud.

Why run a Home Server?[edit]

  • Personal Cloud - It's time to make your own cloud. And you'll probably be all the better for it.
  • IRC Bouncer - Stick around and get all the chat history and private messages using an IRC Bouncer.
  • Torrent Seedbox - If you're in college, you had better avoid using p2p on their guarded networks. Take the responsibility on yourself by downloading from a home seedbox.
  • You could also get a real seedbox which has protections against reports.

Explore other types of home servers in this article.

When to move to a real Server[edit]

  • Redundancy and Reliability - Old hard drives are definitely at the bottom of the barrel when it comes to reliability, so make backups. Building systems to increase redundancy requires a RAID array (which may require a lot more than just 5-6 SATA ports), and reliability demands ECC (error-correcting) RAM.
  • Public Websites/Datacenters - Unless your server is at a small business building, public websites or data hosts should not be served from your house (unless you want your ISP to raise your bill).

Home Server[edit]

Guides to configuring Debian home servers.

Hardware[edit]

Installation[edit]

  • Debian Netinstall - Barebones system with only what you need.
  • Crunchbang - God Save the Crunch. Minimal Desktop Debian, with BunsenLabs and CB++.
  • CentOS - What if Red Hat Linux was free?

Network Configuration[edit]

  • Port Forwarding - To remotely access a server on the open internet, you must port forward the services.
  • Static IP - You should set a static IP for a server within the router DHCP subnet.
  • Reverse SSH Tunnel - If necessary, an SSH reverse proxy allows devices to communicate to a server under a firewall disallowing incoming traffic.

Remote Access[edit]

  • SSH - Remotely administer your server. Also use SFTP, SSH Tunneling, X11 Forwarding, Reverse SSH Tunneling.
  • SSH/Client - Access the SSH Server.
  • OpenVPN
  • WebDAV
  • FTP
  • DNS - You can use duckdns.org if you don't want to pay for a domain name, or namecheap if you do.
  • Shell - Which command line shell to use. Some modifications can significantly make your life much better.

Services[edit]

  • Torrents - Torrent Servers
  • IRC Bouncer - IRC Bouncers are critical to idling on IRC servers and receiving private messages.
    • Quassel - Effective, elegant, and powerful IRC client for multiple platforms, including Android.
    • ZNC - Great for Palaver (iOS).
  • Web Server - Which web server is right for you?
  • Syncthing - A dropbox replacement and multi-server replication solution,

Storage[edit]

  • Partitioning - How to arrange the partitions.
  • LVM - Alternatively, Logical Volume Management allows partitions to be expanded or resized at will.
  • fstab - Automount partitions at boot.
  • SSD - Optimizations for ssd storage
  • Bind Mount Directories
  • NAS/Devices - Build a low power Network Attached Storage array for the home.
  • Object Storage - Beyond 4TB RAID rebuild times start to become ineffective. Ceph and other object storage options will have to be explored.
  • LTO Tape - The holy grail of archival storage on the cheap.
  • Disk Recovery - If you accidentally blew away your partition table, you'll have to recover the data.

Computing[edit]

Misc[edit]

Dedicated Server[edit]

Guides for configuring and setting up a true CentOS dedicated server/VPS.

Testing[edit]

Always thoroughly test your dedicated server before you use it.

  • Memtest - Test the sanity of your memory (especially non-ECC). use memtest86++ at boot (included on most linux distro livecds).
  • Hard Drive Test - Test the reliability of your hard drives.
  • Speed Test - Test connection speeds and peering worldwide, as well as read/write speeds.
  • Stress Test - Test the overall performance of the computer.

Networking[edit]

  • Hostname - The hostname is related to your server's primary domain.
  • Firewalls - Easy firewalls with FirewallD.

Services[edit]

  • Web Server - A production dedicated server has a more complex web server design.
  • Rsync Server - Rsync Servers are a reliable way of transmitting and syncing data across the internet, without resending what was already synced
  • Rsync with SELinux

Account Management[edit]

  • Handling Admin Privileges
  • King in the Mountain - Create an emergency root account with a special SSH key put in a safe place.
  • Sudo - Give certain trusted users administrative (root) privileges, which are revokable.