ONLYOFFICE Docs certified by Dameng: How to connect DB to the editors

22 February 2024By Ksenija

Great news! ONLYOFFICE Docs Enterprise got a compatibility certificate with Dameng DB. Check the details below and learn how to connect the database to the editors.

Auto Draft

About Dameng

With the rapid development of the digital economy, Dameng has accumulated rich experience in digital transformation solutions and provides clients with database and cluster software, cloud computing and big data, and more.

The current DM8 is a next-generation large general relational database that fully supports ANSI SQL standards and mainstream programming language interfaces/development frameworks. The database boasts row-column converged storage technology compatible with both OLAP and OLTP systems to meet HTAP hybrid application scenarios.


Together with Wuhan Dameng Database Corporation, we passed mutual testing. As a result, ONLYOFFICE Docs Enterprise got certified as a stable solution compatible with DM8.

ONLYOFFICE Docs certified by Dameng: How to connect DB to the editors
Compatibility certificate

How to connect Dameng DB to ONLYOFFICE Docs

This guide suggests that a test bench has already been implemented in a separate feature/damengdb-compose branch:

BUILD=<build-number-from-develop> docker compose up -d

When installing ONLYOFFICE Docs using Docker, it’s possible to specify the available variables (DB_TYPE, DB_NAME, DB_HOST, DB_USER, DB_PWD, DB_PORT) which allow customizing your database connection.

To connect Dameng DB, add connection conditions and parameters to the initialization entry point script of the ONLYOFFICE Docs (Document Server) image.

Add a new DB type:


Add the function of remote database creation:

create_dameng_tbl() {

  (cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e "create user "onlyoffice" identified by "onlyoffice" password_policy 0;")
  # Create db on remote server
  echo "EXIT" | tee -a $APP_DIR/server/schema/dameng/createdb.sql
  (cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`$APP_DIR/server/schema/dameng/createdb.sql)

After these changes have been added to the entry script, Document Server is ready to initialize the connection to the database.

Create a simple compose file in which you specify the necessary variables for Document Server:

  • DB_TYPE: damengdb
  • DB_HOST: Name (dns name) of the database service in compose file
  • DB_NAME: Name of a database to use. Should be existing on container startup.
  • DB_USER: Username
  • DB_PWD: User password
  • DB_PORT: Service port with database

Mount the binary directory from the damengdb container so that the Document Server container has access to the disql utility. Refer to the docker-compose.yml to learn more.

Running a stand

To start the stand, execute the following commands:

git clone -b feature/damentdb-compose
cd Docker-DocumentServer/tests/damengdb/
docker compose up –d

Note: The database image must be available on hub.docker. We have uploaded the image v8.1.2.128 for your convenience: check it here.