This guide aims at scalability; my goal is that pretty much anyone with an Internet connection and a spare computer younger than a decade should be able to afford trying it out. I intend to maintain guides for current versions of the Ubuntu Server LTS and the FreeBSD operating systems on the PC, and for Devuan on the Raspberry Pi. The latter will naturally have certain limitations, but especially recent RPi models can perform adequately in serving relatively static content.
While it is possible to achieve most of the goals of this guide by renting a subdomain with a company like NoIP, the additional cost of a real domain is so minuscule that I don’t see the point in not getting one. The rest of this guide will assume that you have a domain. Popular registrars include GoDaddy and NameCheap.
To be able to present web services on the Internet, we need to be in control of our router/firewall and network. A minimum requirement is an understanding of available network addresses, and an Internet connected router that allows us to perform port forwarding to systems behind it.
Running a web server on a metered internet connection is not a good idea. We want a flat-rate connection so we don’t get nasty surprises when it’s time to pay the bills. We also need control of the router/firewall to set up NAT/port forwarding. In fact, it wouldn’t take much to turn a similar server as the one we’re setting up into a powerful and very customizable router, but that’s outside the scope of this document.
I assume the reader of this document is interested in running their own Unix-like server and is willing to read up on areas they don’t yet understand. A basic knowledge of how to interact with a command line interface is expected, but I suspect it wouldn’t be impossible to learn while following this guide.
Managing a Unix-like server is best done from the comfort of your regular computer through ssh – Secure Shell. Most operating systems we’re likely to encounter come with the OpenSSH client preinstalled. In Windows, the most common ssh client probably is PuTTY, which can be downloaded from here. The minimum requirements to complete this guide from a Windows client is to have access to PuTTY, PuTTYGen and WinSCP. PuTTYGen will be used to generate a key pair for authentication, and WinSCP will be used to transfer the public key to the server.
No matter what platform we’re using for our client, I recommend obtaining a password manager, which will greatly simplify keeping secure backups of the various logon credentials we create for this server, and which may help us generate some of the passwords required by service accounts. I personally like KeePassX.
We will be editing files. I personally use vim when in a text environment. While I’m of the opinion it’s worth the effort to learn this editor, there are more intuitive editors around. Many Linux distributions come with the nano editor. FreeBSD comes with the vi and ee editors preinstalled. In any case, installing our favorite editor is easily done through the operating system’s package manager. I will give examples for each of the systems I maintain guides for.