Installing Nextcloud on Ubuntu 16.04 LTS with Redis, APCu, SSL & Apache

Sorry about that, I’ve adjusted your account to theoretically allow links.

You need command line access to your server, then you can run those commands.

sudo ls -l /var/www/html
sudo ls -l /var/www/html/nextcloud

sudo ls -l /var/www/html/nextcloud/data/

That’ll allow me to check the permissions on your install.

1 Like

No problem! :slight_smile:
So, here are the results:

sudo ls -l /var/www/html

sudo ls -l /var/www/html/nextcloud

sudo service redis status

sudo ls -l /home/archivio/nextcloud/data/Orestis

Aside from it not necessarily being recommended you put anything under home that looks OK. So beyond the redis errors, were you seeing any others?

1 Like

Hi Jason, I did not understand: should I move all of NExtcloud (the one in / var / www / html / nextcloud) to the home folder?
Then, for the rest, I do not seem to have seen other errors.

No, don’t move anything to the home folder.
At this point without seeing your environment first hand I’m not sure what’s wrong, sorry.

You could maybe swap redis for aPCU in your config.php file and see if that resolves the black page, but that doesn’t fix redis itself.

1 Like

Thank you very much and really for the patience you had! :slight_smile:
Yes, with APCu it works well, too bad that it does not have the same performance as Redis, but, in fact, it’s not a big deal in the end.
Thanks again and I wish you a good job! :slight_smile:


Keep an eye on your redis logs, and perhaps it’ll become clear why redis is bombing out, at least you’ve a working site for now :+1:

1 Like

Without a doubt, in the meantime I can work a little better! :+1:
Who knows what I will have combined, so as not to make Redis work!:joy:
Thanks again and happy Sunday!:grinning:

after all
How To install collabora online with an existing nextcloud on domain ?

Have a look for guides over on :slight_smile:

Thank you for this guide.
Greatly appreciated.
I am trying to install NC on a UDOO X86 SBC running openSUSE Leap 15.
I have followed SDB:Nextcloud - openSUSE Wiki
and installed NC and am able to login.
The purpose of the Nextcloud installation is to be able to store photos and videos from our devices inside our house. What I don’t know is how to setup Let’s Encrypt, because NC is running locally and not on a domain name. So instead of , what should I put?
sudo ./certbot-auto --apache --agree-tos --rsa-key-size 4096 --email --redirect -d

This is what I get at the NC’s settings page:

Security & setup warnings

It’s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.

  • Accessing site insecurely via HTTP. You are strongly adviced to set up your server to require HTTPS instead, as described in the [security tips].

  • Your web server is not properly set up to resolve “/.well-known/caldav”. Further information can be found in the [documentation].

  • Your web server is not properly set up to resolve “/.well-known/carddav”. Further information can be found in the [documentation].

  • No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the [documentation]

  • The PHP OPcache is not properly configured. [For better performance it is recommended]to use the following settings in the php.ini :


Would apreciate any help.


Hey @Simorgh

You can’t LE an internal host, it requires a public domain name.
The closest I guess you’d get would be a self-signed cert but you’ll still get warnings on this.

Thank you for your reply.
How can I setup my NC so I can access it in my LAN and have HTTPS enabled?

Appreciate your help.

Impressive guide, thank you!

I’ve been trying to get NextCloud set up on my home server for the last two weeks. I know next to nothing about Linux so it has been very frustrating. I followed a video guide by a gentleman on Youtube and finally was able to get a working NextCloud. However, I’m now trying to secure it and be able to access it outside of my network.

So I found your guide and I am trying it. I have a new VM with a fresh install of Ubuntu Server 18.04.2 LTS running on ESXi.

Everything seemed to go well until I got to 4.2.1 in your guide. I have a subdomain I created at So I entered this when I ran the Let’s Encrypt client -d

Running it, I received the following
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for url
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. url (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching -url- .well-known/acme-challenge/blahblahblah: Timeout during connect (likely firewall problem)


  • The following errors were reported by the server:

Domain: url
Type: connection
Detail: Fetching
url .well-known/acme-challenge/blahblahblah: Timeout during connect (likely firewall problem)

I forwarded ports 80 and 443 to the VM’s ip. Currently, if I put my public ISP ip address in a browser, I get the Apache2 Ubuntu default page.

Any help would be appreciated. This instance of NextCloud will only be used on my home server for my wife and I to access and share files but I would like it secure and able to be used away from home. Thank you so much!

  • As a new user I am limited to 2 links. So I had to substitute url for the actual url/link


Just to check, does this show as open for 80/443 to you?

I haven’t done SSL on duckdns directly, but I do use duckdns on my domain (CNAME) and haven’t had any SSL issues.

Both ports are closed.

ISP blocking?

I was using the Ubuntu server without desktop, so to make things easier for myself, I did a clean install with the desktop. I went back through your guide to the same step.

So, I also took a look at no-ip and see that it has a port 80 redirect option. I’ve been playing around with that as well as the response I found from you here: Change port 443 and 80 - support - Nextcloud community

No joy yet, but I’m not giving up!

If the ports are closed, yep. Either local network or ISP blocks are in place

Has anyone tested this guid with Nextcloud Server v17? I am thinking of testing this with the latest version of Nextcloud server, but really trying to see if there is a way to have the files for Nextcloud to be stored in AWS S3 instead of on the server.

How does this relate to other guides that use sudo snap install nextcloud as the install method?

Snap is a semi-readonly version of NC, far less customisable and is difficult to tinker with. It’s great in terms of simplicity, but I wouldn’t touch it. 17 should work fine with this guide. Other guides (not mine) exist outlining s3 usage. Easily achieved!