Deploying to your site hosted on [Oracle Cloud Infrastructure](https://www.oracle.com/cloud/) (OCI) is very simple with DeployHQ. OCI is the fourth-largest cloud provider globally, offering compute instances with full SSH access.

Firstly, you'll need to set up your DeployHQ project, then connect to your OCI instance.

## Setting up your project

Head to the **Projects** screen in DeployHQ, then click the **New Project** button to get started.

You'll be prompted to enter a name for your project, then select where your repository is hosted.

{screenshot: 9}

Next, click **Create project** and you'll be taken to a screen where you can log in with your repository hosting account to authorise access and then choose your repository.

* [Adding a Bitbucket repository](Article: #17)
* [Adding a Codebase repository](Article: #19)
* [Adding a GitHub repository](Article: #21)
* [Adding a GitLab repository](Article: #23)
* [Adding a repository manually](Article: #25)

## Setting up Oracle Cloud

Once you've configured your repository, you'll need to connect to your OCI compute instance.

### Finding your instance details

1. Log in to the [OCI Console](https://cloud.oracle.com)
2. Navigate to **Compute > Instances**
3. Click your instance name — the **Public IP address** is shown in the **Instance Access** section

### Default SSH users

OCI uses different default usernames depending on the OS image:

| OS Image | Username |
|----------|----------|
| Oracle Linux | `opc` |
| CentOS | `opc` |
| Ubuntu | `ubuntu` |

Root login is disabled on all images. All default users have `sudo` privileges.

### Adding the SSH key

OCI instances use **SSH key authentication only** — there are no passwords. You'll need to add DeployHQ's public key to the instance.

Copy the SSH public key from DeployHQ's server configuration page, then SSH into your instance and add it:

```
echo "DEPLOYHQ_PUBLIC_KEY" >> ~/.ssh/authorized_keys
```

### Adding the server in DeployHQ

Head to **Servers & Groups**, and click the **New Server** button at the top of the screen. If you've just added your repository, you will have been taken to this page automatically.

Start by entering a name, and choosing SSH/SFTP as the protocol. Enter your instance's **Public IP** as the hostname, the correct **username** for your OS (e.g. `opc` or `ubuntu`), and leave the port blank to use the default (22). Enable the option to **Use SSH Key rather than password for authentication**.

For the **deployment path**, enter the directory where your files should be uploaded. Common paths:

- **Apache**: `/var/www/html/`
- **Nginx**: `/usr/share/nginx/html/`
- **Custom app**: `/var/www/your-domain/`

No web server is pre-installed on OCI instances — you'll need to install Apache or Nginx yourself before deploying.

Within **Deployment options**, you can choose to automatically deploy your server and, if you're only deploying files from a certain directory in your repository, enter a **Deployment subdirectory**.

**Important**: OCI has a **two-layer firewall**. The cloud-level **Security List** allows SSH (port 22) by default, but the instance's **OS-level firewall** may block other traffic. If DeployHQ cannot connect, check both layers. Also ensure [DeployHQ's IP addresses](https://www.deployhq.com/support/faq/our-ip-ranges) are permitted in your Security List.

Click **Create Server** to finish, then you can proceed to start your first deployment.

## Run your first deployment

By default, DeployHQ will upload the whole repository to your server on the first deployment, because there is no previously deployed commit to compare to.

If your files are already on your OCI instance and up to date with the latest commit, you can follow this guide to skip that first deployment:

* [Don't deploy your whole repository on the first deployment](Article: #129)

Otherwise, just follow this guide to start your first deployment, then after the first deployment, only files that have changed will be uploaded in future.

* [Running your first deployment](Article: #43)

That's it! You've now set up and run your first deployment to your Oracle Cloud instance and your future changes will be uploaded for you automatically, or at the simple click of a button.

## Further reading

DeployHQ has a number of very useful features to help with your deployments in general that you might wish to find out more about:

* Compiling assets and javascript with the [Build pipeline](Article: #301)
* Running commands on your server with [SSH commands](Article: #57)
* Stop certain files from being uploaded in deployments using [Excluded files](https://www.deployhq.com/support/excluded-files)
* Keep important files safely away from your repository using [Config files](Article: #47)
* Keep your team in the loop and run other useful tasks during a deployment with our [Integrations](Article: #327)