- Home
- Docs
- Installation
- Community
- Linux version
- Installing ONLYOFFICE Docs on Debian, Ubuntu, and derivatives
Installing ONLYOFFICE Docs on Debian, Ubuntu, and derivatives
Introduction
Community Edition lets you install ONLYOFFICE Docs on your local server and integrate the online editors with the ONLYOFFICE collaboration platform or other popular systems (see the detailed list of features). This guide shows you how to install the Linux version of ONLYOFFICE Docs Community Edition on your machine.
System requirements
- CPU: dual core 2 GHz or better
- RAM: at least 2 GB, but depends on the host OS. More is better
- HDD: at least 40 GB of free space
- SWAP: at least 4 GB, but depends on the host OS. More is better
- OS: 64-bit Debian 12, Ubuntu 18.04 or other compatible distribution
-
Additional requirements
- NGINX: version 1.30 or later
Installing ONLYOFFICE Docs
Installation with Debian-based distributions also requires NGINX installed.
All the necessary instructions for these components and their dependencies' installation can be found at their official websites.
There are other dependencies installed together with ONLYOFFICE Docs:
- libcurl3
- libxml2
- fonts-dejavu
- fonts-liberation
- ttf-mscorefonts-installer
- fonts-crosextra-carlito
- fonts-takao-gothic
- fonts-opensymbol
These dependencies are installed automatically when you use Ubuntu 18.04 LTS or later. Earlier distributions might require manual installation.
Installing dependencies
ONLYOFFICE Docs uses NGINX as database. Dependencies found in the system repository will be installed automatically at ONLYOFFICE Docs installation using the apt-get install command.
Installing NGINX:
sudo apt-get install nginx
sudo apt-get install nginx-extrassudo mv -f /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default.disabled
sudo mv -f /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.disabled
sudo systemctl is-active --quiet nginx && sudo systemctl reload nginx || sudo systemctl start nginx
Depending on how NGINX was installed, one of the first two commands may report that the file does not exist. You can safely ignore this message.
Changing the default ONLYOFFICE Docs port
By default, ONLYOFFICE Docs listens for the incoming connections using port 8083. Starting with version 4.3 you can change the port for ONLYOFFICE Docs if you plan to use it instead of the default one.
To do that, you will need to change the default port for the debconf system, running the command:
echo onlyoffice-documentserver onlyoffice/ds-port select <PORT_NUMBER> | sudo debconf-set-selections
Please write the port number instead of the <PORT_NUMBER> in the above command.
There are additional options which can be used for ONLYOFFICE Docs installation. Please read this section for more information on them.
After that, you can continue with ONLYOFFICE Docs installation.
Guide on installing ONLYOFFICE Docs
Add GPG key:
mkdir -p -m 700 ~/.gnupg
curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --import
chmod 644 /tmp/onlyoffice.gpg
sudo chown root:root /tmp/onlyoffice.gpg
sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg
Add ONLYOFFICE Docs repository:
echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list
When installing ONLYOFFICE Docs on Debian, add the contrib component to /etc/apt/sources.list. To learn more, you can refer to the Debian documentation.
Update the package manager cache:
sudo apt-get update
Install mscorefonts:
sudo apt-get install ttf-mscorefonts-installer
Install ONLYOFFICE Docs
sudo apt-get install onlyoffice-documentserver
After that, ONLYOFFICE Docs will be run as a process. The package will be updated just like any other deb package.
Now you can enter http://localhost:8083 in your browser address bar to open the ONLYOFFICE Docs welcome page, where you will find further instructions on how to enable document examples or integrate online editors into your web application using the provided API.
Running ONLYOFFICE Docs using HTTPS
In most cases accessing the portal via HTTPS protocol is much more secure than via HTTP which is used by default. You can easily run ONLYOFFICE Docs using secure connection. Please see the details here to learn more on how this can be done.
Additional information: more options for ONLYOFFICE Docs installation
The installation of ONLYOFFICE Docs allows the use of more debconf options, which might be very helpful in case you plan installing it to more than one server or in some other cases.
These options include:
-
JWT options
You can use
debconf-set-selectionsto disable the overwriting of the custom values in the local.json file after updating ONLYOFFICE Docs.-
Enable JSON Web Tokens (JWT):
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | sudo debconf-set-selections -
Set a JWT secret key by replacing
<JWT_SECRET>with your own value:echo onlyoffice-documentserver onlyoffice/jwt-secret password <JWT_SECRET> | sudo debconf-set-selections
-
Enable JSON Web Tokens (JWT):