Infinite Login Loop

Steps to reproduce

  1. Freshly install Nextcloud on a virtual host of apache.
  2. Hardened Linux security with the script located here: [(] In short, it adds better security tools for detecting and detouring server attacks. Note that the server is reachable from the outside and I can access nextcloud setup, so it may not be responsible.
  3. Tear your hair out when you can’t log into nextcloud.

Expected behavior

Log into the account, any account including admin.

Actual behavior

The login screen comes back up as soon as you press login. The log does not say there was attempt for entry. If the wrong credentials are input, there is no response to say so.

Server configuration

Operating system :
Ubuntu 18.04.2 LTS

Web server:


PHP version:
7.1 or 7.2 - doesnt matter, same problem.

Nextcloud version: (see Nextcloud admin page)
Nextcloud 11, 14, 15, 16 - doesn’t matter, same problem occurs

Updated from an older Nextcloud/ownCloud or fresh install:
All are fresh installs.

Where did you install Nextcloud from:

Signing status:

Signing statusCan’t log in after fresh restart - cannot satisfy requirement

List of activated apps:

App list

Nextcloud configuration:

Config report

Are you using external storage, if yes which one: local/smb/sftp/…**

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

Client configuration

Chrome - Same results

Operating system:
Windows 10


Web server error log

Web server error log

Nextcloud log (data/nextcloud.log)

Nextcloud log

Nextcloud Access log (apach2…nextcloud_access.log)

Nextcloud Access log

.hcaccess for Apache

.hcaccess for Apache

Personal Summary

I am really dumbfounded how all of the different fresh installations I have used as well as php versions did not fix this problem. I am attempting to make this server for personal use, but after the setup page I can’t log in.

I have scowered issue after issue of nearly this same problem, but nothing works. Please help!

In relation to the Security Installation, I have disabled:
disabled_functions which will not work with nextcloud.
I also ran sudo -u www-data php occ maintenance:repair which appears to have not changed anything.