How to create a Compute Instance on Oracle Cloud using the web app
Tags: oracle, cloud
Published: 2023-07-17 01:26:22

Hello there! Welcome to Oracle Cloud! The Oracle Cloud Infrastructure (OCI) is an alternative to AWS, Google Cloud, and other cloud computing providers that provides the infrastructure for your computing needs on the cloud. 

Let us start this journey by learning how to create and connect to a remote computer (this is called a Compute Instance) on OCI through the web app console on https://cloud.oracle.com.

## 1. Create an OCI Virtual Cloud Network

First we need to create a Virtual Cloud Network (VCN) where all the connections are configured. Search for **Virtual Cloud Networks** on Oracle Cloud and click **Start VCN Wizard**.

![Create VCN Wizard on OCI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vopf120j77vtpi27v4at.png)

Choose **Create VCN with Internet Connectivity** and click **Start VCN Wizard**

![Create VCN Wizard wizard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxjwbjwik8wq5fnyc382.png)

Give the VCN a name and use the default settings. Now you have your VCN:

![Create VCN details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0euzwfvlrj5hft7q0hjd.png)

## 2. Create a Compute Instance

Search for **Instances** and click **Create Instance**

![Instances page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/se5oh7hj23at6cj8likf.png)

Change the Virtual cloud network being used under **Networking** to the VCN you created in the previous step.

Download the SSH private key under **Add SSH keys**, so you can access the instance.

![Download private SSH key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/888voc7itj9sl13qufa3.png)

By default (as of today), the instance will use Oracle Linux 8 as its OS and the VM.Standard.E4.Flex processor chip with 1  OCPU and 16GB RAM.

Click **Create** to create the instance.

After provisioning is done and the instance is **RUNNING**, copy the **Public IP address** of the instance.

![Instance details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjyz44a9iv33760stbbl.png)

Now let's access the instance through the Terminal via SSH. 

First, make sure to make the SSH private key file read-only for the user and only the user.

```sh
chmod 400 ssh-key-2023-07-17.key
```

And then we can access the instance using:
```sh
ssh -i ssh-key-2023-07-17.key opc@193.122.144.199
```

Obviously, change the filename and IP address to your own. `opc` is the default username.

![Terminal connected to instance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijbrqxc7gfhyji3e43n0.png)

You now have access to the remote instance. 

Here, you have access to a remote computer where you can create files, connect to the Internet, create apps, and many more, just like your current computer but without the GUI.

Good luck! 👋

***Safe harbor statement***
The information provided on this channel/article/story is solely intended for informational purposes and cannot be used as a part of any contractual agreement. The content does not guarantee the delivery of any material, code, or functionality, and should not be the sole basis for making purchasing decisions. The postings on this site are my own and do not necessarily reflect the views or work of Oracle or Mythics, LLC.

*This work is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*