Collaborative Document Editing?

I couldn’t wait and tested it and it just worked! I really appreciate your awesome work! :clap:

I just did some cosmetics and eased copy/paste:

  • Please don’t copy template to template-custom if possible as it may override potential updates. pg_hba.conf works like first record counts so we put our template between 10 and 20 -> 15onlyoffice.
  • nano starts with no-wrap per default so no -w needed
  • changed expand-template and service restart to signal-event nethserver-*-update
  • combined service start and enable to systemctl enable service --now
  • install nethserver-redis (thanks to @stephdl)
  • removed supervisor and nginx because they’re installed as requirement of onlyoffice (thanks to @danb35)
  • changed to download onlyoffice RPM directly instead via repo (not working for me anymore)
  • added nethserver-nextcloud and IP instead of FQDN possibility (thanks to @fausp)
  • certs and FQDN recommended and documentserver check (thanks to @danb35)

Copy/paste:

yum -y install nethserver-nextcloud nethserver-postgresql nethserver-redis rabbitmq-server nano
mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
echo -e "host all all 127.0.0.1/32 trust\nhost all all ::1/128 trust" > /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf/15onlyoffice
signal-event nethserver-postgresql-update
cd ~
curl -sL https://rpm.nodesource.com/setup_6.x | bash -
cd /tmp
sudo -u postgres psql -c "CREATE DATABASE onlyoffice;"
sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
systemctl enable redis --now
systemctl enable rabbitmq-server --now
yum -y install https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm http://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
yum -y install onlyoffice-documentserver
systemctl stop httpd
systemctl enable supervisord --now
systemctl enable nginx --now
export DS_PORT=8081
bash documentserver-configure.sh

Accept the defaults here. The password for Postgres will be onlyoffice; the password for RabbitMQ will be guest

systemctl stop nginx
nano /etc/nginx/nginx.conf

Comment out the server block here. It begins on line 38, and ends on line 57. Just put a # in front of each line. This is necessary to prevent nginx from trying to listen on port 80, which will conflict with Apache.

/bin/cp -rf /etc/nginx/conf.d/onlyoffice-documentserver-ssl.conf.template /etc/nginx/conf.d/onlyoffice-documentserver.conf
nano /etc/nginx/conf.d/onlyoffice-documentserver.conf

You’ll need to make a few changes here. First, there are two lines (lines 28 and 29) that tell it to listen on port 443; you’ll need to change that to port 8082. Second, change ssl_certificate to and ssl_certificate_key to match the values of SSLCertificateFile and SSLCertificateKeyFile, respectively, in /etc/httpd/conf.d/ssl.conf. Keep the semicolons at the ends of the lines.

  • SSLCertificateFile: /etc/pki/tls/certs/localhost.crt
  • SSLCertificateKeyFile: /etc/pki/tls/private/localhost.key

Finish:

config set fw_nginx service status enabled TCPPort 8082 access green
signal-event firewall-adjust
systemctl start nginx
systemctl start httpd

Check if the document server is reachable by browsing to https://neth_fqdn_or_ip:8082. Using certs and respective FQDN is recommended to avoid problems. If you are using self signed certs or IPs you have to allow the documentserver page in your browser else you’ll get an error opening an office document.
Log in to Nextcloud as the Nextcloud admin user (by default, that’s username admin, password Nethesis,1234).

  • Go to the Apps page. Under Office & text, enable the Onlyoffice app.
  • Then go to the Admin page. Under the ONLYOFFICE heading, in the field for “Document Editing Service address”, fill in https://neth_fqdn_or_ip:8082.
    Leave the other settings at default, or change to your preference. Click Save.
    I get an error here but it works and is saved:

At this point, you should be done.

1 Like