Hosting with Rackspace Public Cloud

Rackspace is a large, publicly traded cloud hosting provider with data centers in Dallas, Texas, Chicago, Illinois, London, UK and Sydney, Australia. Their Public Cloud service allows customers to get an instance of Ubuntu Server 16.04, or other operating system, complete with public IPv4 and IPv6 IP addresses, convenient and easy image backups, DNS management, scalable servers, and more, all at reasonably low prices, though somewhat more expensive than other providers, such as Digital Ocean. (Note that Rackspace no longer publishes prices on their 'Next-Gen' line of servers, though this may be seen by creating an account, which is free, then logging in and viewing the 'Create server' page.)

The advantage that Rackspace promotes is they better provision their resources and offer great customer service. The reserved resources allows for customers to be assured they are getting the resources that a given Rackspace server plan is advertised to provide. The disadvantage with this model is that the servers do not get to take advantage of idle resources not in use by other customers and some customers require very little customer support.

Change domain DNS records
Assuming the domain to be hosted on this server is not currently serving anything important and all appropriate backups for migration have been performed and downloaded, now is a good time to change the domain's primary DNS server records. DNS servers use something called Time To Live (TTL). This number, usually listed in seconds, tells other DNS servers how long to maintain the current DNS record. Some registrars may set this to be as long as 48 hours. A DNS server that looks up the domain's DNS records, usually at the request of a client seeking to access the domain, will maintain the record for that period. This means that a user looking up a domain that has a record with a TTL of 48 hours will not see a change in the DNS record until 48 hours after the last initial lookup.

Checking DNS information
DNS information on any domain can be found through GWhois.org (note that this site is not related to the command line  tool). Gwhois.org provides basic, top-level DNS record information directly from the domain's registrar and DNS servers. If more detail is needed, such as DKIM records, DMARC records, CNAME records, etc., use the  command.

Email
If the domain is using a separate email service, take a look at the current DNS records and take note of the MX records. The same MX records will need to be entered into the Rackspace account, and can be done with minimal interruption in service. Be sure the domain looked up for MX records is precisely what follows the @ symbol in the email addresses used for the domain. For example, the MX records for www.domain.com are different from the MX records for domain.com, the latter being what most email addresses use.

If the mx record points to a server using the same domain as is being transferred, be sure to look up the mx record on that domain. For example, if the mx record for example.com states mail.example.com, perform a query on the DNS records for mail.example.com and save the information in a text file. If the server hosting the domain is also to be the mail server, and this is your first time setting up a web server, consider either keeping the current server as a mail server, moving the mail to a hosted mail service or using a different domain to practice on. Mail servers are typically as much or more work to configure than web servers, though one server can perform both functions simultaneously.

Change the primary DNS records
Log in to the domain's registrar and navigate the DNS management page. Delete all current DNS entries and add the following two entries:

dns1.stabletransit.com dns2.stabletransit.com

Creating the server
Creating a server is a fairly straightforward process, but those who have never done it before may find some of the steps brand-new and somewhat non-intuitive.

Create a Rackspace account
Creating a Rackspace account is free and done through the signup page. After creating an account, credit card payment information should be entered by logging into the site and navigating to the Billing & Payments option located in the menu under the username. Customers are not charged anything until services have been added.

Create the server instance
If not on the Servers tab already, navigate to Servers -> Cloud Servers -> Create Server.

Create a name for the server. Although the name can be anything and is used primarily to identify the server in the Rackspace Cloud Control Panel, this name will be inserted in the  and   files when the server is built. These names generally do not affect the usage of the server, except in the case of mail servers. Even if it is not expected that the server will be a mail server, it may not be a bad idea to name the server mail.example.com, with example.com being the domain that will act as the server's mail server (which does not have to be the only domain for which mail is handled, just the domain for the mail server itself). The reason this is important is that occasionally the hypervisor hosting the server will be reset, causing a service called  to rename the   and   files to the name of the server in the Rackspace account, which creates an interruption in the mail service that doesn't usually generate any warnings unless those specific files are being monitored by a monitoring agent.

