Difference between revisions of "Nextcloud"
m (→Install and configure NextCloud) |
m (Nad moved page LibreOffice Online installation to Installing NextCloud with LibreOffice Online integration without leaving a redirect) |
(No difference)
|
Revision as of 12:32, 18 February 2018
This is our procedure for installing LibreOffice Online on a Debian-based server. LibreOffice has included a component to allow it to be served over HTTP since version 5.3.
I'm following the instructions created by Collabora and NextCloud from here, and more specifically the Nginx variation here. I'm documenting here my specific configuration to include the LetsEncrypt and other specific configuration aspects that are out of the scope of those instructions so that we have a more easily reproducible procedure.
I'm using two domains here which you'll need to change for your own purposes, office.organicdesign.host for the main LibreOffice Online entry point, and files.organicdesign.host for the NextCloud web-application which is an open-source "drop-box" style system with built-in integrations for LibreOffice Online.
Contents
Set up the server
apt install git net-tools nginx php7.0-fpm php7.0-mysqlnd php7.0-zip php7.0-gd php7.0-curl php7.0-simplexml php7.0-mbstring
Set up MariaDB from their repositories here.
Install Docker and the Docker image
Bring the machine up to date and run through the Docker installation.
docker pull collabora/code
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=files\\.organicdesign\\.host' --restart always --cap-add MKNOD collabora/code
Install and configure NextCloud
NextCloud is a "drop-box" style web-application which is completely open-source so you can install it on your own server, and it has built-in integration for working with LibreOffice Online. NextCloud is PHP so first download the source and unpack it into /var/www/nextcloud, ensure it's accessible by www-data, and then add the Nginx configuration block recommended here. We need to adjust the domain names and delete the port 80 block since we have an existing one described above to handle LetsEncrypt domain validation requests. A database and user will need to be created and then you can run through the install by going to the files.organicdesign.host domain.
Configuring the web-server and domains
Next create some strong Diffi-Hellman parameters which are referred to in the nginx.ssl.conf.
openssl dhparam -out /var/www/dhparams.pem 2048
cd /var/www
git clone https://github.com/certbot/certbot.git letsencrypt
Ensure that the .well-known directory is accessible for your domains...
Add a crontab entry to keep the certificates up to date:
* 0 * * * root /var/www/letsencrypt/letsencrypt-auto certonly -q --keep --renew-with-new-domains --expand --webroot -w /var/www --agree-tos \
--email "admin@organicdesign.host" -d office.organicdesign.host -d files.organicdesign.host