Logging into Nextcloud App for the first time - Cannot log in as specified user

I use redis and it works fine with any password I want. How did you set a redis password and how do you know what it is? Can you show a screen capture of the app config where you set it? You’re in an existing thread, not sure I follow are you doing a fresh install or an existing install? For fresh, which someone said they were doing, the env var will do it.

For existing, it needs to be in config.php but you have to make sure that file is part of a hostpath so it doesn’t reset every time you start nextcloud. Can you show the existing config.php with your change?

This all is far more a nextcloud question than a truenas question though.

I did the following steps:

  1. No NC datasets available (deleted old ones, made sure nothing left over on CLI)
  2. Created new datasets, set permission as per the new documentation at Nextcloud | TrueNAS Documentation Hub
  3. Followed also the other installation steps from that manual
  4. Set ‘Admin Password’, ‘Redis Password’ and ‘Database Password’ to custom values
  5. deployed the app successfully
  6. verified that config.php took over the correct Redis password, that is the case
  7. browsed to the NC login page
  8. entered credentials that were used during setup, login page appears again.
  9. reloaded page, same result
  10. cleared browser cache, tried again, same result
  11. Set REDIS_HOST_PASSWORD as suggested, same result
  12. changed Redis password in App wizard to ‘nextcloud’ and manually took this over in config.php
  13. login works fine
  14. changed Redis password back to custom value → broken again

I feel the Redis password from app wizard is considered properly by Nextcloud but another part of the app/container just uses a hardcoded default password.

Any ideas?

That explains it better, likely you are right, it’s likely an app error. You’d have to submit a bug report, don’t use apps so not sure how you do that.

Thanks a lot anyways, I raised an issue at Github:

1 Like

I subscribed to the issue to see how the resolution goes.

Had same issue with log in after clean install. Solved like this:

  1. Removed Host from Nextcloud Configuration then creating instance
  2. Used nginx-proxy-manager to reverse proxy NextCloud with SSL cert and Set Domain.
  3. Added domain to trusted_domains in config.php.

After this it worked. Reverse proxy idea born after I dug nextcloud internal logs and found:
HMAC does not match.
Could not decrypt or decode encrypted session data

I have the same problem. I have used NextCloud for many month without any issue and now I needed to reinstall nextcloud. I already changed Truenas Scale to newest version SCALE 24.10.1 (Electric Eel). I have tried everything possible I found on the internet with these unhappy results:

  1. Using Truenas_default certificate > “Access through untrusted domain”
  2. without certificate through HTTP connection > unpossible login to NextCloud with user and password specified in installation wizard.

Firstly I tried to reuse working installation only changing Data directory with no success. After that I have tried completely new installations with specialy made datasets with different combinations with ix-volumes with no success. I updated “trusted_domain” and “overwrite…” in config.php with no success.
It’s my private Truenas server used mainly for Photo storage next for Jellyfin, Home Assistant and ROON server. And of course for NextCloud for photography sharing, backup and its other options. I am a semi amateur programer with not much experience with truenas and docker.
Usually I could find solution with help of internet, but here I am stuck and have no idea how to continue.

same problem. why is this so difficult?

I don’t know.
But I accidentally solved the problem. I have found strange behaviour of the nextcloud when I changed the trusted domains in config.php. And finally I have realized the overwrite_host, i think, was incorectly setup. When I have changed this parrametr into the same domain address even with the port, nextcloud started work like a charm. But it took me almost 3 days of research :slight_smile: