Having hosted applications on the IIS servers in an in-house data center, experimented with Google App Engine, tried to understand AWS and Azure's complex pricing, we settled on a superior service provided by DigitalOcean.
DigitalOcean has no-surprises, transparent subscription pricing, great documentation, and a simple access to what we can set up, manage, and control with ease: a Linux virtual machine.
Prior to procuring a server, please generate SSH keys to connect to your production server, they are more secure than passwords. If you are using Windows, please use Putty.
From your home directory, create a new SSH key.
ssh-keygen -t rsa
As a file name, enter .ssh/server-url. For example, .ssh/code.linedrop.io.
Keep the password empty.
To view all your ssh keys, run:
For a straight-forward setup and no-surprises subscription pricing, we recommend using DigitalOcean service: https://www.digitalocean.com.
Browse to Create your account on Digital Ocean and create an account.
Click + New Project
Name your project and enter your details to describe your project setup.
Click Create Project. Skip the request to move resources.
Droplet is a virtual machine which will host your production environment.
In the top-right corner, click Create and select Droplets.
Select Debian as the distribution and choose the latest version.
Choose Standard plan and select a VM that suits your needs. To view the least expensive VMs, scroll to the left. For a small subscriber app, we use the 1GB/1CPU with 25 GB SSD and 1000 GB transfer. Start small, you can always upgrade later.
Select your data center region. We’re in California, so we usually go with San Francisco.
Select Monitor option. It’s nice to see what your server loads are.
Choose SSH keys as your authentication method.
Click New SSH Key.
On your machine, view the SSH key you had previously created.
For example, .ssh/code.linedrop.io.pub
Copy the content of the key, starting with ssh-rsa…
Paste into SSH key content field on DigitalOcean portal.
Name the key with the server url, such as code.linedrop.io.
Click Add SSH Key.
Type in the production server URL in the Choose a hostname field.
Add backups if you like.
Click Create Droplet to start the process. Once complete, click on Droplets to view the IP address of your new server.
DigitalOcean provides an easy way to add a firewall to your environment. The firewall will allow traffic only on the necessary ports.
In DigitalOcean portal, click Networking and select Firewalls. Click Create Firewall.
Name your firewall and set the following rules inbound rules:
Outbound Rules are configured automatically.
Search for the production server droplet, select the server, and apply the new firewall.
Click Create Firewall.