How to Integrate OnlyOffice with WordPress on Ubuntu Server

As you may probably know, you can use WordPress to set up a website or blog and OnlyOffice is a self-hosted online office document server. This tutorial will be showing you how to integrate OnlyOffice with WordPress, so you will be able to edit office documents (DOCX, XLSX, PPTX, etc.) right from the WordPress web interface.

Feature of the WordPress OnlyOffice Integration App

  • Full-featured text editor is available online with all the functionality of desktop editors.
  • 100% view, conversion, print, and pagination fidelity.
  • It allows you to add links, tables, charts, insert images, auto shapes, formulas, text objects and manipulate them, create bulleted or numbered lists.
  • Supports DOCX, XLSX, PPTX, TXT file editing and saving. You can also save the file in other formats like ODT, ODS, ODP, DOC, XLS, PPT, PPS, EPUB, RTF, HTML, HTM.
  • Fully compatible with Office Open XML formats: .docx, .xlsx, .pptx
  • Auto-save your files, so you won’t lose your work.
  • Supports Latin, CJK (Chinese, Japanese, Korean) characters.

Prerequisites

OnlyOffice document server requires at least a 2-core CPU and 2GB RAM. To make it run smoothly with WordPress, I recommend using a server with a 4-core CPU and 4GB RAM. You can buy a powerful VPS from Contabo at very little cost. If there’re many users, you should consider upgrading the server specs.

To complete this guide, you need to have a working WordPress server. If you haven’t already done so, please read the following article to set up WordPress server first.

Then read the following instructions to integrate OnlyOffice and WordPress. The OnlyOffice document server and WordPress server can be installed on two different hosts.

Let’s get started.

Step 1: Install OnlyOffice Document Server on Ubuntu

OnlyOffice document server depends on PostgreSQL, Node.js, Redis Server, RabbitMQ server and Nginx. The following steps are tested on a Ubuntu 22.04 server but should also be applicable to Linux distributions in the Debian family.

Install PostgreSQL on Ubuntu

PostgreSQL is available from the default Ubuntu repository. The PostgreSQL team always strives to make performance improvements with every new version. Run the following commands to install the latest version of PostgreSQL from the postgresql.org repository.

echo "deb [signed-by=/etc/apt/keyrings/postgresql.asc] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

sudo mkdir -p /etc/apt/keyrings/

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/keyrings/postgresql.asc

sudo apt update

sudo apt install -y postgresql postgresql-contrib postgresql-15 postgresql-client-15

Then create the onlyoffice database.

sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;"

Create the onlyoffice user.

sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"

Grant permission.

sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"

Note: Both the username and password must be onlyoffice.

Install NodeJS from official repository

OnlyOffice document server requires nodejs version 14.0+, but the version in Ubuntu repository is outdated, so we will need to install Node.js from upstream repository.

Add Node.js repostiory.

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

Install Node.js.

sudo apt install nodejs -y

Check Node.js version.

node -v

Sample output:

v14.21.1

Install Redis server and Rabbitmq

sudo apt install redis-server rabbitmq-server

Check their status.

systemctl status redis-server

systemctl status rabbitmq-server

You should see they are active (running). If rabbitmq-server failed to start, that’s mostly because of low memory on the machine or invalid hostname. Redis server listens on 127.0.0.1:6379. RabbitMQ listens on 0.0.0.0:25672 and 0.0.0.0:4369

Install OnlyOffice document server

Add OnlyOffice repository with the following command. (You might be wondering if it’s ok to use the Debian squeeze repository on Ubuntu. Don’t worry. This OnlyOffice repository is meant for all Debian and Ubuntu releases.)

echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list

Import OnlyOffice public key.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5

Update local package index and install OnlyOffice document server. Note that the onlyoffice-documentserver package will install nginx-extras as a dependency, so if an Apache web server is running, you need to stop it first.

sudo apt update

sudo apt install onlyoffice-documentserver

