Norman
March 21, 2020, 4:52pm
1
Hi,
with Services.Nextcloud = true
; I get a running Nextcloud and the loginpage is reachable in my webbrowser. But I can’t login with the username and password set in the configuration. I tried adminpass
an adminpassFile
. Has the password to be hashed in any way?
1 Like
Norman
March 21, 2020, 4:58pm
2
Here my config:
{ config, pkgs, ... }:
{
# environment.systemPackages = with pkgs; [
# nextcloud
# ];
services.nextcloud = {
enable = true;
hostName = "www.myexampledomain.de";
nginx.enable = true;
https = true;
config = {
dbtype = "sqlite";
dbuser = "nextcloud";
# dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
dbpassFile = "/etc/nixos/nextcloud-psql-pw";
# adminpassFile = "/etc/nixos/nextcloud-pw";
adminpass = "mysecretpassword";
adminuser = "root";
};
# autoUpdateApps = true;
autoUpdateApps.startAt = "23:30:00";
maxUploadSize = "20G";
};
services.postgresql = {
enable = true;
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{ name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
};
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
};
services.nginx = {
enable = true;
virtualHosts = {
"www.myexampledomain.de" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "/var/www";
};
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}
2 Likes
b42
March 22, 2020, 8:57pm
3
Don’t see anything suspicious in the config, except for root = "/var/www"
- why do you set that?
AFAIK adminpass
takes plaintext password. What happens when you try to log in, do you get “Wrong username or password” or something else?
1 Like
Norman
March 22, 2020, 9:25pm
4
Ok,
the line starting with root=
can be removed?
adminpass
with plaintextpassword is the important information for me.
Yes I got an wrong-username-or-password errormessage.
I took a look at config.override.php and don’t found any password settings.