# Digital Ocean

{% hint style="danger" %}
This guide applies to **MikoPBX version 2024.2.111** and newer!
{% endhint %}

{% embed url="<https://youtu.be/2fL9pdPNcgE>" %}

In this guide, we will perform a step-by-step installation of MikoPBX using the DigitalOcean cloud platform.

Before beginning, you need to copy the download link for the latest **.raw** MikoPBX image. You can find these on [MikoPBX's GitHub releases](https://github.com/mikopbx/core/releases).

## Uploading the Image to DigitalOcean

1. Go to "**Manage**" → "**Backups & Snapshots**":

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FWEg6wDmreSlkGHP6b7To%2FbackupsAndSnapshots.png?alt=media&#x26;token=155143fa-9397-4fec-8845-13ce7914e01f" alt=""><figcaption><p>Section "Backups &#x26; Snapshots"</p></figcaption></figure>

2. Go to "**Custom Images**" → "**Import via URL**":

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FtCOEJTKwysAD5GNEmON2%2FcustomImagesImportViaURL.png?alt=media&#x26;token=7cbff6a2-1b40-4315-b320-8edd24bed051" alt=""><figcaption><p>"Import via URL"</p></figcaption></figure>

3. Paste the link to the **.raw** disk image file you copied earlier.
4. Enter a name for the image, select the region where it will be uploaded (this should match the region of your future virtual machine), and choose "**Unknown**" as the operating system type.

   Click "**Upload image**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fjt7ReQ7myVPxVFQgbzPH%2FimageParameters.png?alt=media&#x26;token=0b690b21-24c6-493e-bcdb-a84708de3d16" alt=""><figcaption><p>Image parameters</p></figcaption></figure>

Wait for the image upload to complete.

## Creating a Virtual Machine in the Cloud

1. Go to DigitalOcean’s main page:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F26e5n6kKmmItSD5jGgqj%2FmainPageDO.png?alt=media&#x26;token=3decc3b7-707b-4503-816c-0d994a9d3aa1" alt=""><figcaption><p>DigitalOcean’s main page</p></figcaption></figure>

2. To create a new virtual machine (Droplet), go to "**Create**" → "**Droplets**":

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FW8OnKm55SL67MJbI7DAL%2FbuttonForCreatingANewDroplet.png?alt=media&#x26;token=bad81851-c764-4a5d-89b3-8674973eb09f" alt=""><figcaption><p>Creating a droplet</p></figcaption></figure>

3. Select a region and datacenter for your virtual machine:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FaiKw8xN45AAzADq0k9UV%2FregionAndDatacenter.png?alt=media&#x26;token=a6a17ebb-52a0-493d-afc3-752a78d08be6" alt=""><figcaption><p>VM Parameters #1</p></figcaption></figure>

4. Next, choose the previously uploaded image and configuration for your virtual machine:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fp1VRKRGj0NTgXKaUOKHt%2FImageAndConfig.png?alt=media&#x26;token=3052c9d7-5f3a-4e15-9428-3d0637674629" alt=""><figcaption><p>VM Parameters #2</p></figcaption></figure>

5. Go to the "**Additional Storage**" tab. Here, you can add a second disk that will be used for call recordings. To do this, click "**Add volume**" and specify the parameters for the new disk.

{% hint style="info" %}
We recommend a minimum size of **50GB** for the call recordings disk.
{% endhint %}

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FX41PexyQVc9om5TK5q2W%2FadditionalStorage.png?alt=media&#x26;token=234b7076-b3de-450c-a365-1d830d89a84d" alt=""><figcaption><p>"Additional Storage" section</p></figcaption></figure>

6. Go to "**Choose authentication method**." Here, you need to select "**SSH Key**" and add the key pair for SSH authentication. For more information on generating SSH keys, see:

* [Windows](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-ssh/powershell)
* [MacOS/Linux](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-ssh/terminal)

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FobKXoH4Y1ehUNiIHmvim%2FsshKey.png?alt=media&#x26;token=33e89c8b-cd96-4c89-b238-23eaf0229ede" alt=""><figcaption><p>Authentication Methods</p></figcaption></figure>

7. Click "**Create Droplet**."

## Connecting to the Console and First Login to the Web Interface

### Connecting via DigitalOcean Console

1. Go to the page of the newly created Droplet. Wait for it to start. Then connect via the built-in DigitalOcean console (shown in the screenshot).

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FppJNUpZqnqMAsN2pVLgb%2Fconsole.png?alt=media&#x26;token=6885ea3f-beea-4c84-bb35-429b046791b7" alt=""><figcaption><p>Console in the Digital Ocean interface</p></figcaption></figure>

2. After the system boots, open the web interface using the external IP address shown in the console (**external**).

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FFbur06ZlwrzmFGzWzcG1%2FexternalIPAddress.png?alt=media&#x26;token=48fe4b84-1980-4f35-888a-44a9107a350b" alt=""><figcaption><p>MikoPBX IP-adress</p></figcaption></figure>

3. Paste the machine’s IP address into your browser’s address bar. When you reach the MikoPBX login page, use the following credentials:

* **Username**: admin
* **Password**: The **Droplet ID**, which you can find in the browser’s address bar:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FjfTd8RSJnGcdHgCI3cgk%2FMachineID.png?alt=media&#x26;token=8eafb95e-ff9a-4065-ba59-d1bee367519d" alt=""><figcaption><p>Droplet ID</p></figcaption></figure>

### Connecting via SSH

1. To connect via SSH, follow [these instructions](https://chatgpt.com/faq/troubleshooting/connecting-to-a-pbx-using-ssh/). This example uses **PowerShell** (Windows).

{% hint style="warning" %}
The default login for SSH on a DigitalOcean VM is **do-user**.
{% endhint %}

2. Open PowerShell and run the following command:

```powershell
ssh -i C:\Users\<Username>\.ssh\id_ed25519 do-user@mikopbxipadress
```

{% hint style="success" %}
Adjust:

1. `C:\Users\<Username>\.ssh\id_ed25519` to the path of your local SSH key.
2. `do-user` if you changed the root user during VM creation.
3. `mikopbxipadress` to the IP address of your station (IPv4 in the VM management interface).&#x20;
   {% endhint %}

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FwL3EO8FPxLvSJmrrRfNb%2FsshCode.jpg?alt=media&#x26;token=47268207-2563-4966-b159-cecb4da997d4" alt=""><figcaption><p>Command for SSH connection</p></figcaption></figure>

After pressing **Enter**, you will be authenticated via SSH and arrive at the MikoPBX console menu.
