If needing help with this method in the future, most of the steps were found at https://github.com/ONLYOFFICE/DocumentServer/issues/152#issuecomment-689504125. It’s possible additional details could be found there.
These steps can probably be improved upon, but this worked for me. I just got it working last night, so testing hasn’t exactly been thorough. So far I haven’t lost any data, which is much more than I can say for the Community Document Server. Memory usage and load are quite low. It performs really well, especially once things are cached.
This may not be necessary much longer now that OnlyOffice seems to be on the arm bus in support of Apple.
Add qemu support and amd64 support
> apt install qemu binfmt-support qemu-user-static > dpkg --add-architecture amd64
Specify the existing repositories as arm
Edit /etc/apt/sources.list. For all lines starting “deb http://….”, change to “deb [arch=arm64] http://…”
Add the amd64 groovy repository
> add-apt-repository "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ groovy universe multiverse restricted main" > add-apt-repository "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ groovy-updates universe multiverse restricted main"
Install the OnlyOffice dependencies
These don’t seem to get installed automatically (even though they are specified as dependencies later), so I installed them manually.
> apt install libstdc++6:amd64 > apt install libasound2:amd64 libcairo2:amd64 > apt install libcurl4:amd64 libcurl3-gnutls:amd64 > apt install libgconf-2-4:amd64 libgtk-3-0:amd64 libxml2:amd64 libxss1:amd64 libxtst6:amd64 > apt install mariadb-client nginx-extras postgresql postgresql-client > apt install pwgen supervisor xvfb > apt install rabbitmq-server
Configure the postgres database and user for OnlyOffice
Make note of the password used. It will be needed during the OnlyOffice install.
> sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;" > sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyofficepassword';" > sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
Download and prep OnlyOffice
> apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 > echo "deb [arch=amd64] https://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list > apt update && apt download onlyoffice-documentserver:amd64 > dpkg-deb -R onlyoffice-documentserver*.deb output
Edit output/DEBIAN/control and change the Depends line.
Depends: debconf:arm64 (>= 0.5) | debconf-2.0:arm64, adduser:arm64, ca-certificates:arm64, coreutils:arm64, curl:arm64, libasound2:amd64, libcairo2:amd64, libcurl3:amd64 | libcurl4:amd64, libcurl3-gnutls:amd64, libgconf-2-4:amd64, libgtk-3-0:amd64, libstdc++6:amd64 (>= 4.8.4), libxml2:amd64, libxss1:amd64, libxtst6:amd64, logrotate:arm64, mysql-client:arm64 | mariadb-client:arm64, nginx-extras:arm64 (>= 1.3.13), postgresql-client:arm64 (>= 9.1), pwgen:arm64, supervisor:all (>= 3.0b2), xvfb:arm64, zlib1g:amd64
At the time of this writing, the current version of OnlyOffice DS was 6.1.0-83. There is an error in the postinst script, and you will need to edit output/DEBIAN/postinst. Line 125 (or 127 for ee) should look like the following (only one equals).
if [ ! $CLUSTER_MODE = true ]; then
Repackage and install
> dpkg-deb -b output onlyoffice-documentserver-modified.deb
The following install takes a long time, especially the “Generating presentation themes” step. Be patient.
> dpkg -i onlyoffice-documentserver-modified.deb > apt -f install
If you have an SSL certificate/setup…
> service nginx stop
Enable SSL by copying the template file.
> cp -f /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds.conf
Change the port by editing the above ds.conf file.
- Comment out all port 80 listeners
- Define server_name in the SSL section
- Change the defined port (443) to something else if you are already using 443
- Change the root value to /var/www/onlyoffice
- Enter the paths for ssl_certificate and ssl_certificate_key
> service nginx start
Check http(s)://host:port and http(s)://host:port/healthcheck
If the page loads, and the healthcheck page shows “true”, you can install and configure the OnlyOffice connector in Nextcloud.