[Tutorial] Installing OnlyOffice server on Raspberry Pi 4 Ubuntu Server 20.10

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

More details at https://github.com/ONLYOFFICE/DocumentServer/issues/1088#issuecomment-738038242

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…

Stop nginx

> 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

Start nginx.

> 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.

1 Like

Good night thank you very much for this tutorial, I finally managed to install onlyoffice and Nextcloud on my raspberry pi 4 and everything is working very well.
Thank you so much.

Happy to hear! I have had it up and running for a week now. I have been editing a document, presentation, and spreadsheet every day without any data loss. It continues to work well.

I tried but installion process gave error.
I didn’t remember much but was something related to line 124 which was in bar/lib/dpkg/info/onlyoffice********
Tried 3-4 times without any success.

Ahh. I recall an error like that. You should be able to ignore and proceed with the steps.

i got this error when installing
apt install libgconf-2-4:amd64 libgtk-3-0:amd64 libxml2:amd64 libxss1:amd64 libxtst6:amd64
after picking individual files i get error while installing

apt install libgconf-2-4:amd64 libgtk-3-0:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libglib2.0-0:amd64 : Depends: libpcre3:amd64 but it is not installable
 libselinux1:amd64 : Depends: libpcre2-8-0:amd64 (>= 10.22) but it is not installable
E: Unable to correct problems, you have held broken packages.

apt update && apt download onlyoffice-documentserver:amd64
Hit:1 https://download.onlyoffice.com/repo/debian squeeze InRelease
Hit:2 http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.5/ubuntu groovy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu groovy InRelease
Hit:4 http://nginx.org/packages/mainline/ubuntu groovy InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports groovy InRelease
Hit:6 http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Hit:7 http://ports.ubuntu.com/ubuntu-ports groovy-updates InRelease
Hit:8 http://ports.ubuntu.com/ubuntu-ports groovy-backports InRelease
Hit:9 http://ports.ubuntu.com/ubuntu-ports groovy-security InRelease
Hit:10 http://ppa.launchpad.net/ondrej/php/ubuntu groovy InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
Get:1 https://download.onlyoffice.com/repo/debian squeeze/main amd64 onlyoffice-documentserver amd64 6.1.0-83 [271 MB]
Fetched 271 MB in 44s (6112 kB/s)
W: Download is performed unsandboxed as root as file ‘/usr/local/src/onlyoffice-documentserver_6.1.0-83_amd64.deb’ couldn’t be accessed by user ‘_apt’. - pkgAcquire::Run (13: Permission denied)

Hi @earth. I would encourage you to resolve the installation of the required dependencies before moving on to downloading and installing OnlyOffice. In particular, the apt installs listed just before the postgres instructions.

I am assuming that the following amd64 packages were installed successfully.

  • libstdc++6
  • libasound2
  • libcairo2
  • libcurl4
  • libcurl3-gnutls

Is that correct?

Are you running Ubuntu 20? When I followed instructions from the post I linked at the top, I would get many of those types of messages, but installing the individual packages listed in the control file (the “Depends”) manually prior to trying to install OnlyOffice is what got it working for me.

Try installing each of libgconf-2-4:amd64 and libgtk-3-0:amd64 separately to find out which one is the problem.

What happens if you manually install libpcre3:amd64?


Yes 20.10 64 bit

Shows me error but don’t remember.

I have installed 20.10
I have installed Nextcloud and configure it with mariadb nginx
And after that, I am trying this method to install onlyoffice.

One important question before I try this way.
Does this offer mobile editing?
Please reply
Right more I have installed document server community and onlyoffice to edit and create files.
It does support desktop editing but doesn’t support mobile editing.

icannot install this dependecies manually
libgconf-2-4:amd64 libgtk-3-0:amd64

The following packages have unmet dependencies:
libglib2.0-0:amd64 : Depends: libpcre3:amd64 but it is not installable
libselinux1:amd64 : Depends: libpcre2-8-0:amd64 (>= 10.22) but it is not installable
E: Unable to correct problems, you have held broken packages.

This will not enable mobile editing, sorry.

I tried installing on freshly installed Ubuntu 20.10
I was managed to install all dependencies.
Received error when installing onlyoffice.
Tired now want to return back to collabora or document server community edition.
Thanks for your guidance and time.

Well, I acquired a Home Server license through the OnlyOffice advent calendar (I meant to post here, but got caught up with other stuff). I can confirm that this installation method worked for the “Enterprise Edition” (Home Server is based on that).

I now have mobile editing (and the other features included with Home Server), and everything is working well.

How much did you paid for it?

They had a promo where if you tweeted about OnlyOffice you would receive a free license for Home Server. It’s a perpetual license but only one year of updates included.