How to create cloud instance and access it on Digital Ocean

If you're creating new account on DigitalOcean, please register with referral link to get $100 credit.

Give $100, Get $25

Everyone you refer gets $100 in credit over 60 days. Once they’ve spent $25 with us, you'll get $25. There is no limit to the amount of credit you can earn through referrals.

Here is my referral link if you cannot find one.

With $100 credit, you can use the one basic droplet for 20 months ($5/month).

If you're student, you could earn extra $50 credit from github student developer pack.

Once you login in Digital ocean website, you can create cloud instance at the drop down menu on the top right corner.

You need to choose the image for your instance. Here I am choosing Debian as my OS and you can pick any that suits your needs.

Here is the most important part for your container. With basic instance, you can have 1G CPU/25G SSD Disk which I think is very attempting option. Not every cloud provider gives SSD storage for free and it only costs you $5 per month and you already have $100 credit (or more if you're student).

I will leave block storage as blank for now.

Choose datacenter where closest to your location or your target user.

VPC network is enabled by default.

Select Monitoring for the performance metrics.

At the Authentication section, add your SSH keys so that you could access your cloud instance.

Click on Add key

If you have already created SSH public key (or you don't remember), simply put the following command in your terminal to retrieve public key at your PC.

cat ~/.ssh/id_rsa.pub

If you don't have any public key, you can create one by entering following command in your terminal.

ssh-keygen

Once you have your public key ready, you can copy paste on the text area (Please do not copy any extra space or new line).

Enter your hostname

Enter tags if you plan to have multiple droplets and need to manage it.

Select which project you want to create the droplet in.

Here I will skip the backup.

Once you create a droplet, it take a few seconds to process.

You will get the droplet ip address when created.

Access your cloud instance

You can access your cloud instance via ssh:

>> ssh root@<Your droplet ipv4 address>

You will get similar response when you successfully access the droplet:

The authenticity of host '144.126.220.34 (144.126.220.34)' can't be established.
ECDSA key fingerprint is SHA256:xxx.
Are you sure you want to continue connecting (yes/no)? yes


Warning: Permanently added '144.126.220.34' (ECDSA) to the list of known hosts.
Linux debian-test 4.19.0-10-cloud-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

You can do some testing for this droplet:

root@debian-test:~# ls
root@debian-test:~# mkdir test
root@debian-test:~# ls
test

When you want to leave the connection, just enter exit:

root@debian-test:~# exit
logout
Connection to 144.126.220.34 closed.

For more ssh access information, please check the official page.

Destroy Droplet

You can destroy the droplet if you're done testing (bill is counted on daily basis) or you don't need it anymore.

Digital ocean also offers charts to monitor your droplets.

Last updated