During the installation process, you will be asked to enter PostgreSQL password for onlyoffice. Enter “onlyoffice” (without double quotes).

onlyoffice document server install

You also need to accept the Microsoft license terms in order to install TrueType core fonts from Microsoft.

install onlyoffice document server on ubuntu 16.04

An Nginx server block will be installed as /etc/nginx/conf.d/ds.conf. (It’s actually a symbolic link to /etc/onlyoffice/documentserver/nginx/ds.conf.) The OnlyOffice document server is a nodejs web application and Nginx acts as the reverse proxy. /var/www/onlyoffice/documentserver/ is the web root directory.

Once the installation is finished, enter your server’s public IP address in a web browser, and you should see “ONLYOFFICE Docs Community Edition installed”

onlyoffice document server ubuntu

To check the version number of the document server, you can use the following command.

apt search onlyoffice-documentserver

Sample output.

onlyoffice-documentserver/squeeze,now 7.2.1-23 amd64 [installed]
  Online editors for text documents, spreadsheets, and presentations

If you encounter the following error during installation, it might be that there’s an error in your Nginx configuration files. Run sudo nginx -t to find out.

dpkg: error processing package onlyoffice-documentserver (--configure):
 installed onlyoffice-documentserver package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

Step 2: Enabling HTTPS for the Document Server

To connect WordPress to OnlyOffice document server, the latter must be running in HTTPS mode (Both the WordPress server and user browsers will need to make contact with document server). The following steps show how to obtain and install Let’s Encrypt TLS certificate.

First, we need to edit the OnlyOffice Nginx server block file.

sudo nano /etc/nginx/conf.d/ds.conf

We add a server_name directive like below. Don’t forget to set DNS A record for onlyoffice.your-domain.com.

include /etc/nginx/includes/http-common.conf;
server {
  listen 0.0.0.0:80;
  listen [::]:80 default_server;
  server_tokens off;
  server_name onlyoffice.your-domain.com;

  include /etc/nginx/includes/ds-*.conf;
}

Save and close the file. Reload Nginx for the changes to take effect.

sudo systemctl reload nginx

Then install certbot (Let’s Encrypt) client and the Nginx plugin.

sudo apt install certbot python3-certbot-nginx

Next, run the following command to obtain a free TLS certificate using the Nginx plugin.

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d onlyoffice.your-domain.com

Where:

  • --nginx: Use the nginx plugin.
  • --agree-tos: Agree to terms of service.
  • --redirect: Force HTTPS by 301 redirect.
  • --hsts: Add the Strict-Transport-Security header to every HTTP response. Forcing browser to always use TLS for the domain. Defends against SSL/TLS Stripping.
  • --staple-ocsp: Enables OCSP Stapling. A valid OCSP response is stapled to the certificate that the server offers during TLS.

Within a few seconds, you shall see a message like below, which means the TLS certificate is successfully obtained.

onlyoffice document server https

Visit https://onlyoffice.your-domain.com in web browser to verify OnlyOffice document server is running correctly in HTTPS mode.

onlyoffice nextcloud

Step 3: Install WordPress OnlyOffice Integration App

Log into WordPress web interface as an admin, and go to the Plugins page to search the OnlyOffice plugin. Install and activate it.

wordpress onlyoffice plugin

 

