Digital Ocean

Prerequisites

To follow this tutorial, you will need:

  1. A DigitalOcean account.

If you don’t already have one, you can create one via this link and get FREE credit

Step 1 — Create A DigitalOcean Droplet

-

Once you have signed up and logged into your account you want to create your first droplet.

  1. Click the green Create button in the top right.
  2. Choose Droplets (Create cloud servers) from the drop down menu.

    Step 2 — Choosing an Image

The first configuration section is titled Choose an image. Initially, you can choose from three categories of images:
Distributions are images with no additional software, including Ubuntu, Fedora, Debian, and CentOS as well as FreeBSD at the time of this writing.
To change to a different version or architecture, click the down arrow and make a selection from the list.
Droplet Image Selection
Container distributions include CoreOS, Fedora Atomic, and RancherOS.
One-click apps are images that include pre-configured applications, like MySQL or LAMP, to help simplify getting started.
Once you start using Droplets, you can make backups and take snapshots of them.
A tab for each one will be added to the Create Droplet page when you make them. From there, you can choose them as the foundation to create new Droplets.
Snapshots are taken on-demand and can be used to back up a Droplet or as the starting point for creating new Droplets.
Backups can be generated automatically or on a weekly basis. Like snapshots, you can use the backup to rebuild an existing Droplet or to create a new one.Screenshot with new Snapshots and Backup tabs
Choose the image you’d like to use as a basis for your server. We’ll keep the default Ubuntu image.

Step 3 — Choosing a Size

The next configuration section allows you to choose the size of your Droplet, i.e. the amount of RAM and storage space it has.
Size your Droplet
There are three types of plans:
Standard Droplets: Balanced virtual machines with a healthy amount of memory tuned to host and scale applications like blogs, web applications, testing / staging environments, in-memory caching and databases. Standard plans begin with 1 GB of RAM, 1 CPU, 25 GB of SSD Disk, and 1 TB of data transfer for $5/month and run all the way to 192 GB of RAM, 24 CPUs, 3.75 TB of SSD and 12 TB of data transfer.
Optimized Droplets: These compute-optimized virtual machines with dedicated hyper-threads from best-in-class Intel CPUs are ideal for CPU Intensive applications like CI/CD, video encoding, machine learning, ad serving, batch processing and active front-end web servers.
Flexible Droplets: These three plans, each at the $15 price point, allow you to move between different ratios of memory and CPU by providing a consistently-sized 60 GB SSD Disk. Should your needs change at a future point, you can adjust your Droplet’s plan using the flexible and permanent resize options.
*Note: If your cloud server will have less than 3 GB of RAM, and especially if it has less than 1 GB of RAM, we recommend using a 32-bit operating system. This is because processes can require significantly more memory on a 64-bit architecture and on servers with a limited amount of RAM, any performance benefits that might be gained from a 64-bit architecture would be offset by having less memory available for buffers and caching.
Depending on your needs and budget, select the Droplet option that works best for you. Here, we’ll accept the default 4 GB / 2 CPU size.

Step 4 — Adding Backups

When you enable backups, a snapshot of the live system is automatically taken each week, creating a crash-consistent, point-in-time image. These images can be used to restore the existing Droplet or create a new one. Weekly backups add about 20% of the monthly price of the Droplet to the total cost. The specific cost is displayed when you click Enable Backups.
Add backups button
Your backup will be taken during a specific window of time each week, which you can view on the Droplet’s Backups tab once it has been created.

Step 5 — Adding Block Storage

DigitalOcean Block Storage allows you to create and attach additional storage volumes to your Droplets. At the time of this writing, Block Storage is available in the FRA1, NYC1, SFO2, SPG1, and TOR1 datacenter regions. Additional regions will be added over time.
Screenshot of the Add block storage section
Volumes are independent resources that can be moved from one Droplet to another within the same datacenter. Attached volumes function like locally connected storage drives, allowing you to manage your storage with familiar tools and techniques. To learn more about them, visit How To Use Block Storage on DigitalOcean.
We’re not going to add Block Storage at this time.

Step 6 — Choosing a Datacenter Region

Next, you’re given a choice of datacenter regions.
Droplet Region
For the best performance, choose the datacenter nearest to you and your users. More distant server locations may increase the server’s latency without providing any practical benefits.
Your decision may also be guided by features which are not yet available in all regions when they are first introduced. This Create page will provide guidance when features have limited availability.
For example, during the Block Storage rollout, if we had selected Block Storage, certain regions would be greyed out. Both a message in the Add block storage section as well as tooltips over the disabled datacenter region would explain:
Screenshot of limited region selection
We’ll keep the NYC3 default.

