Introduction
ONLYOFFICE is a free, open source corporate office suite developed to organize teamwork online. It’s composed of three separate servers:
- The Document Server provides users with text, spreadsheet and presentation online editors working within a browser and allowing to co-edit documents in real time, comment and interact using the integrated chat.
- The Community Server offers a complete set of tools for document, project, customer relation and email correspondence management.
- The Mail Server is used to create mailboxes using your own domain name.
Because ONLYOFFICE has many moving parts and dependencies, it is recommended to simplify the installation process and avoid dependency errors by deploying ONLYOFFICE using Docker containers.
System requirements
RAM: 8 GB or more
CPU: 2 Core or better
Swap file: at least 8 GB
Docker
Docker installations allow you to run OnlyOffice Community Server:
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
onlyoffice/documentserver 4.3.4.10 f5ff5f9ec0c4 2 weeks ago 1.41GB
onlyoffice/documentserver latest f5ff5f9ec0c4 2 weeks ago 1.41GB
onlyoffice/communityserver 9.0.0.300 d70fbb99a6ee 4 weeks ago 1.32GB
onlyoffice/communityserver latest d70fbb99a6ee 4 weeks ago 1.32GB
onlyoffice/mailserver 1.6.21 05dd11e787af 5 weeks ago 1.77GB
ONLYoffice Community Edition contains 3 ‘virtual machine’ containers using Docker (communityserver, mailserver, documentserver). This requires 8GB RAM as the docker images generate some overhead as you can understand. A native installation requires 2 hosts: 1x Community Server and 1x Document Server. Native installations allow you to upgrade components more easily and will allow you to use *.pem Let’s Encrypt signed certs. Native installations also only require 2GB RAM for each node and are quite a bit more responsive.
I have used 2x Debian 8 Jessie to install Community Server and Document Server successfully:
https://tablelandscomputers.com/ubuntu-16-tls-debian-8-onlyoffice-no-docker/
I initially preferred to use Koozali as I love the web admin panel and db commands, but having Apache and Nginx on a single host is asking for problems as you can’t use HTTP port 80 and HTTPS port 443 for both.
Conclusion: It is recommended to run onlyoffice on a ‘clean’ operating system as it will pull in all the packages it needs.
Please find the results of my FAILED ATTEMPT below:
Centos 7 (Koozali SME server 10 alpha)
Things to keep in mind:
- You need to add yum repositories using Koozali commands.
- You need to remove MariaDB in favour of MySQL server 5.6
- You will have Apache and nginx web servers run side-by-side (both wanting to use TCP ports 80 / 443)
Getting started
yum -y install nano yum-utils
yum -y install epel-release
https://wiki.contribs.org/Epel
/sbin/e-smith/db yum_repositories set epel repository \
Name 'Epel - EL7' \
BaseURL 'http://download.fedoraproject.org/pub/epel/7/$basearch' \
MirrorList 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL \
Exclude perl-Razor-Agent \
Visible no \
status disabled
signal-event yum-modify
yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
ll /etc/yum.repos.d
mysql-community.repo
mysql-community-source.repo
more mysql-community.repo
Note the various yum repositories in this file.
/sbin/e-smith/db yum_repositories set mysql56-community repository \
Name 'MySQL 5.6 Community Server' \
BaseURL 'http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/' \
EnableGroups no \
GPGCheck yes \
GPGKey file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql \
Visible no \
status disabled
signal-event yum-modify
yum remove smeserver-horde e-smith-mysql mariadb-server
signal-event post-upgrade
yum install mysql-server –enablerepo mysql56-community
signal-event post-upgrade
nano /etc/my.cnf
—
[mysqld]
pid-file=/var/run/mysqld/mysqld.pid
basedir=/usr
datadir=/var/lib/mysql
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
socket=/var/lib/mysql/mysql.sock
skip-networking
max_allowed_packet=16M
user=mysql
[mysqld_safe]
—
systemctl enable mysqld.service
systemctl start mysqld.service
mysql_upgrade
mysql
mysql> CREATE database onlyoffice;
mysql> CREATE USER ‘onlyoffice’@’localhost’ IDENTIFIED BY ‘yourpasswordhere’;
mysql> GRANT ALL PRIVILEGES ON onlyoffice.* TO ‘onlyoffice’@’localhost’;
mysql> FLUSH PRIVILEGES;
mysql> exit;
/sbin/e-smith/db yum_repositories set onlyoffice repository \
Name 'onlyoffice' \
BaseURL 'http://download.onlyoffice.com/repo/centos/main/noarch/' \
EnableGroups no \
GPGCheck no \
Visible no \
status disabled
signal-event yum-modify
rpm –import “http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF”
yum-config-manager –add-repo http://download.mono-project.com/repo/centos/
yum install onlyoffice-communityserver –enablerepo=onlyoffice epel
signal-event post-upgrade
For now we aim to run the web services using the following TCP/IP port numbers:
80 HTTP apache (Koozali)
81 HTTP nginx (default page)
82 HTTP nginx (onlyoffice)
443 HTTPS apache (Koozali)
systemctl enable nginx.service
systemctl stop nginx.service
nano /etc/nginx/conf/nginx.conf
listen 80 default_server; –> listen 81 default_server;
nano /etc/nginx/conf/conf.d/onlyoffice.conf
listen 80; –> listen 82;
Now we have to edit our server’s firewall rules to open TCP ports for incoming traffic:
db configuration set onlyoffice service
db configuration setprop onlyoffice TCPPorts 81,82
db configuration setprop onlyoffice status enabled
db configuration setprop onlyoffice access public
signal-event remoteaccess-update
sh /var/www/onlyoffice/configure.sh
Configuring MySQL access…
Host: localhost
Database name: onlyoffice
User: onlyoffice
Password: yourpasswordhere
Trying to establish MySQL connection… OK
systemctl start nginx.service
By starting the nginx web server onlyoffice should now be available.
http://ipaddress:80 -> apache primary ibay
http://ipaddress:81 -> nginx default page
http://ipaddress:82 -> Sorry, portal is on maintenance. It may take a few minutes.
Long story short; this does not work.