Skip to main content

Initial Steps

Domain

It was high time that I "owned" part of the internet, so I went on NameCheap.com and "bought" two URLs. I went with the WhoisGuard feature, and I set the domain registrations for auto-renewal.

VPS

I then registered w/ DigitalOcean and provided my credit card.  Now I am ready to roll.

I started a new project on DigitalOcean, and created a new droplet.  I selected FreeBSD 12.1 w/ ZFS (could also choose 11.3, and could choose UFS or ZFS, but ZFS is great, and I know I'll wish I had it once I get a little more advanced).  I went with the $5/mo plan (1 vCPU, 1 GB RAM, 25GB SSD).  I was not provided a root password.  Instead, I had to provide an SSH pubkey.  All the better.

VPS Setup

It would be wise to pop into the Networking tab and create a basic firewall for the droplet.  I chose to accept https, http, and SSH, all on default ports.  FreeBSD doesn't have a firewall running out the box, so this step is probably wise.

Domain Setup

Shortly after creating the droplet, I brought the newly acquired IP address over to NameCheap and created A records.

  • Created an A record for the domain where the host is simply @, meaning mydomain.tld will work as is.
  • Created an A record for the domain where the host is www, so www.mydomain.tld will also work.
  • Left in place, for now, the CNAME record to the NameCheap parking page. (I should have probably deleted right away.)
  • Also left in place, for now at least, the URL redirect for the host @ to www.mydomain.tld.  I need to research this.

All Done

Well, not so fast.  DigitalOcean and NameCheap both have the ability to enable 2FA.  Maybe you should get that out of the way before you get too far.  I did.

It's almost time to get various jails set up and piped into a reverse proxy (another jail), and then have CNAME records created for pointing subdomains (a subdomain for each jail) at the droplet's IP.  You do the CNAME records in the Advanced DNS screen of the NameCheap site.

At this point, there's not much left to do but log in to the server.  I tried ssh root@mydomain.tld right away, and it didn't work, and I had to use the IP address.  But after a little while, it worked fine.  DNS is fun, right?