Select the location to serve from. The only consideration would be to choose the one that is closest to either the user or the users of the sites being hosted as the servers are otherwise identical. For the image, scroll down and select Ubuntu 16.04 LTS (Xenial Xerus).

For server size options, most small sites will get by just fine with the 512 MB size. Although not stated on that page, the maximum data transfer rate for the bottom level account is 20 Mbps. If it is expected that the server may encounter occasional spikes in load, requiring typically more RAM or bandwidth, the server can be scaled to a larger size for the duration of the spike, then scaled back down for regular traffic. Additionally, if storage size may be an issue, but not any other performance aspects, a storage volume may be added to the server after its creation.

The option under Advanced Options for Disk Partition can be left at the default option of Automatic. While Manual allows for faster build when resizing, it is not currently possible to resize down, so if the reason for increasing the size of the server is just for temporary spikes in traffic, it will not be possible under the Manual setting to resize back down.

Click 'Create Server' and Rackspace will display a message with the password for the root login. While this password is necessary for the initial setup, it is not necessary after setup and is a liability in the long run. For Windows users, pasting this password into Notepad, and not saving the document or allowing the computer to enter hibernate while it is open, will prevent any long-term storage of the password from being created.

Copy the server's PublicNet IPv4 and IPv6 addresses and paste them into a document for use in the next step.

Creating the DNS Records
Navigate to DNS -> Create Domain, enter the domain name (no www or other subdomains) and email address for administrative contact and press enter. An A/AAAA record should be created using both the IPv4 and IPv6 PublicNet addresses for the domain and desired subdomains, including www. For a basic site with no MX or other records or subdomains, there will be four total records, two each for example.com and www.example.com, using the two PublicNet IP addresses.

Mail DNS Records
For users with external mail services such as Google Apps or Zoho Mail, to minimize interruption in mail service, DNS records should be created that match the MX records displayed in the DNSQueries results in the aforementioned step. Also be sure to include any other applicable records, such as DKIM records (which won't show up in the GWhois.org results - probably easiest to get directly from the current DNS server).

SPF records
Every domain and subdomain of a domain should have an SPF record, even if mail is not currently or intended to ever be sent from or received at the domain. This is to prevent spammers from using the domain and creating a bad reputation for it. If the domains being served by an email provider, check with their support pages to find the recommended SPF record entries to make.

For domains and their subdomains not receiving or sending email, create a new DNS TXT record and either enter a subdomain in the 'Hostname' field or leave it blank. In the 'Text' field, enter:

v=spf1 -all

Click 'Add Record'. Be sure to modify or create these records as necessary when configuring email and creating new subdomain records.

Using the server
Once the server build has been completed, usually less than 5 minutes (if the server does not show complete, try refreshing the webpage), take a look at the options by clicking your server in the Servers -> Cloud Servers menu.

Emergency Console
Note in the Actions menu there is an option called 'Emergency Console'. This will bring up a virtual terminal interface and allow login with any user that has login credentials. Note that this is not an SSH session and bypasses any firewall settings. If the server ever becomes unresponsive, this more basic interface can be used to log directly into the server to troubleshoot any issues as it is roughly the equivalent of [//en.wikipedia.org/wiki/Teleprinter TTY] access to a local server.

Images
There is an option to create images of the server, though these images are stored at a rate of 10¢/GB per month. This is very convenient for new administrators who will likely make many mistakes along the way. Saving the image before major installation steps can save a lot time by being able to quickly revert to a known working state, accomplished by using the 'Rebuild from Image' option in the Actions. Keep in mind that rebuilding to a previous image will lose all data added to the server since creating the image. On production servers not using services such as Block Storage, this will mean a loss of database information, emails, web analytics data, etc.

There is also an option to schedule image creation. For those who do not want to create a full backup and restore system, this is a very convenient and easy way to back up the server. While very rare, server instances provided by nearly all cloud providers have been known to completely disappear, taking all their data with them.

Next step
Before moving on to initialize the server for use, it's good to cover the very basics of using the command line interface.