We are still actively working on the spam issue.
Difference between revisions of "Setting up a Server"
m (Added links) |
m |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Need to email? Set up a web server? Well, here's some advice. We're gonna try to write this page like you've never done this shit before. It does, however, assume you have at least some basic [[GNU/Linux]] knowledge. If you don't, you probably aren't ready for this. You weren't going to set up a server using Windows, were you? Jesus Christ, how horrifying. | Need to email? Set up a web server? Well, here's some advice. We're gonna try to write this page like you've never done this shit before. It does, however, assume you have at least some basic [[GNU/Linux]] knowledge. If you don't, you probably aren't ready for this. You weren't going to set up a server using Windows, were you? Jesus Christ, how horrifying. | ||
− | + | Common uses for a server: | |
− | |||
− | |||
* Install a media player system and stream content to your local network | * Install a media player system and stream content to your local network | ||
* Install a cloud service like Nextcloud to run your own Dropbox service, no privacy issues, full control, unlimited space (well, limited by how many drives you can cram in). | * Install a cloud service like Nextcloud to run your own Dropbox service, no privacy issues, full control, unlimited space (well, limited by how many drives you can cram in). | ||
Line 9: | Line 7: | ||
* Host a personal website. | * Host a personal website. | ||
* Run your own mailserver just like Hillary! | * Run your own mailserver just like Hillary! | ||
− | ** Warning: Running a mailserver is a shitton of work | + | ** Warning: Running a mailserver is a shitton of work, especially if you want emails to google/outlook to be seen. |
* Run a dedicated game server. | * Run a dedicated game server. | ||
* Run various webapps, develop your own webapps. | * Run various webapps, develop your own webapps. | ||
Line 16: | Line 14: | ||
=Getting Started= | =Getting Started= | ||
− | [[ | + | * [[Encryption|Encrypted or unencrypted drive (LUKS)]] |
− | + | * [[Home server/Choosing an Operating System]] | |
− | [[ | + | * [[Home_Server/Setting up your Storage]] |
+ | * [[Home server/Remote access]] | ||
=Recommended software= | =Recommended software= | ||
− | *[[Home server#Server software]] | + | * [[Home server#Server software]] |
− | *[[Home server#System administration software]] | + | * [[Home server#System administration software]] |
− | == | + | ==Common home server services== |
Most packages have clear tutorials on their repo/project site. Here are some handpicked guides for the most common types of software used | Most packages have clear tutorials on their repo/project site. Here are some handpicked guides for the most common types of software used | ||
− | |||
* Cloud Storage - Nextcloud | * Cloud Storage - Nextcloud | ||
− | * [https://homebrewserver.club/fundamentals-webserver-website.html | + | * Web Server - [https://homebrewserver.club/fundamentals-webserver-website.html Apache] or NGINX |
− | * VPN - Wireguard | + | * VPN - Wireguard or OpenVPN |
− | * Media Streaming - Jellyfin | + | * Media Streaming - Jellyfin or PLEX |
− | * [https://homebrewserver.club/configuring-a-modern-xmpp-server.html | + | * XMPP - [https://homebrewserver.club/configuring-a-modern-xmpp-server.html Prosody] |
=Centralized storage= | =Centralized storage= | ||
A server is perfect for this job. It is (supposedly) an always available resource on the local network. If using this in your house, you can expect reasonable speeds, even over WiFi that will let you do many daily tasks. One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or Samaba if you have Windows clients on your network, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronised. This synchronisation is a key benefit of the network storage. | A server is perfect for this job. It is (supposedly) an always available resource on the local network. If using this in your house, you can expect reasonable speeds, even over WiFi that will let you do many daily tasks. One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or Samaba if you have Windows clients on your network, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronised. This synchronisation is a key benefit of the network storage. | ||
− | 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. See [[Home server#File Systems and RAID]] for more information. | + | You may want to consider a [[Wikipedia:RAID|RAID]] array for long-term file storage. RAID is not backup, but will protect your files in case of drive failure. See [[Home server#File Systems and RAID]] for more information. |
== Web server == | == Web server == | ||
Line 43: | Line 41: | ||
A web server serves up a page. The nice things about serving it from a server, than, say, Wordpress or your Dropbox share, is that now you can run web apps and server side code for a dynamic page. | A web server serves up a page. The nice things about serving it from a server, than, say, Wordpress or your Dropbox share, is that now you can run web apps and server side code for a dynamic page. | ||
− | |||
===HTTPS=== | ===HTTPS=== | ||
Line 51: | Line 48: | ||
[https://certbot.eff.org/ Certbot] makes https easy to implement with Let's Encrypt certificates | [https://certbot.eff.org/ Certbot] makes https easy to implement with Let's Encrypt certificates | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=External links= | =External links= | ||
* [https://library.linode.com/ Linode Library] - Good beginner tutorials | * [https://library.linode.com/ Linode Library] - Good beginner tutorials | ||
+ | * [https://landchad.net/ landchad.net] - "Chad's Guide to Starting Your Own Website" | ||
* [https://github.com/x08d/lockdown.sh Script to secure Debian and Debian based Linux installs] | * [https://github.com/x08d/lockdown.sh Script to secure Debian and Debian based Linux installs] | ||
* [https://gist.github.com/deergod1/818ec78ab70947a2f89df2bb5bb28896 Setup pfSense] | * [https://gist.github.com/deergod1/818ec78ab70947a2f89df2bb5bb28896 Setup pfSense] | ||
Line 118: | Line 61: | ||
=See also= | =See also= | ||
* [[Home server]] | * [[Home server]] | ||
− | * [[Setting up a Server/Home or Remote | + | * [[Setting up a Server/Home or Remote?]] |
− | * [[Setting up a Server/ | + | * [[Setting up a Server/Mail]] |
− | + | * [[Setting up a Server/DNS]] | |
− | * [[Setting up a Server/DNS | ||
− | |||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
[[Category:HowTo]] | [[Category:HowTo]] |
Latest revision as of 09:23, 3 July 2023
Need to email? Set up a web server? Well, here's some advice. We're gonna try to write this page like you've never done this shit before. It does, however, assume you have at least some basic GNU/Linux knowledge. If you don't, you probably aren't ready for this. You weren't going to set up a server using Windows, were you? Jesus Christ, how horrifying.
Common uses for a server:
- Install a media player system and stream content to your local network
- Install a cloud service like Nextcloud to run your own Dropbox service, no privacy issues, full control, unlimited space (well, limited by how many drives you can cram in).
- Always on seedbox. Start torrents with your phone through the web interface while out, they're done by the time you're back home.
- Host a personal website.
- Run your own mailserver just like Hillary!
- Warning: Running a mailserver is a shitton of work, especially if you want emails to google/outlook to be seen.
- Run a dedicated game server.
- Run various webapps, develop your own webapps.
- SSH-tunnel to the server from work/school/etc to use it as a proxy, so that the admin of the network you're on can't see what sites you're going on.
- Run a VPN for location spoofing or security when you're out and about.
Contents
Getting Started
- Encrypted or unencrypted drive (LUKS)
- Home server/Choosing an Operating System
- Home_Server/Setting up your Storage
- Home server/Remote access
Recommended software
Common home server services
Most packages have clear tutorials on their repo/project site. Here are some handpicked guides for the most common types of software used
- Cloud Storage - Nextcloud
- Web Server - Apache or NGINX
- VPN - Wireguard or OpenVPN
- Media Streaming - Jellyfin or PLEX
- XMPP - Prosody
Centralized storage
A server is perfect for this job. It is (supposedly) an always available resource on the local network. If using this in your house, you can expect reasonable speeds, even over WiFi that will let you do many daily tasks. One option is to set it up with NFS (Linux-centric, can be used on windows but it's shit) or Samaba if you have Windows clients on your network, so you can watch your chinese cartoons on any device and keep your documents/whatever synchronised. This synchronisation is a key benefit of the network storage.
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. See Home server#File Systems and RAID for more information.
Web server
A web server serves up a page. The nice things about serving it from a server, than, say, Wordpress or your Dropbox share, is that now you can run web apps and server side code for a dynamic page.
HTTPS
The extra CPU burden of TLS is minuscule. Your server should serve up everything on HTTPS only. Keep port 80 (plain HTTP) open but redirect everything to HTTPS. If port 80 is closed, typing the address of your server into the address bar of a browser will probably fail (because the browser assumes you meant HTTP, but you have to go to HTTPS).
Issue a self-signed certificate. CAs are for jerks. Set the duration short (eg. a year) and don't forget to make a new one. If you've got a domain, get a Lets Encrypt-signed cert and set up a cron job to renew it. They're pretty sweet.
Certbot makes https easy to implement with Let's Encrypt certificates
External links
- Linode Library - Good beginner tutorials
- landchad.net - "Chad's Guide to Starting Your Own Website"
- Script to secure Debian and Debian based Linux installs
- Setup pfSense
- Raspberry Pi KVM for managing servers remotely
- The Complete System Administrator Guide
- Example of a personal server
- Increase Linux Internet speed with TCP BBR congestion control