# How to create cloud instance and access it on Digital Ocean

{% hint style="success" %}
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**](https://m.do.co/c/f41ef94616cc) **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.
{% endhint %}

![](/files/-MSOONc9aPf5n84HlD3D)

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

![](/files/-MSL_0lrsl13ywMYf50t)

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.

![](/files/-MSL_Zk4Qvgnrm7qfiWZ)

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).

![](/files/-MSL_s4y72KoaNsuk5YZ)

I will leave block storage as blank for now.

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

![](/files/-MSLbAwPnlwKky6A7iYi)

VPC network is enabled by default.

Select Monitoring for the performance metrics.

![](/files/-MSLbWiripxYRW1GE7aL)

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

Click on Add key

![](/files/-MSLbxKxtTN4y4r8e_kr)

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
```

![](/files/-MSLcetQWnmRRKEuA5Uv)

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

```
ssh-keygen
```

![](/files/-MSLczW-Q7DR3gz7Brk8)

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).

![](/files/-MSOGVapzj0HQijnhRUZ)

Enter your hostname

![](/files/-MSOGneAavcnWLasn2mr)

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.

![](/files/-MSOHUWYXOs5oZYQ6ymK)

You will get the droplet ip address when created.

![](/files/-MSOHhx3EfC2IXOJFW9S)

## 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](https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/openssh/).

## 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.

![](/files/-MSOIId7aplN56Idvrsr)

Digital ocean also offers charts to monitor your droplets.

![](/files/-MSOI-4jkT4VnjwW6xRi)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://owen31302.gitbook.io/github-education/digital-ocean/how-to-create-instance-on-digital-ocean.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
