How to install Nextcloud 13 on Ubuntu 16.04 LTS in Plesk with Web-Installer

Today we will install Nextcloud into a Plesk vHost

If we have root access to the server, we can also use redis-server as memcache.

The following command installs the appropriate package:

sudo apt-get install redis-server

Prepare vHost:

In Plesk we create the subdomain under domains:



and secure it with LetsEncrypt:



Within the subdomain we use the file manager:



and remove all files and directories:



Now we have to download the Nextcloud-Webinstaller from the following URL to our workstation:

Nextcloud Webinstaller

Afterwards we upload it to our Webspace in Plesk:


In Apache/NGINX settings of the subdomain, we set the following values for „HTTP Additional Instructions“ (Customize Domain / Subdomain):

<Directory /var/www/vhosts/domain.tld/nextcloud.domain.tld/>
 AllowOverride All


in „Additional settings for HTTPS“ we set the following directives:


Header always set Strict-Transport-Security "max-age=15768000; preload; includeSubDomains"





Under certain circumstances, some operating systems have a case-sensitivity problem, so we put the following block under „Use Static Files Directly Through nginx“:

ac3 avi bmp bz2 css cue dat doc docx dts eot exe flv gif gz htm html ico img iso jpeg jpg js mkv mp3 mp4 mpeg mpg ogg pdf png ppt pptx qt rar rm svg swf tar tgz ttf txt wav woff woff2 xls xlsx zip AC3 AVI BMP BZ2 CSS CUE DAT DOC DOCX DTS EOT EXE FLV GIF GZ HTM HTML ICO IMG ISO JPEG JPG JS MKV MP3 MP4 MPEG MPG OGG PDF PNG PPT PPTX QT RAR RM SVG SWF TAR TGZ TTF TXT WAV WOFF WOFF2 XLS XLSX ZIP

Additional NGINX-Instructions (customization for case-sensitive file extensions and timeout errors for larger files):


ssl_prefer_server_ciphers On;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

gzip_proxied any;
# enable gzip compression
gzip on;
gzip_min_length 20;
gzip_buffers 4 32k;
gzip_types text/plain text/javascript application/javascript application/x-javascript text/xml text/css application/js;
gzip_vary on;
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|json|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|OGG|OGV|SVG|SVGZ|EOT|OTF|WOFF|MP4|TTF|CSS|RSS|ATOM|JS|JPG|JPEG|JSON|GIF|PNG|ICO|ZIP|TGZ|GZ|RAR|BZ2|DOC|XLS|EXE|PPT|TAR|MID|MIDI|WAV|BMP|RTF)$ {
expires max; log_not_found off;
# time out settings
proxy_connect_timeout 3600s;
proxy_send_timeout   3600s;
proxy_read_timeout   3600s;
fastcgi_read_timeout 3600s;
# webdav rewrite
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;


In PHP settings we set the version to 7.2.x and enter the following value under OPEN-Base-Dir:




we use the following values or adjust them accordingly:



At the bottom of the page under „Additional configuration instructions“, the we set following parameters:




Among the hosting settings, we must not forget the 301 redirect (http to https):



Prepare Database


Add a database within the subdomain:



and accept or adjust the following settings and write them down for later use:



Finish the installation


Via the web browser, we call our Nextcloud-Webinstaller and complete the Installation now:


In the next step, we enter a single „.“ into the field:

And after another click on „Next“, we should see the success of the installation:

The next step is to query the settings:


If we are logged in, we have to edit the config.php in config directory in Plesk via File Manager and insert the following block for the cache (if redis is installed):


'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' => array(
'host' => 'localhost',
'port' => 6379,


If we have ssh-access (as root or Plesk-User), then we can create a CRON job (adjust user):

as root:

sudo crontab -u admin -e


as Plesk-User:

crontab -e

and enter the following line (customize domain and subdomain):


*/15 * * * * php -f /var/www/vhosts/domain.tld/nextcloud.domain.tld/cron.php


Sometimes it is also possible to add a task via the GUI:

Otherwise, we use an external WebCron service, for example EasyCron.

The URL that needs to be called is:



Among the basic settings, we check Nextcloud for errors and subsequently also in Plesk in the subdomain under logs.

Optional: Pretty-URL:

Optional you are able to rewrite the URL from https://nextcloud.your-domain.tld/index.php/... to https://nextcloud.your-domain.tld/...

Edit the config.php in your nextcloud-vHost and add or extend the following lines (important: slash at the end of url in first line):

'overwrite.cli.url' => 'https://nextcloud.your-domain.tld/',
  'htaccess.RewriteBase' => '/',

then execute the following command in your shell:

sudo -u admin php /var/www/vhosts/your-domain.tld/nextcloud.your-domain.tld/occ maintenance:update:htaccess

If you have problems or questions, suggestions, don’t hesitate to contact me.

Bye and have fun 🙂

6 Gedanken zu „How to install Nextcloud 13 on Ubuntu 16.04 LTS in Plesk with Web-Installer

  1. Hallo Markus, ich lese Deinen Blog schon eine ganze Zeit 😉
    Für mich als Anfänger eine sehr gute Orientierung.
    Nun bin ich seit 3 Wochen dabei Nextcloud zum laufen zu bringen . Es läuft nun auch incl. APCu etc. , nun kommt
    das aber, irgendwas stimmt mit der Rechtevergabe nicht. Bei mir läuft Ubuntu incl. Plesk , da kriegt irgendwie www-data mit dem Plesk Nutzer psacln die Kurve nicht und es gibt Fehler. Das Nextcloud Script habe ich schon benutzt , leider auch ohne Erfolg. Habe im Script User=www-data , group=psacln, rootuser: Plesk User , eingerichtet. Hast Du eine Idee ? Gruß Marcus

    1. Moin Marcus, Du meinst den cron-Job? schau mal im File Explorer nach welcher User genutzt wird. www-data dürfte da nicht stehen. Bei mir ist es z.B. der admin-User, den ich beim ersten Einrichten von Plesk genutzt habe. Gruß Markus

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.