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:
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:
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]
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:
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:
Default Credentials:
๐ง Final Tips
docker service update --force cradle-cms