Detailed process of docker installation and deployment of onlyoffice


0. System requirements

CPU i5-10400f or above

Memory 16 GB, best 32g

The hard disk has at least 40 Gb of free space

1: Install docker desktop

2: Enter BIOS to set CPU virtualization

3: Start docker desktop

Error reporting solution:

3: CMD to install onlyoffice

Install universal:

docker pull


docker run -i -t -d -p 8702:80

Install community version [free]:

docker run -i -t -d -p 8703:80 –restart=always onlyoffice/documentserver

View the container, enter docker PS,

Enter the container, docker exec – I – t E15 / bin / bash [E15 is the container ID]

Install the Chinese package, onlyoffice Chinese font package, unzip and run docker_

4: 123. Rar file is the code to edit word, and onlyoffceexample is the code to accept the file

5: H5 page configuration, [IP address must be used instead of localhost]

<!DOCTYPE html>

<html lang="en" xmlns="">


    <meta charset="utf-8" />



<body  style="height:900px;">

    <div style="height:880px;"></div>

    <script type="text/javascript" src=""></script>

    <script type="text/javascript">

        var config = {

            "editorConfig": {

                "lang": "zh-CN",

                "mode": "edit",


            "document": {

                "fileType": "docx",

                "key": "Khirzs6zTPdfd27",

                "title": "Example Document Title.docx",

                "url": " ", // fill in the URL path of the document here


            "documentType": "text",

            "lang": "zh-CN",


        var docEditor = new DocsAPI.DocEditor("placeholder", config);



</html >

6: The existing problems must use [community version], one is [Chinese font]
7: Automatically save the callback after closing the page

[{"created":"2021-06-09 00:16:31","user":
{"created":"2021-06-09 00:16:43","user":
}},{"created":"2021-06-09 00:24:48","user":

8: Document receiving key code [general processing procedure]

public void ProcessRequest(HttpContext context)



            string body;

            using (var reader = new StreamReader(context.Request.InputStream))

                body = reader.ReadToEnd();

            var fileData = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(body);

            if (fileData != null && fileData["status"].ToString() == "2")


                var req = WebRequest.Create((string)fileData["url"]);

                string PATH_FOR_SAVE = context.Server.MapPath("~/temp/") + DateTime.Now.ToString("yyyyMMddhhmmss") + ".docx";

                using (var stream = req.GetResponse().GetResponseStream())

                using (var fs = File.Open(PATH_FOR_SAVE, FileMode.Create))


                    var buffer = new byte[4096];

                    int readed;

                    while ((readed = stream.Read(buffer, 0, 4096)) != 0)

                        fs.Write(buffer, 0, readed);





The above is the details of docker deploying onlyoffice. For more information about docker deploying onlyoffice, please pay attention to other related articles of developeppaer!