ONLYOFFICE Docs is a comprehensive open-source office suite licensed under the GNU AGPL v3.0. It includes web-based editors for documents, spreadsheets, and presentations, and offers excellent compatibility with OOXML formats.
ONLYOFFICE Docs can seamlessly integrate with cloud platforms such as Nextcloud, ownCloud, Seafile, Alfresco, HumHub, and Plone. Additionally, it is suitable for integration into custom-built solutions. When combined with ONLYOFFICE Groups, an open-source collaboration platform under the Apache 2.0 license, it provides a full-featured suite branded as ONLYOFFICE Workspace.
This guide will walk you through the installation of ONLYOFFICE Docs using Docker.
What’s New in ONLYOFFICE Docs 6.1
- Endnotes: Easily insert references at the end of sections or documents.
- Cross-references: Link to other parts of your document, such as charts or bookmarks, with ease.
- Line counting: Reference specific lines within your documents.
- Improved data series management: Simplify chart editing with enhanced features for rearranging data.
- Enhanced proofing tools: Edit math autocorrect options for equations efficiently.
System Requirements
- CPU: Dual-core 2 GHz or higher
- RAM: 4 GB or more
- HDD: Minimum 2 GB of free space
- Swap: At least 2 GB
- OS: 64-bit Ubuntu with kernel version 3.8 or later
- Docker: Version 1.10 or newer
Installing ONLYOFFICE Docs
Make sure you have the latest version of Docker installed. Follow this official Docker guide if needed.
To install ONLYOFFICE Docs along with its dependencies, execute the following command:
sudo docker run -i -t -d -p 80:80 --restart=always onlyoffice/documentserver
Changing the Port
The default port for ONLYOFFICE Docs is 80. To change it, use:
sudo docker run -i -t -d -p <PORT_NUMBER>:80 --restart=always onlyoffice/documentserver
Storing Data Externally
It’s highly recommended to store all logs, certificates, caches, and databases on the host machine, outside the Docker containers. This allows for easy application updates without data loss.
To configure this, mount the volumes using the -v option:
sudo docker run -i -t -d -p 80:80 --restart=always \ -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver
Running ONLYOFFICE Docs with HTTPS
To run ONLYOFFICE Docs with HTTPS, execute the command:
sudo docker run -i -t -d -p 443:443 --restart=always \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Ensure you create and install the necessary SSL files:
/app/onlyoffice/DocumentServer/data/certs/onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt
For CA-certified certificates, obtain the files from the CA. For self-signed certificates, generate them yourself with:
openssl genrsa -out onlyoffice.key 2048 openssl req -new -key onlyoffice.key -out onlyoffice.csr openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
Enhance security by generating stronger DHE parameters:
openssl dhparam -out dhparam.pem 2048
Install the necessary SSL files with:
mkdir -p /app/onlyoffice/DocumentServer/data/certs cp onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/ cp onlyoffice.crt /app/onlyoffice/DocumentServer/data/certs/ cp dhparam.pem /app/onlyoffice/DocumentServer/data/certs/ chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
Finally, restart your Docker container:
sudo docker restart {{DOCUMENT_SERVER_ID}}
For more configuration using environment variables, check the GitHub repository.
Congratulations! You can now integrate ONLYOFFICE Docs into your existing platform and begin collaborative editing.
FAQ
- Can ONLYOFFICE Docs integrate with other platforms?
Yes, it can integrate with various cloud storage platforms such as Nextcloud, ownCloud, and others, as well as with custom-built solutions. - Do I need Docker to run ONLYOFFICE Docs?
Yes, this guide is based on installing ONLYOFFICE Docs using Docker. Ensure Docker is installed and up-to-date on your system. - How can I change the default port?
Use the -p option in the Docker run command to specify a different port. - Is it necessary to use HTTPS?
Although it’s not mandatory, using HTTPS is recommended for security purposes, especially when handling sensitive documents. - Where should I store my documents and logs?
It’s advised to store these externally on the host machine to prevent data loss during software updates.