How to Install OnlyOffice Docs on Ubuntu 24.04


OnlyOffice Docs is an open-source digital office suite that lets you create, view, and edit documents, spreadsheets, and PDFs right from your browser. It is like having a personal office on your computer that can be accessed anytime and anywhere. It is useful for users who are running out of storage space but require office applications like Word, Excel, and PPT to work on their projects. The advantage of having OnlyOffice Docs on the browser is that multiple users can work on the same document, making collaboration easy and efficient. You can use OnlyOffice Docs on your local server or integrate it with other platforms, such as Nextcloud, Zoom, Moodle, and more.

If you are searching for an effective application that helps you with office-related tasks, you should install OnlyOffice Docs on your freshly installed Ubuntu 24.04.

How to Install OnlyOffice Docs on Ubuntu 24.04

You can install OnlyOffice Docs on Ubuntu 24.04 by using the following steps:

Step 1: Install PostgreSQL on Ubuntu 24.04

OnlyOffice docs require the PostgreSQL database that should be installed on the system. You can install PostgreSQL on Ubuntu 24.04 through the below-given command:

sudo apt install postgresql -y

Step 2: Create a PostgreSQL User

After installing PostgreSQL on Ubuntu, it’s now time to create PostgreSQL user using the below-given command:

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

Note: You can change the PostgreSQL password onlyoffice according to your choice.

Step 3: Create a PostgreSQL Database

Now, create a PostgreSQL database named onlyoffice with your required password using the following command:

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

Step 4: Install Rabbitmq Server

To process requests to the server at a faster rate and prevent high load on the server, you must install rabbitmq server on Ubuntu using the following command:

sudo apt install rabbitmq-server -y

Note: By default, OnlyOffice Docs use port 80 for communication, however, you can change the port according to your desire by using the below-given command:

echo onlyoffice-documentserver onlyoffice/ds-port select desired_por_number | sudo debconf-set-selections

Step 5: Install OnlyOffice Docs on Ubuntu 24.04

To install OnlyOffice Docs on Ubuntu, first, you should create a directory named gnupg with specific permission using the following command:

mkdir -p -m 700 ~/.gnupg

Then import the GPG key to /tmp location on Ubuntu using the below-given command:

curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --import

Ensure giving read and write permission to the owner using the following command:

chmod 644 /tmp/onlyoffice.gpg

Additionally, to add additional security, you can change the ownership of the gpg file to the root user using the following command:

sudo chown root:root /tmp/onlyoffice.gpg

Once the required permission is given, you can move the GPG key from /tmp to /usr/share/keyrings location using the below-given command:

sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg

You can then add the OnlyOffice Docs repository to Ubuntu using the following command:

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

After adding the repository, update the Ubuntu standard repository list using the following command:

sudo apt update

Don’t forget to install mscorefonts on Ubuntu through the following command:

sudo apt install ttf-mscorefonts-installer -y

Finally, you can install the OnlyOffice Docs server on Ubuntu through the command provided below:

sudo apt install onlyoffice-documentserver -y

Note: During the process, it may ask you to enter the PostgreSQL database password you set in Step 2. After that, it will complete the installation of the OnlyOffice Docs server on the Ubuntu system.

Step 6: Access OnlyOffice Docs

After completing the installation, you can access OnlyOffice Docs on any system’s browser by using the IP address of your Ubuntu system.

http://IP-address

Note: You can find the IP address of the Ubuntu system using the hostname -I command.

However, before using the OnlyOffice Docs editors, go back to the Ubuntu terminal and run the below-given command to start the ds-example service:

sudo systemctl start ds-example

Additionally, you must also enable the ds-example service at the system startup through the following command:

sudo systemctl enable ds-example

Once done, scroll down and click the GO TO TEST EXAMPLE button:

When you click it, it will open the OnlyOffice Docs editors on the browser:

You can then open a document, spreadsheet, presentation, or PDF form from the Create new section and start using the OnlyOffice Docs installed on Ubuntu 24.04.

This completes the installation of OnlyOffice Docs on Ubuntu 24.04.

Bonus Method: How to Install OnlyOffice Docs Editors on Ubuntu 24.04

Besides installing the OnlyOffice Docs server, you can also install OnlyOffice Docs editors on Ubuntu 24.04, it can be done by downloading the deb file from the official website. You can directly download the Onlyoffice Docs editors on Ubuntu 24.04 through the following command:

wget https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb

Once you have downloaded the deb package, you can install OnlyOffice Docs editors on Ubuntu 24.04 from the following command:

 

sudo apt install ./onlyoffice-desktopeditors_amd64.deb

You can run OnlyOffice Docs editors from the Application menu by searching it:

Then click on the OnlyOffice docs editors to launch it on your desktop:

Note: To completely remove OnlyOffice Docs editors from Ubuntu 24.04, you can use the following command:

sudo apt autoremove onlyoffice-desktopeditors -y

Conclusion

OnlyOffice Docs is a powerful digital office suite for creating, viewing, and editing documents, PDFs, and PowerPoint presentations. To install OnlyOffice Docs on Ubuntu 24.04, you must install PostgreSQL on the system and create a database named onlyoffice with the desired password. After that, import the GPG key and add the OnlyOffice repository. Then install OnlyOffice Docs on Ubuntu from the apt install onlyoffice-documentserver command. After the installation, the OnlyOffice Docs can be accessed on the browser using the IP address of your Ubuntu system.

Alternatively, you can also install the OnlyOffice Docs editors desktop application on Ubuntu 24.04 by downloading its deb package. Then install the deb package through the apt install command to complete the installation of OnlyOffice Docs on Ubuntu.

Categories