Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install ONLYOFFICE Document Server with Nginx on Debian 10

Rumi, August 1, 2021

Step 1 – Install Packages Dependencies

In this first step, we will install some packages dependencies needed by the Document Server, including the RabbitMQ-server, Redis, and Nginx-extras.

Update your Debian system repository and install Document Server packages dependencies using the apt command below.

sudo apt update
sudo apt install redis-server rabbitmq-server nginx-extras gnupg2

Once all installation is complete, check the following services using the systemctl command as below.

systemctl is-enabled nginx
systemctl is-enabled rabbitmq-server
systemctl is-enabled redis-server

Now make sure all of these services are enabled and will automatically run on the system boot.

Step 2 – Install and Configure PostgreSQL Database

In this step, we will install the PostgreSQL database to the Debian Buster 10 and create a new database and user the Onlyoffice Document Server.

Now install the PostgreSQL database using the apt command below.

sudo apt install postgresql

Once the installation is complete, start the PostgreSQL service and add it to the system boot.

systemctl start postgresql
systemctl enable postgresql

As a result, the PostgreSQL database is up and running on the Debian server. Next, we will create a new database and role for the Document Server installation. Log in to the PostgreSQL shell using the command below.

sudo -i -u postgres psql

Create a new database and user named ‘onlyoffice’ with the password ‘onlyoffice’ using the PostgreSQL queries below.

CREATE DATABASE onlyoffice;
CREATE USER onlyoffice WITH password 'onlyoffice';
GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;

As a result, the PostgreSQL database for the Onlyoffice Document Server has been created.

Step 3 – Generate SSL Letsencrypt and DHPARAM

For this tutorial, we will run the Document Server on the secure HTTPS protocol, and we will generate new SSL certificates from lets encrypt and generate the DHPARAM certificate.

Install the Certbot tool for generating SSL Letsencrypt certificates using the apt command below.

sudo apt install certbot

Next, generate new SSL certificates using certbot command below, and make sure to change the domain name and the email address with your own.

certbot certonly --standalone --agree-tos -m email@your-hakase-labs.io -d onlyoffice.hakase-labs.io

Once the certbot command is completed, your SSL certificates will be located at the ‘/etc/letsencrypt/live/onlyoffice.yourhakase-labs.io’ directory.

And you’ve successfully generated SSL Letsencrypt using the certbot command-line tool. Next, we will generate the DHPARAM certificate using the openssl binary command.

Go to the ‘/etc/ssl/certs’ directory and generate the DHPARAM certificate using the openssl command below.

cd /etc/ssl/certs/
openssl dhparam -out dhparam.pem 4096

And your DHPARAM certificate is located at the ‘/etc/ssl/certs’ directory.

As a result, you’ve generated SSL Letsencrypt and DHPARAM for the Document Server.

Step 4 – Install ONLYOFFICE Document Server

In this step, we will install the Onlyoffice Document Server. Although the available repository is for Debian Squeeze, it’s working on the latest Debian Buster 10.

First, add the GPG key of the Onlyoffice Document Server to your Debian system.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5

Now add the Document Server repository.

sudo echo “deb https://download.onlyoffice.com/repo/debian squeeze main” | sudo tee /etc/apt/sources.list.d/onlyoffice.list

After that, update Debian repository lists and install the Onlyoffice Document Server using the apt command below.

sudo apt update
sudo apt install onlyoffice-documentserver

During the installation, you will be asked about the PostgreSQL database password for the Document Server, type the ‘onlyoffice’ database password and choose ‘OK’ to continue.

And the Onlyoffice Document Server installation will be completed. It’s running on the default HTTP port 80, accessible through the web browser.

Step 5 – Running Document Server on HTTPS

In this step, we will secure the Document Server installation with the HTTPS protocol and using the SSL Letsencrypt and dhparam.

By default, the Document Server provided its virtual host configuration for the Nginx web server, located at the ‘/etc/onlyoffice/documentserver/nginx/’ directory.

First, stop the Nginx service using the systemctl command below.

systemctl stop nginx

Now go to the ‘/etc/onlyoffice/documentserver/nginx/’ directory and copy the virtualhost template configuration for the Document Server for SSL ‘ds-ssl.conf.tmpl’ to the ‘ds.conf’.

cd /etc/onlyoffice/documentserver/nginx/
cp ds-ssl.conf.tmpl ds.conf

Now edit the Document Server configuration ‘ds.conf’ using vim editor.

vim ds.conf

On the ssl_certificate and ssl_certificate_key options, change the path with your SSL certificates path.

ssl_certificate /etc/letsencrypt/live/onlyoffice.hakase-labs.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/onlyoffice.hakase-labs.io/privkey.pem;

Uncomment the ssl_dhparam option and change the path of the DHPARAM certificate with your own.

ssl_dhparam /etc/ssl/certs/dhparam.pem;

Save and close.

Next, test the Nginx configuration and make sure there is no error, then start the Nginx service.

nginx -t
systemctl restart nginx

As a result, the Document Server is no running on the HTTPS secure connection with the SSL from Letsencrypt.

Step 6 – Testing

Open your web browser and type the domain of your Onlyoffice Document Server installation on the address bar. Mine is:

https://onlyoffice.hakase-labs.io/

Src: https://www.howtoforge.com/how-to-install-onlyoffice-document-server-on-debian-10/

Administrations Collected Articles Configurations (Linux) DebianDebian 10OnlyOffice

Post navigation

Previous post
Next post

Comment

  1. Pingback: Install OnlyOffice 7 on Ubuntu 22 | Bots!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes