Deployment

# Infrastructure

To run CKBox on your server, you need to have certain services prepared first:

  • An SQL database (MySQL and Postgres are supported)
  • A Redis database
  • Data storage (S3, Azure Blob Storage, filesystem, MySQL, or Postgres)

Besides, you need an Open Container runtime to run CKBox. You can use, among others: Docker, Kubernetes, Amazon Elastic Container Service, or Azure Container Instances.

We also recommend using a load balancer. You can use almost any load balancer you choose, like NGINX, HAProxy, Amazon Elastic Load Balancing, or Azure Load Balancer. Thanks to this, you will be able to create TLS connections and run several cooperating instances of CKBox On-Premises. It will increase the security and the performance of the application.

# SQL Database

The SQL database stores persistent data like the configurations of categories, assets metadata, environments information, etc.

It can also be used as a data storage for your assets, but due to the SQL database limitations, the largest file you can send is 4GB. For this reason, we recommend using different storage drivers that can handle bigger files, like S3, Azure Blob Storage or a filesystem.

# MySQL

Minimum required version of MySQL is 5.7, while MySQL in version 8.0 is both supported and recommended. The database and user should have at least the following privileges: ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, TRIGGER, UPDATE, LOCK TABLES, REFERENCES.

If you plan using the MySQL database as a blob storage, increase the max_allowed_packet parameter:

set global max_allowed_packet = 209715200;

The database should be created before running Collaboration Server On-Premises. An example database creation script:

CREATE DATABASE `ckbox-on-premises`
  DEFAULT CHARACTER SET utf8mb4
  DEFAULT COLLATE utf8mb4_bin;

If you want to use another SQL database like Microsoft SQL Server, etc., please contact us.

If binary logging is enabled without the SUPER privilege, please make sure that log_bin_trust_function_creators is enabled. Check your configuration, especially when you use a managed database service (DBaaS) like AWS RDS/Aurora, Azure Database, Google Cloud SQL or DigitalOcean Managed Databases.

# PostgreSQL

Minimum required version of PostgreSQL is 12.0. The database and user should have at least the following privileges: SELECT, INSERT, UPDATE, DELETE, REFERENCES, CREATE, USAGE.

The database with a schema should be created before running Collaboration Server On-Premises. An example database and schema creation script:

CREATE DATABASE "cksource";
\connect "cksource";
CREATE SCHEMA "ckbox-on-premises";

# Running the service

After meeting all infrastructure requirements, you can prepare the CKBox application to run.

Follow the steps below to install CKBox On-Premises using the Docker image.

  • Use the instructions below to log into the CKBox On-Premises Docker Registry and pull the Docker image. To get the DOWNLOAD_TOKEN please contact us.
docker login -u ckbox -p [DOWNLOAD_TOKEN] https://docker.cke-cs.com
docker pull docker.cke-cs.com/ckbox:latest
docker run --init -p 8080:8080 \
    -e LICENSE_KEY=[your license key from CKEditor Ecosystem customer dashboard] \
    -e ENVIRONMENTS_MANAGEMENT_SECRET_KEY=[your management secret key used in management panel] \
    -e DATABASE_DRIVER=[mysql|postgres] \
    -e DATABASE_HOST=[your database host] \
    -e DATABASE_USER=[your database user] \
    -e DATABASE_PASSWORD=[your database user password] \
    -e DATABASE_DATABASE=[your database name] \
    -e REDIS_HOST=[your redis host] \
    -e STORAGE_DRIVER=[s3|azure|filesystem|database] \
    -e STORAGE_ACCESS_KEY_ID=[your AWS access key] \
    -e STORAGE_SECRET_ACCESS_KEY=[your AWS secret key] \
    -e STORAGE_BUCKET=[your S3 bucket name] \
    docker.cke-cs.com/ckbox:[version]