Artikel zum Thema:
Schließen
Changelog
Schließen
In der cloud testen
In der cloud testen
Hilfe-Center
ONLYOFFICE Docs

Connecting MsSQL database to ONLYOFFICE Docs

Currently, there are no Docker variables that allow connecting with MsSQL; the user must perform the steps manually. The steps to connect MsSQL database to ONLYOFFICE Docs are as follows:

  1. Install ONLYOFFICE Docs:
    sudo docker run -i -t -d -p 80:80 --name onlyoffice \
    onlyoffice/documentserveronlyoffice/documentserver-eeonlyoffice/documentserver-de
  2. Install MsSQL on the same or a separate server:
    sudo docker run -p 8080:1433 -d --name mssql  \
    -e "ACCEPT_EULA=Y" \
    -e "MSSQL_SA_PASSWORD=onlYoff1ce" \
    mcr.microsoft.com/mssql/server:2022-latest
    
  3. Download a script for creating tables and copy it to the container; afterwards, create a database and run the script:
    wget https://github.com/ONLYOFFICE/server/raw/master/schema/mssql/createdb.sql
    sudo docker cp ./createdb.sql mssql:/
    sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "CREATE DATABASE onlyoffice;"
    sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "GO"
    sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql
    
    
  4. Change the parameters responsible for establishing a connection in local.json and switch Document Server to mssql:
    sudo docker exec -it onlyoffice bash
    nano /etc/onlyoffice/documentserver/local.json
    {
      "services": {
        "CoAuthoring": {
          "sql": {
            "type": "mssql",
            "dbHost": "mssql_ip_or_hostname",
            "dbPort": "8080",
            "dbName": "onlyoffice",
            "dbUser": "sa",
            "dbPass": "onlYoff1ce"
    ...
    supervisorctl restart all
    
Herunterladen Auf Ihrem eigenen Server hosten Verfügbar für
Docker, Windows und Linux
Wer sich dafür interessiert hat,
hat auch das Folgende gelesen:
Schließen