In order to have a website that’s publicly accessible on the Internet, it needs to be hosted on a computer with a static, public IP address. Our laptops generally don’t have that — they get assigned private (or local) IPs when connecting to a WiFi (or wired) network, and the public IP is a few layers “above” in the network topology. While it’s possible to expose your laptop’s IP to the internet, it’s much easier to use services which offer that as a feature.
Digital Ocean is one such provider. A few alternatives are Amazon Web Services, Google Cloud Platform, or Microsoft Azure Cloud, but for this class we will use Digital Ocean.
Digital Ocean offers a suite of different services, but for now we are only interested in Droplets. A droplet is a Linux-based virtual machine (VM) which can be used for web hosting (and for many other things – for all intents and purposes, it’s a full computer capable of running any software that works on Linux.) Droplets, conveniently, also have publicly exposed IP addresses, so by the end of this tutorial we’ll have a website up and running on the internet.
Note: We are basically renting a virtual server from Digital Ocean, which generally costs money. The lowest-tier server we can rent costs $5 per month, with the first 2 months free. So you will need a credit card to sign up for Digital Ocean, and you will get charged a total of $10 by the end of this class (for April and May.)
If you don’t feel comfortable doing this for any reason, send me an email ([email protected]) and I’m happy to discuss alternatives.