After that, go to WordPress Settings page, select ONLYOFFICE tab on the left pane and enter the domain name for OnlyOffice (https://onlyoffice.example.com) in Document Editing Service Address field.

onlyoffice wordpress settings

After saving the above setting, you can create new WordPress Posts and insert .docx, .xlsx, .pptx files to your WordPress posts.

Note: OnlyOffice is only available in the default WordPress Block Editor. You can’t use it in the classic editor.

Installing OnlyOffice Document Server and WordPress on the Same Host

The OnlyOffice Document server uses Nginx as web server.

If you have an existing WordPress server running with Nginx, then there’s no damage to your WordPress server when installing OnlyOffice on the same machine. It will remove nginx-core and install nginx-extras package, so there’ll be a little downtime, but your configurations will be intact.

If you have an existing WordPress server running with Apache web server, and you want to install OnlyOffice on the same machine, then you have two choices:

  1. Stop/remove Apache, use Nginx as the web server for both WordPress and OnlyOffice. You can use the WordPress Nginx config in this tutorial.
  2. Configure Nginx as a reverse proxy for Apache.

How to Upgrade OnlyOffice Document Server

When a new version of OnlyOffice document server comes out, you simply use the apt package manager to upgrade to the new version.

sudo apt update;sudo apt upgrade

Note that the new version will override your customizations in the /etc/nginx/conf.d/ds.conf file. I recommend backing up this file with the following command, so you will be able to easily restore your custom configurations.

cat /etc/nginx/conf.d/ds.conf | sudo tee /etc/nginx/conf.d/ds.conf.backup

Wrapping Up

I hope this tutorial helped you with integrating OnlyOffice with WordPress. As always, if you found this post useful, then subscribe to our free newsletter. You can also follow us on Google+, Twitter or like our Facebook page.

Rate this tutorial
[Total: 20 Average: 4.1]

47 Responses to “How to Integrate OnlyOffice with WordPress on Ubuntu Server

  • roland andersson
    6 years ago

    Worked very well. But in the end I lost https. I got a message that cetrificate was OK, and the webbpage showed https:. But after having run the Script to Integrate OnlyOffice and NextCloud I get only http and not safe.
    How can I solve that?

  • Hello. I followed the tutorial, and I was able to get to the Nextcloud login page through plain http. But when I run certbot to get the SSL certificate, I get the following error:

    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator webroot, Installer None
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for cloud.my-real-domain.com
    Using the webroot path /var/lib/docker/volumes/docker-onlyoffice-owncloud_app_data/_data for all unmatched domains.
    Waiting for verification...
    Cleaning up challenges
    Failed authorization procedure. cloud.my-real-domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cloud.my-real-domain.com/.well-known/acme-challenge/2435h243jk5h4j3kl5hkjlh342klj5hklj [22.22.22.22]: 403
    
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: cloud.my-real-domain.com
       Type:   unauthorized
       Detail: Invalid response from
       http://cloud.my-real-domain.com/.well-known/acme-challenge/2435h243jk5h4j3kl5hkjlh342klj5hklj
       [22.22.22.22]: 403
    
       To fix these errors, please make sure that your domain name was
       entered correctly and the DNS A/AAAA record(s) for that domain
       contain(s) the right IP address.

    Any suggestion?

    • Okay, for anyone having the same problem, you can fix it by placing this location in the server block of nginx.conf, instead of the one detailed in the tutorial:

              location ^~ /.well-known/acme-challenge/ {
              default_type "text/plain";
              root         /var/www/html/;
              }
      

      Notice the caret before the tilde, that will prevent nginx from processing other regexp.

    • Thank you so much! @Juan

  • Eduardo Rudas
    6 years ago

    Excellent tutorial, thanks a lot!!!
    It worked flawlessly, except when i tried to finish the install wizard. It was failing to login in the database. I check the ip of the containers and it doesn’t match the ip assigned to mariadb user, so I choose to use (the lazy approach) 172.%.%.% and then the install wizard worked:

    create user nextclouduser@'172.%.%.%' identified by 'your-password';
    
    grant all privileges on nextcloud.* to nextclouduser@'172.%.%.%' identified by 'your-password';

    I ran set_configuration.sh, but now Onlyoffice is complaining about it can’t save the document, I will see what’s happening…

  • Norbert
    6 years ago

    Hello, the tutorial is good and works too. There is only the problem, if I reach my server over http, everything works fine. Also OnlyOffice works. If I switch to https, Nextcloud will continue to work, but OnlyOffice will stop working. The error: “Document can not be saved and loaded” appears and I have to cancel. When I remove the block for ssl in nginx.conf, everything works again. How do I get OnlyOffice running via https?

    • Xiao Guo-An (Admin)
      6 years ago

      Hello. I think this is a problem in OnlyOffice itself. You should ask OnlyOffice developers to fix this error.

  • Does anybody know why the menu isn’t “complete”? I’m not able to see and therefore change the different menu-tabs as mentioned on the official onlyoffice site:

    We are adding more and more editing tools, so navigating around them threatened to become confusing for our users one day soon. But we have found a way out – the new interface layout. It groups editing instruments into functional tabs to make your work more intuitive.

    In your screenshot there are no tabs either…

  • Barry Rowlingson
    6 years ago

    I’m getting “App “Onlyoffice” cannot be installed because it is not compatible with this version of the server.” when trying to enable Onlyoffice (using either the script or the GUI). I guess the nextcloud:fpm image isn’t compatible with the current onlyoffice/documentserver:latest image…

    • CESAR RB
      5 years ago
      git clone --recursive https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud
      cd docker-onlyoffice-nextcloud
      git submodule update --remote
      
      nano docker-compose.yml
      
      	image: nextcloud:fpm
      
      	- /etc/letsencrypt:/etc/letsencrypt
      
      nano nginx.conf
      
      	server {
      	     listen 80;
      	     server_name cloud.server.com;
      	....
      
      	location ^~ /.well-known/acme-challenge/ {
      	        default_type "text/plain";
              	root         /var/www/html/;
              }
      
      
      sudo docker-compose up -d
      sudo docker network ls
      sudo docker ps
      
  • Syed Muhammad Hassan
    6 years ago

    Dear All I getting an error when I run “sudo bash set_configuration.sh”.

      [Exception]
      App "ONLYOFFICE" cannot be installed because it is not compatible with this
       version of the server.

    I can note edit or open files in nextcloud. Please help.

    My os is:
    NAME="Ubuntu"
    VERSION="16.04.3 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.3 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial
    • Xiao Guo-An (Admin)
      6 years ago

      Hi, please go to the NextCloud Apps page to update ONLYOFFICE to the latest version, enable it, then run this script again.

  • Syed Muhammad Hassan
    6 years ago

    Dear Xiao,
    Thank you so much for your reply. I did this but now I got new error.

    “The document could not be saved. Please check connection settings or contact your administrator.
    When you click the ‘OK’ button, you will be prompted to download the document.

    Find more information about connecting Document Server here.”

    I know it is weird to asking for help again and again but I will be much obliged for your help

    • I ran into the same problem as Syed when trying to create and edit my first document with ONLYOFFICE:

      ——–

      “The document could not be saved. Please check connection settings or contact your administrator.

      When you click the ‘OK’ button, you will be prompted to download the document.

      Find more information about connecting Document Server here.”

      ——–

      Someone at https://help.nextcloud.com/t/warning-the-document-could-not-be-saved/26550/6 managed to solve it saying:

      “After lots of messing around, I was able to resolve this for our setup. First, I put the generated certs in a certs folder under the app_data > data folder for our docker volume. Then I added https: for https://nginx-server/ 9 to our Server address for internal requests from the Document Editing Service under admin. Previously, it was set as the default http.”

      …but I’m not sure how that’s done in the CLI. Would be great if you can update this tutorial with the steps. Thanks!

  • Syed Muhammad Hassan
    6 years ago

    Dear All,

    First of all I would like to thank Mr. Xiao Guo. He is the life saver and real hero. I wish I could meet him once in my life. He solved my problem by messenger, email reply and whatever medium I adopted to reach him. I am in debt for the whole of my life. When I texted he was going to sleep but still he replied to me. I am so grateful to him. Literally I have no words to thank him. He is the buddy I ever found. He is so helpful and supportive. I just say Love you Xiao Guo. Best wishes from my side. Keep up the good work.
    My VPS was down by service provider. Now I installed this as the same way as mentioned in that tutorial. This works like a charm. It is the best ever tutorial I ever found. This is the method on internet. Hats off to you. Bundle of thanks.

  • Hello,
    Thanks for this guide. Very helpful.
    Do you know how can I run two separate nextcloud installations with different domains on the same server ?
    I’ve tried a lot of things but not able to do that.
    Many thanks for your help.
    Bruno

  • Ricardo
    6 years ago

    As I can fix the ip of the containers, in the first installation all right, when I turned on the virtual machine, the ip of the container had changed

    • Xiao Guo-An (Admin)
      6 years ago

      You can use wildcard to create an user on a specific network range like so:

      create user nextclouduser@172.%.%.% identified by 'your-password';
  • Spongle
    6 years ago

    Thanks for the write-up, it’s very detailed. I can’t get it to work. I have a droplet on Digital Ocean. I install docker, and manage to get up to composing the yml file. Using “sudo docker ps” does show the 3 containers working. However, when I go to my domain, or the IP address, nothing loads.

    I can install nextcloud via snap, and regular apt method, and that seems to work. I can’t figure out what I’m doing wrong, and have had to refresh my OS several times.

    • spongle
      6 years ago

      Update: It works as instructed when using Ubuntu 16.04.

      I still can’t get it working on Ubuntu 18.04, even though it all downloads.

  • Thank you for this tutorial, it is perfect 🙂
    I followed it, there are several months but how to update the containers with the latest version?

  • Thank You.

    All is working except ssl: I’m using local domain and bind9 dns with samba4 plugin on the other server. And certbot does not want to find a record for my local domain in dns server and to create certificates, so I gave up for now and using http.

  • Hi Xiao
    All works great! But I then abled SSL and now I have the onlyoffice error ‘The document could not be saved. Please check connection settings or contact your administrator.
    When you click the ‘OK’ button, you will be prompted to download the document.’
    I have tried the fix you suggested but I then loose all access to nextcloud. Any ideas?

    Thanks!

  • Hi Xiao,

    this tutorial is a great help for this topic and after digging the tls-redirection-“no saved”-issue i found the solution to avoid it.

    If you are interested in about it, send me an email account, I will describle it for you.

  • Giovanni
    5 years ago

    Brilliant tutorial! Thanks a lot. Everything worked fine, but after a restart I am having a 500 error; the log says:

    PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'nextclouduser'@'172.18.0.4' (using password: YES) in /var/www/html/lib/private/DB/Connection.php:64

    Any ideas about the reason and hopefully about possible solutions?

    Thanks again,

    Giovanni

    • Xiao Guo-An (Admin)
      5 years ago

      Maybe because the IP address has changed. You can use wildcard to create an user on a specific network range like so:

      create user nextclouduser@172.%.%.% identified by 'your-password';
  • Giovanni Spitale
    5 years ago

    Thanks, it works!

  • It’s possible to run it over Kubernetes? Have anybody tried it?
    Thank you

  • Marceau
    5 years ago

    I’ve donne the installation (except SSL part as it will running behind a VPN – not configure yet still on local network)… It was working great but after a restart I’ve only a blank page when accessing my IP, all containers running… a bit disappointing and frustrating :/ Any help on this? (I’m actually working on a virtual host before installing it to my physical server)

  • Giovanni
    5 years ago

    Hello everyone,
    This entire setup has been working like a breeze for about a month; now, right after aa server reboot (intentional and gentle) Nextcloud is working, but Onlyoffice is not. Any ideas? Thanks!

  • CESAR RB
    5 years ago

    GITHUB REPO ONLYOFFICE FOR NEXTCLOUD (no owncloud)

    git clone --recursive https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud
    cd docker-onlyoffice-nextcloud
    git submodule update --remote
    
    nano docker-compose.yml
    
    	image: nextcloud:fpm
    
    	- /etc/letsencrypt:/etc/letsencrypt
    
    nano nginx.conf
    
    	server {
    	     listen 80;
    	     server_name cloud.server.com;
    	....
    
    	location ^~ /.well-known/acme-challenge/ {
    	        default_type "text/plain";
            	root         /var/www/html/;
            }
    
    
    sudo docker-compose up -d
    sudo docker network ls
    sudo docker ps
    

    INSTALL LETS ENCRYPT

    	sudo apt-fast install software-properties-common
    	sudo add-apt-repository ppa:certbot/certbot
    	sudo apt-fast update
    	sudo apt-fast -y install certbot
    
    	sudo certbot certonly --webroot --agree-tos --email [email protected] -d cloud.server.com -w /var/lib/docker/volumes/dockeronlyofficenextcloud_app_data/_data
    

    FIX NGINX HTTP POLICY FOR NEXTCLOUD

    nano nginx.conf
    
    add_header Referrer-Policy no-referrer;
    add_header Feature-Policy "autoplay *; fullscreen *; vertical-scroll *";
    

    INTEGRATE ONLYOFFICE AND NEXTCLOUD

    	sudo bash set_configuration.sh
    
    	nano nginx.conf
    
    		if ($scheme != "https") {
     		        return 301 https://$host$request_uri;
    		}
    
    	sudo docker restart nginx-server
    

    NOW appear the ONLYOFFICE tab-menu when login to nextcloud server

  • CESAR RB
    5 years ago

    INTEGRATE ONLYOFFICE AND NEXTCLOUD

    	nano nginx.conf
    
    
    		user  www-data;
    		worker_processes  1;
    
    		error_log  /var/log/nginx/error.log warn;
    		pid        /var/run/nginx.pid;
    
    		events {
    		    worker_connections  1024;
    		    #ONLYOFFICE
    		    multi_accept on;
    		    use epoll;
    		    #ONLYOFFICE
    		}
    
    		http {
    
    		    upstream backend {
    		      server app-server:9000;
    		    }
    
    		    #ONLYOFFICE
    		    server_names_hash_bucket_size 64;
    		    upstream onlyoffice-docker {
    		    server 127.0.0.1:8443;
    		    }
    		    set_real_ip_from 127.0.0.1;
    		    set_real_ip_from 172.16.0.0/24;
    		    real_ip_header X-Forwarded-For;
    		    real_ip_recursive on;
    		    #ONLYOFFICE
    		    include       /etc/nginx/mime.types;
    		    default_type  application/octet-stream;
    
    
    	screen -S dhparam
    	openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096
    
    	mkdir -p /app/onlyoffice/DocumentServer/data/certs
    
    	cp /etc/letsencrypt/live/cloud.server.com/privkey.pem /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
    	cp /etc/letsencrypt/live/cloud.server.com/fullchain.pem /app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt
    	cp /etc/ssl/certs/dhparam.pem /app/onlyoffice/DocumentServer/data/certs/dhparam.pem
    	chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
    
    	sudo docker restart nginx-server
    	sudo bash set_configuration.sh
    	nano nginx.conf
    
    		if ($scheme != "https") {
     		        return 301 https://$host$request_uri;
    		}
    
    
    	docker run --name=ONLYOFFICEDOCKER -i -t -d -p 8443:443 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -e JWT_ENABLED='true' -e JWT_SECRET='yourpass' --restart=always onlyoffice/documentserver
    
    	sudo docker restart nginx-server
    

    RECLAIM SPACE

    	docker system df
    	docker system prune
    
  • Hello
    I just followed your tutorial and get the error “App “ONLYOFFICE” cannot be installed because it is not compatible with this version of the server.”. I check the App page of Nextcloud and see in red “Server version 10 or lower is required.” and cannot find any update for this app. Is there an issue with Nextcloud 11 and current version of Onlyoffice ?
    Or is it a way to bypass this limitation ?
    Thanks for helping.

    • Update : following this https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/37 I downloaded the app manually with –depth=1 :
      sudo git clone –depth=1 https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git onlyoffice
      And then moved mv onlyoffice/ /var/lib/docker/volumes/docker-onlyoffice-owncloud_app_data/_data/apps/
      chowned and it’s now working with the previous version of the app.

  • Followed the tutorial, and all is working good, thanks!
    Anybody able to get pretty url’s working? I’ve tried many methods, but am not able to remove index.php from the url.

  • Anders Sandblad
    5 years ago

    Isn’t the “OnlyOffice document server” free for just a 30 day trial?
    Or does that only apply to the version installed with deb/packages while the docker installation is free??

    • Anders Sandblad
      5 years ago

      I finally found this nice table:
      https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions
      So yes, there’s a “community edition” that is free and open source.

  • Giovanni Spitale
    5 years ago

    hello and thanks again for this nice tutorial! Question: the update tool from the web interface is not working. Is there fast and reliable way to update the entire docker container?
    Thanks!

  • Hello,
    I didn’t set the HTTPS because my server is in LAN and cannot be accessed from the outside (so far I was never able to validate a certificate …)
    Except for that, I installed nextcloud and onlyoffice using these steps.

    I don’t get error messages, but after the script, the onlyoffice connector doesn’t work, it says it requires server version 10 minimum.
    Nextcloud is version 15 and offers to update to version 16, but it doesn’t seem to have the permissions to do it automaticaly.
    There is no option tu update the onyoffice connector from the app interface. If I delete it, I cannot download and install it (because of server version, again).

    I’m not sure how to fix that :s

    I would very much appreciate if someone had a hint :3
    Thank you in advance for your time !
    Chris

  • How can I add a trusted domain in nextcloud, I have loocked for config.php to add it but I couldn’t find it, could you tell me where it is

  • ztehack
    5 years ago

    To get your truested domains:
    docker exec -u www-data app-server php occ config:system:get trusted_domains

    To set a new one, (eg position 3):
    docker exec -u www-data app-server php occ config:system:set trusted_domains 3 –value=thirddomain.com

  • stephen
    4 years ago

    For those of us not familiar enough with docker/docker-compose, do you think you could make a yaml file that includes the setup of a redis-server container and a mariadb-server container? Also to get a customized nextcloud-data directory to mount? This is what I have so far and it’s not working out.

    version: ‘3’
    services:
    app:
    container_name: app-server
    image: nextcloud:fpm
    stdin_open: true
    tty: true
    restart: always
    expose:
    – ’80’
    – ‘9000’
    volumes:
    – app_data:/nextcloud-data/
    onlyoffice-document-server:
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver:latest
    stdin_open: true
    tty: true
    restart: always
    expose:
    – ’80’
    – ‘443’
    volumes:
    – document_data:/var/www/onlyoffice/Data
    – document_log:/var/log/onlyoffice
    nginx:
    container_name: nginx-server
    image: nginx
    stdin_open: true
    tty: true
    restart: always
    ports:
    – 80:80
    – 443:443
    volumes:
    – ./nginx.conf:/etc/nginx/nginx.conf
    – app_data:/nextcloud-data/
    – /etc/letsencrypt:/etc/letsencrypt
    redis:
    container_name: redis
    image: redis
    ports:
    – 6379:6379
    hostname: redis
    command: [“redis-server”, “–appendonly”, “yes”]
    volumes:
    – redis-data:/data
    db:
    image: mariadb
    command: –transaction-isolation=READ-COMMITTED –binlog-format=MIXED –log-bin
    restart: always
    volumes:
    – db:/var/lib/mysql
    environment:
    – MYSQL_ROOT_PASSWORD=LinuxBabeIsAwesomeness
    – MYSQL_PASSWORD=LinuxBabeIsAwesome
    – MYSQL_DATABASE=nextcloud
    – MYSQL_USER=nextclouduser volumes:
    document_data:
    document_log:
    app_data:
    redis-data:
    db:

  • whether the data server must be different from the onlyoffice server?

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here