Difference between revisions of "NextCloud"

From Jon's Wiki
Line 18: Line 18:
 
  a2enmod rewrite ssl headers dir env setenvif
 
  a2enmod rewrite ssl headers dir env setenvif
  
You will need <tt>AllowOverride All</tt> for the {{code|/var/www}} directory in {{code|/etc/apache2/apache.conf}} otherwise clean URLs won't work.
+
You will need {{code|AllowOverride All}} for the {{code|/var/www}} directory in {{code|/etc/apache2/apache.conf}} otherwise clean URLs won't work.
  
 
Bump up the PHP memory limit to at least 512M.
 
Bump up the PHP memory limit to at least 512M.

Revision as of 20:12, 2 December 2020

Assumes Ubuntu 20.04, stable19 branch (c. September 2020).

Install prerequisites

sudo apt install apache2 libapache2-mod-php7.4 \
   php7.4-{bcmath,curl,gd,gmp,intl,json,mbstring,opcache,pgsql,tidy,xmlrpc,xsl,zip}
   php-{imagick,redis} composer dehydrated postgresql redis-server

cd /var/www
git clone https://github.com/nextcloud/server.git nextcloud && cd nextcloud
git submodule update --init --recursive
chown www-data:www-data config apps .htaccess
sudo -u www-data ./occ maintenance:update:htaccess
mkdir /var/lib/nextcloud/data
chown -R www-data:www-data /var/lib/nextcloud

a2enmod rewrite ssl headers dir env setenvif

You will need AllowOverride All for the /var/www directory in /etc/apache2/apache.conf otherwise clean URLs won't work.

Bump up the PHP memory limit to at least 512M.

Create a PostgreSQL database, navigate to the URL in the browser to install (or run the NextCloud ./occ tool from the command line).

Edit /etc/ImageMagick/policy.xml and remove this line to get PDF previews:'

<policy domain="coder" rights="none" pattern="PDF" /> 

Add stuff to enabledPreviewProviders in config.php

For now, Photos is pretty broken in stable19, so use Gallery which stopped at stable17, update its domPurify JS library, and bump the max version in appinfo/info.xml