Starting this journey into my own self-hosted VPS with DigitalOcean, the creation of the base system is straight forward with very minimal Linux experience.
Once I was registered for the service, first things first, DigitalOcean properly offers two-factor authentication, so I set that up on the account before proceeding further, security first!
With basic account security setup, the next prerequisite before spinning up the VPS host, is to generate a set of Public/Private SSH keys, given SSH is a primary access method to the Linux VPS host. On Linux (and Windows), the most common utility for this is using puttygen, which in Arch Linux at least is just part of the main putty package. Generate a key using:
puttygen -t rsa -b 2048 -C "[email protected]" -P securepassphrase -o keyfilename.ppk
This will generate the so-called “keys to your kingdom” in that .ppk file where your terminal was running from. This file should be kept backed up and secure!
Next, you’ll need to extract the public key, which is the half of the key DigitalOcean uses against your private key file to validate. Extract that Public Key with:
puttygen -L keyfilename.ppk
Select and copy everything that is output from that command, it should be a very large, mostly jumbled looking set of text, and then login to your new DigitalOcean control panel.
On the main control panel, select Security, and then scroll down to Add SSH Key. The box that pops up needs the entire content of what was copied from PuttyGen, and a descriptive name, often the same name you assigned the .ppk file, for easy reference. Using this method means a new system does not generate a less secure password for the Root account, instead it’s only accessible with the usage of this key pair.
With that step complete, you can finally proceed to Create >> Droplet, which is the base server to work from.
First, you select the Linux OS and version you would prefer from the options. If you have a specific application in mind you should research first if their is a preferred distribution. You can also select from a variety of One-Click apps that will spin up the VPS Host with the prerequisites and software ready to configure. In this case, I’m going to run a variety of applications personally, so I’m going with with Ubuntu 18.04, which is an LTS release with extended support.
Next up, is selecting the specifications for the droplet from an easy selection, focusing on Memory, CPU, Storage and Transfer requirements. As with any virtual machine, it’s very easy at a later time to increase your resources, so while I’m testing and building, I’ll start with the entry level system at $5.00 USD per month.
Next, you add backups, unless this is a true test system that you intend to throw away without any critical data:
Then you pick from Data Center hosting locations, ideally picking what is closest to you, if it’s for personal use, or closest to your client for broader use. I’m in Canada, so I selected Toronto to keep my data hosted in Canada.
Last up, you select the SSH key that was loaded into your account earlier (if you don’t, you’ll get an e-mail afterwards with a password for the root user, but this is much less secure). Then you select a Host Name to identify the system.
When this is finished, matching their claim on the front page, I counted roughly 48 seconds (less than the 55 claimed) before the system was created, booted, and online waiting initial configuration!
Next up in the third Article, upon creating the system, DigitalOcean sent me an e-mail to guides and steps for initial access and setup of the Ubuntu VPS, as well as steps to secure it properly. I’ll run through those in the next article to get the system to the point that it’s ready for an application install!
If you like what your seeing so far, give DigitalOcean a try yourself with $10 in free credit (enough for two months of the base system I’ve built!)