How To Create A Server On Digital Ocean

How To Create A Server On Digital Ocean

At the end of this blog you should know the following:

  • How to set up your own server on digital ocean

  • How to ssh into your server

Learning how to create servers is very important as a cloud/DevOps engineer and in this blog, I will be teaching you how to launch your own server! and don’t worry if you don’t get it on the first try you can always come back to understand and practice from this blog. it’s not going anywhere!!

Now, you should have already signed up to digital ocean and if you haven’t done so you can click here and get $200 dollars free after signing up on your account.

After signing up, by default the page will look something like this but first, you will need to create a project that carries all your workload, and in the image above where the red circle is where you create one.

then after creating one the page should look exactly like this.

navigating through the left-hand bar you would see a MANAGE option like the image above. Click on it. it scrolls down and gives you a lot of options

Click on droplets. then you see a page like this. Click on create a droplet on the right-hand side to create your new droplet.

when you do that you will see a page exactly like this. now here all you need to choose is the region that is closer to where you are. As for me, I am going to be choosing London because London is closer to where I stay. you might be wondering why you need to pick a region closer to you and that is because of the closer the region the faster the virtual machine (server).

scrolling down a little bit is where we see a section to select our image. in this case, I will be choosing ubuntu and you can see the list of versions by clicking on it but I am going with the latest version. now remove your minds from the $56 per month because we are not going to be paying that.

now we move to the next section. I am going to try to reduce the cost in this blog because we are just creating a practical server and this server is going to be on regular and $6 per month with 1GB/1cpu and 25GB SSD disk. now note that you can scale this up depending on your needs and what the server is going to be doing for you, your business, or your company.

now that we are done with that in this section we will need to choose an authentication method either through SSH or through passwords. but in this blog, we are going to use SSH because using SSH is more secure. Now to create an SSH key you just need to go to your local virtual machine that can be created through virtual box or VMware.

now above is where you see the command to generate the SSH key for authentication any time I want to SSH into my server

now this is the default part where the SSH should be stored. just click enter.

when creating the SSH key. it will ask you for a passphrase. you don’t need to type anything there just click enter.

now we can see that the SSH key has been created and you can see the contents of the public key with the path above circled in red.

now note that the content of your private key should not be shared with anyone. even digital ocean will not ask for it. but your public key can be shared anywhere

now we copy this key and paste it into this section where we are told to add a new SSH key. and now we can add the ssh key. if you look on the right-hand side you will see a guide to help you create an SSH key and also how to input it in digital ocean.

now that we have added our SSH key. we can also put in the name we want the server to be called in that case mine is server1. and from here you can now click on create droplet to create the server.

and as you can see our server is being created.

now that it’s done let’s now see if we can ssh into our server from our virtual machine. all you need is the IP address above. copy it and head over to your machine and type in.

ssh <name of machine>@ip address

in my case mine is

ssh root@144.126.200.195

it works!! and now we are inside our server through SSH.

If you loved this blog post give it a like, comment, and don’t forget to click on the follow button. And if you would love to get an update anytime I publish a blog then you should sign up for my newsletter!!