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 on Ubuntu 16

Rumi, November 21, 2020

Step 1: Install ONLYOFFICE Document Server

Please note that OnlyOffice document server requires at least 2GB of RAM. An additional 2GB of swap space is recommended. OnlyOffice document server depends on PostgreSQL, Node.js, Redis Server, RabbitMQ server and Nginx. The following steps are tested on a Ubuntu 16.04 server but should also be applicable to other Debian-based Linux distributions.

Install PostgreSQL from Ubuntu repository

sudo apt install postgresql

Then create the onlyoffice database.

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

Create the onlyoffice user.

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

Grant permission.

sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"

Install NodeJS from official repository

OnlyOffice document server requires nodejs 6.9.1+, but the version in Ubuntu repository is outdated, so we will need to install the latest LTS version (6.9.5) of Node.js from upstream repository.

Add Node.js repostiory.

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

Install Node.js.

sudo apt install nodejs

Check Node.js version.

node -v

Sample output:

v6.9.5

Install Redis server and Rabbitmq

sudo apt install redis-server rabbitmq-server

Check their status.

systemctl status redis-server
systemctl status rabbitmq-server

You should see they are active (running).  If rabbitmq-server failed to start, that’s mostly because of low memory on the machine.

Install OnlyOffice document server

Add OnlyOffice repository with the following command.

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

Import OnlyOffice public key.

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

Update local package index and install OnlyOffice document server. Note that Nginx will be installed as the web server so you might need to stop Apache if it’s running.

sudo apt update
sudo apt install onlyoffice-documentserver

During the installation process, you will be asked to enter PostgreSQL password for onlyoffice. Enter “onlyoffice” (without double quotes).

Once the installation is finished, enter your server’s public IP address in web browser, you should see “Document Server is running”

Step 2 – Generate SSL Letsencrypt

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

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@tweenpath.net -d tweenpath.net

Once the certbot command is completed, your SSL certificates will be located at the /etc/letsencrypt/live/tweenpath.net directory And you’ve successfully generated SSL Letsencrypt using the certbot command-line tool.

Step 3 – 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;

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 now running on the HTTPS secure connection with the SSL from Letsencrypt.

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

How to Integrate OnlyOffice with ownCloud

Administrations Application Configurations (Linux) OnlyOfficeUbuntuUbuntu 16

Post navigation

Previous post
Next post

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