Installation Guide for Cradle CMS

The Cradle CMS system enables you to create web projects with built-in page management. It includes a backend with a message bus, a frontend server, an admin UI, and a REST API

In this guide, Iโ€™ll walk you through my journey of installing Cradle CMS on a VPS hosted by Hostinger. Whether you're setting it up for the first time or just want a solid deployment workflow, this guide is for you.

1. โœ… Prerequisites

Before getting started, make sure you have:

  • A Linux VPS with Docker installed (I'm using a Hostinger VPS).
  • A domain name pointed to your VPS via Hostinger.
  • Docker Swarm initialized:
  • Your Cradle CMS license key and customer account password (you'll need these to access the Docker registry).

2. Docker swarm service 

Cradle CMS has multiple components (admin panel, frontend, site engine).
Docker Swarm lets you manage all of them together as one service, rather than running separate containers manually.

Docker swarm init

3. ๐ŸŒ Link Your Domain to the VPS

To point your domain to your VPS, I used this method:

๐Ÿ“Œ Create A Records

Steps:

  1. Log into your Hostinger account.
  2. Go to the DNS Zone Editor for your domain.
  3. Remove any existing A records for @ and www
  4. Add new A records:

A Record 1:

Name: @

Points to: Your VPS IP

TTL: Default

A Record 2:

Name: www

Points to: Your VPS IP

TTL: Default

This setup ensures both example.com and www.example.com point to your VPS.

๐Ÿ” Verify with nslookup

Use this command to confirm that your domain is properly linked:

nslookup yourdomain.com

4. ๐Ÿ’พ Mounting the Volume (Persistent Storage)

To keep your data persistent across restarts, create a dedicated mount point and use fstab to auto-mount it.

Example:

sudo mkdir /storage

sudo nano /etc/fstab

Add an entry like:

fstab 

/dev/sdX1 /storage ext4 defaults 0 2

Then run:

sudo mount -a

sudo systemctl daemon-reexec

Confirm Itโ€™s Mounted:

df -h /storage

๐Ÿ’ก Reboot your server to confirm everything auto-mounts as expected.

5. ๐Ÿ” Log In to Cradle CMS Docker Registry

Use your license credentials to log in:

docker login registry.cradlecms.com

Username: <your-license-key>

Password: <your-cradlecms-account-password>

You should see:

Login Succeeded!

Then pull the image:

docker pull registry.cradlecms.com/cradle-cms:test

6. โš™๏ธ Create the settings.conf File

Cradle CMS needs this file to locate your storage.

 # settings.conf

[settings]
storage_path = "/storage"

This is a TOML config file used by the Cradle CMS services (site, frontend, admin). Its primary role is to tell the services where the mounted storage is located on your server.


7. ๐Ÿ›ก๏ธ Create Docker Secret

Add the settings file as a Docker secret:

the /storage directory:

docker secret create settings.v1 settings.conf

Cradle CMS will read this secret on startup to get configuration values.

8. ๐Ÿšข Deploy Cradle CMS with Docker Swarm

Now we deploy the service:

docker service create \

--name cradle-cms \

--mount type=bind,source=/storage,destination=/storage \

--secret source=settings.v1,target=settings \

--publish published=443,target=4040,mode=host \

--publish published=80,target=8080,mode=host \

--env DOMAIN_NAME=yourdomain.com \

--env ADMIN_PASSW=12345 \

--replicas 1 \

registry.cradlecms.com/cradle-cms:test

โœ… Verify Deployment and shows the running Docker Swarm services.

docker service ls

Then, visit your site:

https://yourdomain.com

And check logs if needed:

docker service logs cradle-cms

Youโ€™ll also see that a database file was created in /storage:

ls -la /storage

8. ๐Ÿ” Access the Admin Panel

Access the admin panel at:

https://yourdomain.com/admin

Default Credentials:

  • Username: admin
  • Password: The one you set during deployment

๐Ÿง  Final Tips

  • Use top or htop to monitor system resources in real-time.
  • Always backup your /storage directory before major changes.
  • To update and restart Cradle CMS:

docker service update --force cradle-cms