[Yandex Cloud documentation](../../index.md) > [Cloud Apps](../index.md) > [Tutorials](index.md) > Creating a website in Ghost CMS High Availability using Cloud Apps

# Installing Ghost CMS High Availability using Cloud Apps


Follow this guide to install and configure [Ghost CMS High Availability](https://ghost.org/), a content publishing and blogging platform. You will deploy [Yandex Cloud Apps](../index.md) on a virtual machine with all required resources autoconfigured, including a database, a web server, and email service integration.

To install Ghost CMS High Availability:

1. [Get your cloud ready](#before-you-begin).
1. [Create a VPC network and subnets](#create-network).
1. [Configure a DNS zone](#configure-dns).
1. [Create a Yandex Lockbox secret](#create-secret).
1. [Install Ghost CMS High Availability](#install-ghost).
1. [Configure Ghost CMS High Availability](#configure-ghost).
1. [Check the result](#check-result).

If you no longer need the resources you created, [delete them](#clear-out).


## Get your cloud ready {#before-you-begin}

Sign up for Yandex Cloud and create a [billing account](../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../billing/quickstart/index.md) and [link](../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../resource-manager/concepts/resources-hierarchy.md).


### Required paid resources {#paid-resources}

The cost of support for the new infrastructure includes:

* Fee for [VM](../../compute/concepts/vm.md) usage and data storage on [disk](../../compute/concepts/disk.md) (see [Yandex Compute Cloud pricing](../../compute/pricing.md)).
* Fee for using a public IP address and outgoing traffic (see [Yandex Virtual Private Cloud pricing](../../vpc/pricing.md)).
* Fee for using a public [DNS zone](../../dns/concepts/dns-zone.md) and public DNS requests (see [Yandex Cloud DNS pricing](../../dns/pricing.md)).
* Fee for computing resources allocated to MySQL® [hosts](../../managed-mysql/concepts/index.md), storage and backup size (see [Yandex Managed Service for MySQL® pricing](../../managed-mysql/pricing.md)).
* Fee for using a [bucket](../../storage/concepts/bucket.md) to store media files (see [Yandex Object Storage pricing](../../storage/pricing.md)).
* Fee for storage of and operations with [secrets](../../lockbox/concepts/secret.md) (see [Yandex Lockbox pricing](../../lockbox/pricing.md)).
* Fee for outgoing emails (see [Yandex Cloud Postbox pricing](../../postbox/pricing.md)).


## Create a VPC network and subnets {#create-network}

Create a [cloud network](../../vpc/concepts/network.md) and [subnets](../../vpc/concepts/network.md#subnet) to deploy your resources in.

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), navigate to the folder where you want to deploy your infrastructure.
  1. Navigate to **Virtual Private Cloud**.
  1. In the top-right corner, click **Create network**.
  1. In the **Name** field, enter a name for the network. The naming requirements are as follows:

      * Length: between 3 and 63 characters.
      * It can only contain lowercase Latin letters, numbers, and hyphens.
      * It must start with a letter and cannot end with a hyphen.
  
  1. Keep **Create subnets** enabled.
  1. Click **Create network**.

- Yandex Cloud CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. Create a cloud network in the default folder:

      ```
      yc vpc network create --name wordpress-network
      ```

  1. Get the list of the cloud networks in the folder:

      ```
      yc vpc network list --folder-id b1g6ci08ma55********
      ```

      Result:

      ```
      +----------------------+-------------------+
      |          ID          |      NAME         |
      +----------------------+-------------------+
      | enpavfmgapum******** | wordpress-network |
      | enplom7a98s1******** | default           |
      +----------------------+-------------------+
      ```

  1. Select `NAME` or `ID` of the cloud network you need. Create a subnet in the `ru-central1-a` availability zone:

      ```
      yc vpc subnet create \
        --network-id enpavfmgapum******** \
        --zone ru-central1-a \
        --range 192.168.0.0/24
      ```

      Where:

      * `--network-id`: Cloud network ID. When creating a subnet, specify the cloud network for the subnet and CIDR.
      * `--zone`: Subnet availability zone.
      * `--range`: List of internal IPv4 addresses specified for this subnet, such as `10.0.0.0/22` or `192.168.0.0/16`. Make sure the addresses are unique within the network. The minimum subnet size is /28, and the maximum subnet size is /16. Only IPv4 is supported.

      The subnet naming requirements are as follows:

      * Length: between 3 and 63 characters.
      * It can only contain lowercase Latin letters, numbers, and hyphens.
      * It must start with a letter and cannot end with a hyphen.

  1. Similarly, create a subnet in the `ru-central1-d` availability zone.

- API {#api}

  To create a cloud network, use the [create](../../vpc/api-ref/Network/create.md) REST API method for the [Network](../../vpc/api-ref/Network/index.md) resource or the [NetworkService/Create](../../vpc/api-ref/grpc/Network/create.md) gRPC API call and provide the ID of the folder to host the new network in the `folderId` parameter of your request:

  To learn how to find out the folder ID, see [Getting the folder ID](../../resource-manager/operations/folder/get-id.md).

  To create subnets in the `ru-central1-a` and `ru-central1-d` availability zones, use the [create](../../vpc/api-ref/Subnet/create.md) REST API method for the [Subnet](../../vpc/api-ref/Subnet/index.md) resource or the [SubnetService/Create](../../vpc/api-ref/grpc/Subnet/create.md) gRPC API call, and provide the following in your request:

  * ID of the folder the subnet will reside in, in the `folderId` parameter.
  * ID of the network the subnet will be placed in, in the `networkId` parameter.
  * ID of the availability zone the subnet will be placed in, in the `zoneId` parameter.
  * List of internal IPv4 addresses specified for this subnet, in the `v4CidrBlocks[]` array, e.g., `10.0.0.0/22` or `192.168.0.0/16`. Make sure the addresses are unique within the network. The minimum subnet size is `/28`, while the maximum subnet size is `/16`. Only IPv4 is supported.

  To get the subnet ID, use the [list](../../vpc/api-ref/Subnet/list.md) REST API method for the [Subnet](../../vpc/api-ref/Subnet/index.md) resource or the [SubnetService/List](../../vpc/api-ref/grpc/Subnet/list.md) gRPC API call and provide the folder ID in the `folderId` request parameter.

{% endlist %}


## Configure a DNS zone {#configure-dns}

Create a [public DNS zone](../../dns/concepts/dns-zone.md#public-zones) and delegate your domain to it. For more about delegating domains, see [this guide](../../troubleshooting/dns/how-to/delegate-public-zone.md).

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Cloud DNS**.
  1. Click **Create zone**.
  1. Specify the DNS zone settings:
     * **Zone**: Specify your registered domain with a trailing dot, e.g., `example.com.`.
     * **Type**: Select `Public`.
     * **Name**: Enter a name for the zone, e.g., `example-zone`.
  1. Click **Create**.

  1. Delegate your domain to Yandex Cloud servers. Do it by specifying the addresses of the `ns1.yandexcloud.net` and `ns2.yandexcloud.net` DNS servers in your domain registrar's account.

     Delegation does not take effect immediately. It usually takes up to 24 hours for internet service providers to update records. You can check domain delegation using [Whois](https://www.reg.ru/whois/check_site) or the `dig` utility:

     ```bash
     dig +short NS example.com
     ```

     Result:

     ```text
     ns2.yandexcloud.net.
     ns1.yandexcloud.net.
     ```

- Yandex Cloud CLI {#cli}

  1. Create a public DNS zone:

     ```bash
     yc dns zone create \
       --name example-zone \
       --zone example.com. \
       --public-visibility
     ```

     Where `--zone` is your domain's name, e.g., `example.com.`. The `--zone` parameter value must end with a trailing dot.

     Result:

     ```text
     id: dns39gihj0ef********
     folder_id: b1g681qpemb4********
     created_at: "2024-09-09T15:23:34.919887Z"
     name: example-zone
     zone: example.com.
     public_visibility: {}
     ```

     For more information about the `yc dns zone create` command, see the [CLI reference](../../cli/cli-ref/dns/cli-ref/zone/create.md).

  1. Delegate your domain to Yandex Cloud servers. Do it by specifying the addresses of the `ns1.yandexcloud.net` and `ns2.yandexcloud.net` DNS servers in your domain registrar's account.

     Delegation does not take effect immediately. Internet provider servers update records within 24 hours.

- API {#api}

  To create a public DNS zone, use the [create](../../dns/api-ref/DnsZone/create.md) REST API method for the [DnsZone](../../dns/api-ref/DnsZone/index.md) resource or the [DnsZoneService/Create](../../dns/api-ref/grpc/DnsZone/create.md) gRPC API call.

  Delegate your domain to Yandex Cloud servers. Do it by specifying the addresses of the `ns1.yandexcloud.net` and `ns2.yandexcloud.net` DNS servers in your domain registrar's account.

{% endlist %}


## Create a Yandex Lockbox secret {#create-secret}

Create a [Yandex Lockbox](../../lockbox/index.md) secret to store the [Managed Service for MySQL®](../../managed-mysql/index.md) database password.

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Lockbox**.
  1. Click **Create secret**.
  1. In the **Name** field, specify the secret name: `db-password-secret`.
  1. In the **Secret type** field, select `Custom`.
  1. In the **Key** field, enter `db_password`.
  1. In the **Value** field, set a password for the Managed Service for MySQL® database. Password requirements:

      * It must be from 8 to 128 characters long.
      * It must contain numbers, upper-case and lower-case Latin letters, and special characters.
      * It cannot consist only of digits.

  1. Click **Create**.

- Yandex Cloud CLI {#cli}

  Run this command:

  ```bash
  yc lockbox secret create \
    --name db-password-secret \
    --payload "[{'key': 'db_password', 'text_value': '<password>'}]"
  ```

  Where `text_value` is the Managed Service for MySQL® database password. Password requirements:

  * It must be from 8 to 128 characters long.
  * It must contain numbers, upper-case and lower-case Latin letters, and special characters.
  * It cannot consist only of digits.

  Result:

  ```text
  id: e6q0rdjdggjp********
  folder_id: b1g681qpemb4********
  created_at: "2025-07-12T18:23:49.844Z"
  name: db-password-secret
  status: ACTIVE
  current_version:
    id: e6qbp772i014********
    secret_id: e6q0rdjdggjp********
    created_at: "2025-07-12T18:23:49.844Z"
    status: ACTIVE
    payload_entry_keys:
      - db_password
  ```

- API {#api}

  To create a secret, use the [create](../../lockbox/api-ref/Secret/create.md) REST API method for the [Secret](../../lockbox/api-ref/Secret/index.md) resource or the [SecretService/Create](../../lockbox/api-ref/grpc/Secret/create.md) gRPC API call.

  Specify `db_password` in the `key` parameter for the key to contain the Managed Service for MySQL® database password. Password requirements:

  * It must be from 8 to 128 characters long.
  * It must contain numbers, upper-case and lower-case Latin letters, and special characters.
  * It cannot consist only of digits.

{% endlist %}


## Install Ghost CMS High Availability {#install-ghost}

Install [Ghost CMS High Availability](https://yandex.cloud/en/marketplace/products/yc/ghost-cms-ha) using Cloud Apps.

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Cloud Apps**.
  1. Click **Choose application**.
  1. Select **Ghost CMS High Availability** and click **Use**.
  1. Configure your application:

      #|
      || **Parameter** | **Required** | **Default value** | **Description** ||
      || **Name** | Yes | — | Application instance name. ||
      || **Description** | — | — | Application instance description. ||
      || **Service account** | Yes | — | Service account you are going to use to install the app. The service account must have the `admin` role for the folder.
      To create a service account with the required permissions during app installation, select `Auto`. ||
      || **DNS zone ID** | Yes | — | ID of the DNS zone to host the application's domain. ||
      || **Site subdomain** | — | Empty | Domain for access to the main website, formed by adding a subdomain to the DNS zone domain, i.e., `site.example.com` or `example.com` if no subdomain is specified. ||
      || **Administrator dashboard subdomain** | — | `admin` | Domain for access to the admin panel, formed by adding a subdomain to the DNS zone domain, e.g., `admin.example.com/ghost`. ||
      || **Sender** | — | `noreply@<website_domain>` | Email sender. Used to set up [SMTP](https://en.wikipedia.org/wiki/SMTP) via Yandex Cloud Postbox. ||
      || **Subnet in ru-central1-a** | Yes | — | Subnet in the `ru-central1-a` availability zone for the Managed Service for MySQL® cluster, created previosly.
||
      || **Subnet in ru-central1-d** | Yes | — | Subnet in the `ru-central1-d` availability zone for the Managed Service for MySQL® cluster, created previosly. ||
      || **VPC subnet for the VM** | — | Subnet in the `ru-central1-d` availability zone. | Subnet to host the new VM. ||
      || **Number of vCPUs** | — | `2` | Number of vCPUs. ||
      || **RAM** | — | `2` | RAM in GB. ||
      || **Guaranteed vCPU share** | — | `100` | Guaranteed vCPU share in %. The available values are 20%, 50%, or 100%. ||
      || **Public SSH key** | — | — | The key will be added to `authorized_keys` of the `ghost` VM user.
      We recommend specifying a public SSH key to access the VM over SSH. You need to create a key pair for the SSH connection [by yourself](../../compute/operations/vm-connect/ssh.md). ||
      || **Disk type** | — | `network-ssd` | VM disk type. ||
      || **Disk size** | — | `20` | VM disk size in GB. ||
      || **ID of the secret containing the database password** | Yes | — | Secret containing the password to connect to a Managed Service for MySQL® cluster. This password should be specified in the `db_password` key. ||
      || **Managed Service for MySQL® cluster disk size** | — | `20` | Managed Service for MySQL® cluster disk size in GB. ||
      |#

  1. Click **Install**.

      Installing the app and creating all required resources will take from five to ten minutes.

      As soon as all resources are created, the VM will start configuring the website and issuing TLS certificates. Wait for the installation to complete.

{% endlist %}


## Configure Ghost CMS High Availability {#configure-ghost}

Once the app is successfully installed, configure Ghost CMS High Availability:

1. In your browser, open the admin panel using its address:

    ```text
    https://<admin_panel_subdomain>.<domain>/ghost
    ```

    Where:

    * `<admin_panel_subdomain>`: Admin panel subdomain you specified when creating the application. The default value is `admin`.
    * `<your_domain>`: Domain you specified when creating the DNS zone.

    Here is an example: `https://admin.example.com/ghost`.

1. Fill out the admin registration form:

    * **Site title**: Enter a name for the website.
    * **Full name**: Enter a name to publish posts under.
    * **Email address**: Specify the email address for logging in to the admin panel. You will get a notification at this address.
    * **Password**: Create a secure password for logging in to the admin panel.

1. Click **Create account & start publishing**.

    After you register, the page will redirect you to the Ghost CMS High Availability admin panel where you can start using the website.


## Check the result {#check-result}

Make sure that Ghost CMS High Availability is up and running:

1. Create a test post:

    1. In the admin panel interface, click ![image](../../_assets/console-icons/plus.svg) next to the **Posts** tab.
    1. Provide the post title and content.
    1. Upload an image to the post. It will be automatically saved in the S3 bucket.
    1. At the top right, click **Publish** → **Continue, final review** → **Publish post, right now**.
    1. In the window that opens, copy the post link by clicking **Copy link**.


1. Open the link in your browser.

    You should see a post with a URL in this format:`https://example.com/new-post/`.


## How to delete the resources you created {#clear-out}

{% note warning %}

Do not manually delete automatically created resources: this may cause an error when uninstalling the app.

{% endnote %}

To shut down the resources you created and stop paying for them:

1. [Delete](../../storage/operations/objects/delete-all.md) all objects from the Object Storage bucket you created when installing the app.
1. Delete the installed Ghost CMS High Availability app:

    1. Navigate to **Cloud Apps**.
    1. Locate the installed Ghost CMS High Availability app in the list.
    1. Click ![image](../../_assets/console-icons/ellipsis.svg) next to the app and select **Delete**.
    1. Confirm the app deletion.

        Wait for the deletion to complete.

1. [Delete](../../dns/operations/zone-delete.md) the public DNS zone.
1. [Delete](../../lockbox/operations/secret-delete.md) the Yandex Lockbox secret.
1. Delete the VPC [network](../../vpc/operations/network-delete.md) and [subnets](../../vpc/operations/subnet-delete.md).
1. Delete the Yandex Cloud Postbox address and the associated [DNS record](../../dns/operations/resource-record-delete.md) because they will not be deleted after you delete the application.