Installing Openoffice

OS: Debian 9.3 x64 netinstall
Date: 12-07-2017
Date edited: 03-19-2018

Install Prerequisites

apt-get install sudo curl libcurl3 libxml2 supervisor fonts-dejavu fonts-liberation fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol rabbitmq-server
echo "deb http://ftp.de.debian.org/debian sid main contrib" | tee /etc/apt/sources.list.d/onlyoffice.list
apt-get update
apt-get install ttf-mscorefonts-installer
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get install nodejs
apt-get install postgresql

Setup sql Database and User files

sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;"
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
apt-get install redis-server

Set port number to be used by onlyoffice.

echo onlyoffice-documentserver onlyoffice/ds-port select <PORT_NUMBER> | sudo debconf-set-selections

Installing OnlyOffice

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

If you get the following error run the below commands….

Executing: /tmp/apt-key-gpghome.qjcKq8TNhD/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/run/user/0/gnupg/d.bpo9d7pt9gjc8zck4kfsmcss/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

apt remove gnupg
apt install --reinstall gnupg2
apt install dirmngr
echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
apt-get update
apt-get install onlyoffice-documentserver

=======================================

Setting up Docker

apt-get install apt-transport-https dirmngr
echo 'deb https://apt.dockerproject.org/repo debian-stretch main' >> /etc/apt/sources.list
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-get update
apt-get install docker-engine

Running OnlyOfficeDocument Server http Docker

sudo docker run --memory=2.5g -i -t -d -p 80:80 \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql  onlyoffice/documentserver

=======================================

Using LetsEncrypt Certs (If you are not using a proxy)

mkdir -p /app/onlyoffice/DocumentServer/data/certs
Copy over your **fullchain.pem** and **privkey.pem**
cp privkey.pem onlyoffice.key
cp fullchain.pem onlyoffice.crt

Make strong DHE parameters

cd /app/onlyoffice/DocumentServer/data/certs
openssl dhparam -out dhparam.pem 2048

Starting Docker With SSL

Make sure that you have dhparam.pem / onlyoffice.crt / onlyoffice.key in the “/app/onlyoffice/DocumentServer/data/certs” and you are ready.

Container runs with no memory limit - takes all available ram!

sudo docker run -i -t -d -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  onlyoffice/documentserver

Container runs with a hard limit of 2.5GB of ram.

sudo docker run --memory=2.5g -i -t -d -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  onlyoffice/documentserver

My setting.

sudo docker run --memory=3g -i -t -d -p 8443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  onlyoffice/documentserver

http://p80.pool.sks-keyservers.net/pks/lookup?search=Docker+Release+Tool+%28releasedocker%29+%3Cdocker%40docker.com%3E&fingerprint=on&op=index