I have installed Nextcloud on a Banana Pi and on a Raspberry Pi3 successfully with Dietpi. Nevertheless I got a secuirty warning on Admin - Settings page:
HTTP “Strict-Transport-Security” has not been configure with a value at least equal to “15552000” seconds.
If a web site accepts a connection through HTTP and redirects to HTTPS, the user in this case may initially talk to the non-encrypted version of the site before being redirected, if, for example, the user types http://www.foo.com/ or even just foo.com.
This opens up the potential for a man-in-the-middle attack, where the redirect could be exploited to direct a user to a malicious site instead of the secure version of the original page.
The HTTP Strict Transport Security (HSTS) feature lets a web site inform the browser that it should never load the site using HTTP, and should automatically convert all attempts to access the site using HTTP to HTTPS requests instead.
To enable HTST, edit the Lighttpd configuration file:
nano /etc/lighttpd/lighttpd.conf
Add the following code:
server.modules += ( "mod_setenv" ) $HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=63072000; includeSubdomains; ") }
Save it with [CTRL + X ] and than [Y]
And restart Lighttpd:
/etc/init.d/lighttpd restart
I found how to do that at the following webpage:
https://raymii.org/s/tutorials/HTTP_Strict_Transport_Security_for_Apache_NGINX_and_Lighttpd.html
At the above link there are also instructions for Apache and Nginx, in case you use them instead of lighttpd (I have not tested them).
I hope it will help