onlyoffice/documentserverONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Integrating it with ONLYOFFICE Community Server you will be able to:
sudo docker run -i -t -d -p 80:80 onlyoffice/documentserver
Use this command if you wish to install ONLYOFFICE Document Server separately. To install ONLYOFFICE Document Server integrated with Community and Mail Servers, refer to the corresponding instructions below.
All the data are stored in the specially-designated directories, data volumes, at the following location:
To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command.
sudo docker run -i -t -d -p 80:80 \ -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data.
To change the port, use the -p command. E.g.: to make your portal accessible via port 8080 execute the following command:
sudo docker run -i -t -d -p 8080:80 onlyoffice/documentserver
sudo docker run -i -t -d -p 443:443 \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Access to the onlyoffice application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self signed certificates can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
To secure the application via SSL basically two things are needed:
So you need to create and install the following files:
/app/onlyoffice/DocumentServer/data/certs/onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt
When using CA certified certificates, these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself. Skip the following section if you are have CA certified SSL certificates.
Generation of self-signed SSL certificates involves a simple 3 step procedure.
STEP 1: Create the server private key
bashopenssl genrsa -out onlyoffice.key 2048
STEP 2: Create the certificate signing request (CSR)
bashopenssl req -new -key onlyoffice.key -out onlyoffice.csr
STEP 3: Sign the certificate using the private key and CSR
bashopenssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
You have now generated an SSL certificate that's valid for 365 days.
This section provides you with instructions to strengthen your server security. To achieve this you need to generate stronger DHE parameters.
bashopenssl dhparam -out dhparam.pem 2048
Out of the four files generated above, you need to install the onlyoffice.key, onlyoffice.crt and dhparam.pem files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
The default path that the onlyoffice application is configured to look for the SSL certificates is at /var/www/onlyoffice/Data/certs, this can however be changed using the SSL_KEY_PATH, SSL_CERTIFICATE_PATH and SSL_DHPARAM_PATH configuration options.
The /var/www/onlyoffice/Data/ path is the path of the data store, which means that you have to create a folder named certs inside /app/onlyoffice/DocumentServer/data/ and copy the files into it and as a measure of security you will update the permission on the onlyoffice.key file to only be readable by the owner.
bashmkdir -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
You are now just one step away from having our application secured.
Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.
Below is the complete list of parameters that can be set using environment variables.
true.31536000./var/www/onlyoffice/Data/certs/onlyoffice.crt./var/www/onlyoffice/Data/certs/onlyoffice.key./var/www/onlyoffice/Data/certs/dhparam.pem.CA_CERTIFICATES_PATH file. Defaults to falseONLYOFFICE Document Server is a part of ONLYOFFICE Community Edition that comprises also Community Server and Mail Server. To install them, follow these easy steps:
STEP 1: Create the 'onlyoffice' network.
bashdocker network create --driver bridge onlyoffice
Than launch containers on it using the 'docker run --net onlyoffice' option:
STEP 1: Install ONLYOFFICE Document Server.
bashsudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ onlyoffice/documentserver
STEP 2: Install ONLYOFFICE Mail Server.
For the mail server correct work you need to specify its hostname 'yourdomain.com'. To learn more, refer to the ONLYOFFICE Mail Server documentation.
bashsudo docker run --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server \ -p 25:25 -p 143:143 -p 587:587 \ -v /app/onlyoffice/MailServer/data:/var/vmail \ -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \ -v /app/onlyoffice/MailServer/logs:/var/log \ -v /app/onlyoffice/MailServer/mysql:/var/lib/mysql \ -h yourdomain.com \ onlyoffice/mailserver
STEP 3: Install ONLYOFFICE Community Server
bashsudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server \ -p 80:80 -p 5222:5222 -p 443:443 \ -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/mysql:/var/lib/mysql \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/DocumentServerData \ -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \ -e MAIL_SERVER_DB_HOST=onlyoffice-mail-server \ onlyoffice/communityserver
Alternatively, you can use an automatic installation script to install the whole ONLYOFFICE Community Edition at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.
STEP 1: Download the Community Edition Docker script file
bashwget [***]
STEP 2: Install ONLYOFFICE Community Edition executing the following command:
bashbash opensource-install.sh -md yourdomain.com
Or, use docker-compose. For the mail server correct work you need to specify its hostname 'yourdomain.com'. Assuming you have docker-compose installed, execute the following command:
bashwget [***] docker-compose up -d
As a relatively new project Docker is being worked on and actively developed by its community. So it's recommended to use the latest version of Docker, because the issues that you encounter might have already been fixed with a newer Docker release.
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling selinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by RedHat, or switch to using Ubuntu.
ONLYOFFICE installation requires the presence of mono (tested for version 3.12.1 or older) that may cause problems for some Linux kernel versions. The full list of supported kernel versions is available here.
Official website: [***]
Code repository: [***]
Docker Image: [***]
License: GNU AGPL v3.0
SaaS version: [***]
If you have any problems with or questions about this image, please contact us through dev.onlyoffice.org.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务