The upgrade to Nextcloud 14 from 13 was really easy. Just delete the container, recreate the instance with the same command as before and go through the migration of the database.
In my case I ran the following statement:
docker run -d -p 8102:80 --name=nextcloud \ -v /etc/localtime:/etc/localtime:ro \ -v /volume1/docker/nextcloud/apps/:/var/www/html/custom_apps/ \ -v /volume1/docker/nextcloud/config/:/var/www/html/config/ \ -v /volume1/docker/nextcloud/data/:/var/www/html/data/ \ --link nextcloud-mysql:mysql nextcloud:latest
Post upgrading of the container I check for error messages and I received one saying that I needed to apply new indexes on two tables. I ran the occ command as suggested.
docker exec -it --user www-data nextcloud bash php /var/www/html/occ db:add-missing-indices
Adding OnlyOffice as an in-browser editor to Nextcloud is really easy as it is well documented. I needed to do just one minor modification to the config file that OnlyOffice is providing to terminate SSL for the Document Server of OnlyOffice.
First, lets install the Document Server in a seperate Docker container.
docker run -i -t -d --name onlyoffice -p 8103:80 --restart=always \ -v /volume1/docker/onlyoffice/logs:/var/log/onlyoffice \ -v /volume1/docker/onlyoffice/data:/var/www/onlyoffice/Data \ -v /volume1/docker/onlyoffice/lib:/var/lib/onlyoffice \ -v /volume1/docker/onlyoffice/db:/var/lib/postgresql onlyoffice/documentserver
Next, configure HAProxy for SSL termination and for using a virtual path (e.g. https://myserver.com/onlyoffice/). I have Nextcloud and the Document Server running on the same server.
If you are not running HAProxy as a reverse proxy, OnlyOffice have a number of pre-defined configurations for other proxies here: https://github.com/ONLYOFFICE/document-server-proxy
I have in the frontend defined to redirect /onlyoffice/ paths to the backend definition as follows:
acl is_onlyoffice path_beg /onlyoffice use_backend onlyoffice if is_onlyoffice backend onlyoffice acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found http-request add-header X-Forwarded-Host %[req.hdr(Host)]/onlyoffice unless existing-x-forwarded-host http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto reqrep ^([^\ :]*)\ /onlyoffice/(.*) \1\ /\2 server onlyoffice-documentserver 192.168.2.244:8103
The above code will fix the SSL termination and make sure that Document Server internal references are using HTTPS and it will change the internal routing based on the virtual path.
Lastly, install the OnlyOffice app in Nextcloud and configure it in the administration panel to use the route as you have defined.