Installing Ghost CMS CloudApp in Yandex Cloud
Follow this guide to install and configure Ghost CMS
To install Ghost CMS:
- Get your cloud ready.
- Configure a DNS zone.
- Install Ghost CMS CloudApp.
- Configure Ghost CMS.
- Check the result.
If you no longer need the resources you created, delete them.
Get your cloud ready
Sign up for Yandex Cloud and create a billing account:
- Navigate to the management console
and log in to Yandex Cloud or create a new account. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVEorTRIAL_ACTIVEstatus. If you do not have a billing account, create one and link a cloud to it.
If you have an active billing account, you can navigate to the cloud page
Learn more about clouds and folders here.
Make sure the selected folder has a cloud network with a subnet in at least one availability zone. Do it by selecting VPC on the folder page. If the list contains a network, click its name to see the list of subnets. If the subnets or network you need are not listed, create them.
Required paid resources
The cost of support for the new infrastructure includes:
- Fee for using a VM instance (see Yandex Compute Cloud pricing).
- Fee for using a public DNS zone and for public DNS requests (see Yandex Cloud DNS pricing).
- Fee for data storage on disk (see Yandex Compute Cloud pricing).
- Fee for using an S3 bucket to store media files (see Object Storage pricing).
Configure a DNS zone
Before installing Ghost CMS, create a public DNS zone and delegate a domain to it. For more about delegating domains, see this guide.
-
In the management console
, select a folder where you want to create your DNS zone. -
In the list of services, select Cloud DNS.
-
Click Create zone.
-
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.
- Zone: Specify your registered domain with a trailing dot, e.g.,
-
Click Create.
-
Delegate your domain to Yandex Cloud servers. Do it by specifying the addresses of the
ns1.yandexcloud.netandns2.yandexcloud.netDNS 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
or thedigutility:dig +short NS example.comResult:
ns2.yandexcloud.net. ns1.yandexcloud.net.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
-
Create a public DNS zone:
yc dns zone create \ --name example-zone \ --zone example.com. \ --public-visibilityWhere
--zoneis your domain name, e.g.,example.com.. The--zoneparameter value must end with a trailing dot.Result:
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 createcommand, see the CLI reference. -
Delegate your domain to Yandex Cloud servers. Do it by specifying the addresses of the
ns1.yandexcloud.netandns2.yandexcloud.netDNS 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.
To create a public DNS zone, use the create REST API method for the DnsZone resource or the DnsZoneService/Create 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.
Install Ghost CMS CloudApp
Install Ghost CMS via Cloud Apps:
-
In the management console
, select the folder where you want to install the app. -
In the list of services, select Cloud Apps.
-
Click Choose application.
-
In the window that opens, select Ghost CMS.
-
Provide the installation parameters:
Note
Required parameters:
- Subnet (Host parameters)
- DNS zone ID (Host parameters)
Other parameters are optional or set to defaults.
Common parameters:
- Application settings: Enter a name and description (optional) for the app.
- Service account: Select the service account you are going to use to install the app. If you do not have a service account, create one.
Host parameters:
- Subnet: Select a VPC network to deploy a VM in. This is a required parameter.
- DNS zone ID: Select a DNS zone from the list. This is a required parameter. Subdomains will be created in the selected DNS zone.
Domain parameters:
- Website subdomain: Specify a subdomain within the selected DNS zone for access to the main website. The website domain will be determined by prepending the subdomain to the DNS zone domain.
- Admin panel subdomain: Specify a subdomain within the selected DNS zone for access to the Ghost CMS admin panel. The default value is
admin. The admin panel domain will be determined by prepending the subdomain to the DNS zone domain. The admin panel will be available athttps://<admin-panel-subdomain>.<dns-zone-domain>/ghost. - Database admin panel subdomain: Specify a subdomain within the selected DNS zone for access to the database admin panel. The default value is
db. The database admin panel domain will be determined by prepending the subdomain to the DNS zone domain. - Email sender: Specify the email address that will be used to send notifications (e.g., on change of password or registration). The default value is
noreply@<website_domain>.
Virtual machine parameters:
- Number of vCPUs: Specify the number of vCPUs. The default value is
2. - RAM in GB: Specify the amount of RAM. The default value is
2. - Guaranteed vCPU share: Specify the guaranteed share of CPU time (20, 50, or 100). The default value is
100. - Public SSH key: Specify the public SSH key for VM access. If specified, it will be added to
authorized_keysof theghostuser. This is an optional field.
Disk parameters:
- Disk type: Select the disk type. The default value is
network-ssd. - Disk size in GB: Specify the disk size. The default value is
20.
Database parameters:
- DB password secret ID: Specify the ID of the Yandex Lockbox secret containing the database password with the
db_passwordkey. If no secret is specified, a random password will be generated; you can find its value in the automatically created secret. - DB root password secret ID: Specify the ID of the Yandex Lockbox secret containing the root database password with the
db_root_passwordkey. If no secret is specified, a random password will be generated; you can find its value in the automatically created secret.
-
Click Install.
The app installation will take 5-10 minutes. The installation will create the following resources:
- Service account.
- Secrets for storing passwords and access keys.
- Access permissions for the service account.
- Public IP address for the VM.
- Security group for the VM.
- Data storage disk.
- DNS zone entries for the webiste, admin panel, and DB admin panel subdomains.
- S3 bucket for storing media files (images, GIFs, and other files uploaded to the website).
Note
Uploading video files to the S3 bucket is not supported due to limitations of the object storage plugin.
- VM with Ghost CMS.
Once all the resources are created, the VM will begin configuring the website and issuing TLS certificates. Wait for the installation to complete.
Note
Installing the app automatically creates a Yandex Cloud Postbox address and DNS entry for its verification.
Configure Ghost CMS
Once the app is successfully installed, configure Ghost CMS:
-
Open the admin panel URL in your browser:
https://<admin-panel-subdomain>/ghost(where<admin-panel-subdomain>is the subdomain you specified during installation or the website subdomain if no admin panel subdomain was specified). -
Fill out the admin registration form:
- Website name: Specify the name of your website.
- Name: Specify your name.
- Email: Specify the email address for logging in to the admin panel.
- Password: Create a secure password for logging in to the admin panel.
-
Click Create account and run website.
-
After you register, the page will redirect you to the Ghost CMS admin panel where you can start using the website.
Check the result
Make sure that Ghost CMS is up and running:
-
In your browser, open the main website subdomain you specified during the installation. You should see the Ghost CMS home page.
-
Create a test post:
- In the admin panel, click New post.
- Provide the post header and content.
- Upload an image to the post. It will be automatically saved in the S3 bucket.
- Publish the post.
-
Check that the post has appeared on the website home page.
-
Test email notifications:
- In the admin panel, go to the settings section.
- Try recovering the password using "Forgot password?".
- Check the mailbox you specified for the password recovery email.
Note
The integration with Yandex Cloud Postbox supports user registration and password recovery. Yandex Cloud Postbox does not support bulk mailing because the feature requires a special API.
-
Optionally, if you have specified the DB admin panel domain, open it in your browser:
- Log in to the the DB admin panel.
- Use these credentials:
- Server:
db. - Engine:
MySQL. - Username:
ghost. - Password: Database password. You can view the password value in the secret that was automatically generated during the installation. The secret name contains
db-passwords-secret.
- Server:
How to delete the resources you created
To shut down the resources you created and stop paying for them:
-
Delete the installed Ghost CMS app:
- In the management console
, select the folder the application is installed in. - In the list of services, select Cloud Apps.
- Find the installed Ghost CMS app in the list.
- Click
next to the app and select Delete. - Confirm the app deletion.
Warning
When you delete the app, the following is not deleted automatically:
- Yandex Cloud Postbox address created during the installation.
- DNS entry for Yandex Cloud Postbox verification.
These resources need to be deleted manually.
- In the management console
-
Delete the public DNS zone if you no longer need it.
-
Delete the Yandex Cloud Postbox address and DNS entries related to it if you no longer need them.