How to install Cradle CMS with Podman on a Linux server.
Login with Podman
The podman/docker username is the licence key
which you find under Licences on your account page. Password is the customer account password
.
podman login registry.cradlecms.com:5000
Username: Password: Login Succeeded!
Create storage
Its good practise to create a docker / podman volume so that the container/server can persist your data (media and databases) on the host system (your linux server).
podman volume create storage
Download the latest cradle-cms image
podman pull registry.cradlecms.com:5000/cradle-cms:latest
Installation
To install and start cradle-cms
is just a simple one-liner.
For production
podman run -it -d --restart unless-stopped -p 443:4040 -p 80:8080 --name cradle-cms -v storage:/storage -e ADMIN_PASS="" -e SECRET_KEY="" -e DOMAIN_NAME="your.site.domain" registry.cradlecms.com/cradle-cms:latest
All environment options (-e) is needed for the first time setup. Basically it creates the first admin user and configures an encryption key used for sensitive data, such as your email server password.
Configuration options: site, frontend and admin
You also need to register and setup a domain name at a domain name provider.
cradle-cms automatically negotiates a SSL certificate from letsencrypt on demand. You can install your own default certificate in
/storage/certs/cert.pem
Local setup (for test driving) without a domain
Creates a webserver on https://localhost:4040.
podman run -v storage:/storage -p 4040:4040 -e ACME=false registry.cradlecms.com:5000/cradle-cms:latest
Admin at /admin
username admin
, password admin password
.
To start cradle-cms without a domain name we use the
-e ACME=false
environment option. It disables automatic letsencrypt certificates and defaults to a self-signed certificate. More configuration options.
Logs
The system log is written to standard out in json
format so you can use tools such as jq
to filter log messages. To see the log output you need to use docker logs
as shown in the example.
podman logs -f <container id>
You can also subscribe to a log event stream using the nats
client.
nats subscribe "logs.>"
[#6] Received on "logs.frontend" {"time":"2024-09-28T08:54:26.176Z","level":"INFO","service":"frontend","msg":"render","host":"localhost:5000","site":"17427f63-e498-4654-bcaa-a6f24afabeef","path":"/","type":"index","handle":"","lang":"en"}
Use the log stream if you want to store the log on another server or monitor it in real time.
References
- Podman installation: Podman Installation Instructions on Linux
- Podman documentation: What is Podman?