Step 7 — Selecting Additional Options

The Select additional options section allows you to choose from several additional services, most of which add no extra cost.
Select additional options described below
Private Networking enables an additional networking interface that can only be accessed by other Droplets within the same datacenter. This can be helpful to keep traffic between Droplets from being routed outside the datacenter over the public internet. Private networking is provided at no extra cost.
IPv6 enables IPv6 access for your Droplet and incurs no additional cost.
User data enables you to pass arbitrary data into the user-data key of the DigitalOcean Metadata service. This setting is required for CoreOS Droplets. Using user data adds no extra cost.
Monitoring adds the DigitalOcean agent to collect extended metrics and create alert policies. No additional cost. Monitoring is provided at no additional cost.
Choose the options you would like. In this example, we’ll select Monitoring.

Step 8 — Select SSH Keys (Optional)

SSH keys provide more security than using a password and some users find them more convenient as well. You have the option to use them in the Add your SSH keys section.
SSH Keys
Once you upload a key, it is available in your account. Now and in the future, you can check the box by the key name to add it to Droplets. Visit How To Use SSH Keys with DigitalOcean Droplets for detailed directions on how to create and use SSH keys.
Screenshot of uploaded key with box checked
We’ve chosen to upload our work computer’s key and add it to the Droplet.

Step 9 — Finalizing and Creating

The Finalize and create section of the Create page allows you to choose the number and name(s) of the Droplets you’re creating.
Screenshot of the Finalize and create section
By default, a single Droplet will be created. Adjust the number of Droplets by clicking the plus, +, or minus, –, buttons.
Each Droplet must have a name. These names are used in the DigitalOcean Control Panel and as the server’s hostname. A default name is provided based on the options you selected, but you can modify the name(s) to suit your needs. For example, you may want to use a Fully Qualified Domain Name, or FQDN (e.g. droplet1.example.com).
We’re going to accept the default name, ubuntu-2gb-nyc3-01, which combines the distribution name, size, datacenter, and a number that differentiates it from others when multiple Droplets are created at once.

Step 10 — Creating the Droplet

Once you have selected your options, click Create. A progress bar displays how close your Droplet is to being ready.
Screenshot of progress bar
When the setup is 100% complete, the IP address of your Droplet will be displayed.
Screenshot of installed Droplet
When the progress bar reaches 100% and the IP address is displayed, you should be ready to log in.

Step 11 — Logging In to the Droplet

If you added SSH keys, you can use SSH to connect to the server and log in as root.
Otherwise the root password will be sent to your account’s email address.
The process for logging in is slightly different depending on your local operating system:

How to log in on macOS or Linux

To log in from a computer running macOS or linux, open the Terminal.app program, which is located in the utilities folder.
Enter the command below, substituting the IP address of your Droplet for your_server_ip.
ssh root@your_server_ip
Type Yes when the prompt asks if you would like to connect to the host.
If you are using SSH keys, you will be logged into the server immediately.
If you are not using a SSH keys, you’ll be prompted for a password.
Enter the root password that was emailed to you when you created your server, then press ENTER.
Note that the password will not be visible on the screen as you type for security reasons.
You should now be connected to your first DigitalOcean Droplet.

How to log in on Windows

With Bash on Windows If you have access to Bash on Ubuntu on Windows, you can follow the Linux directions above.
Open Bash by pressing the WINDOWS key, typing “Bash”, and selecting the search result.
With PuTTY
If you don’t have Bash, you can the SSH client PuTTY. To install it on your local computer:
Visit the Download PuTTY site and choose the Windows installer from the Package files list.
Once PuTTY is installed, start the program.
On the PuTTY Configuration screen that opens, fill in the Host Name (or IP address) field with the Droplet’s IP address.
Confirm that the Port is set to 22 and that the Connection type SSH is selected.
PuTTY Configuration Screen with above values filled in
Once everything is configured, you can save these settings for future logins by entering a title into the Saved Sessions field. Click Save to store settings.
Double-click on the session name to connect.
Before you connect to a server for the first time, PuTTY will ask you to confirm that you trust the server.
Choose Yes to save the server identity in PuTTY’s cache or No to connect without saving the identity.
PuTTY Configuration Screen with above values filled in
After PuTTY starts, type in the root password that was emailed to you.
Note that if you uploaded keys, you will either be connected directly or prompted for the password you set on your key.
When you have successfully authenticated, you should be connected to your new Droplet.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Leave a Comment