Unable to login via private IP address in my LAN

Nextcloud version: 26.0.1
Operating system and version: Ubuntu 22.04 LTS
nginx version: nginx/1.18.0 (Ubuntu)
PHP version: 8.1

The issue I am facing:

I have successfully installed Nextcloud on my PC and tried to login as admin without any error. Proceeded to try some other feature etc,… everything works fine…

Then I tried to access Nc from a PC next to mine (connected to the same LAN), I managed to get to the login page just fine (like this: 192.168.0.10/nextcloud).

But everytime I clicked “Login”, I was always redirected to the same login page without any explanation (Status: HTTP 303 See Other). Only the URL in my browser’s URL bar changed to this:

http://192.168.0.10/nextcloud/login?user=admin&direct=1

admin is my username. And therefore, I cannot access my Nc dashboard. Tried with two other PCs in the same network and still no luck.

What could be wrong with my Nc configurations? I have limited knowledge in network setup.

Have you added your local ip to the config.php file? For example:

‘trusted_domains’ =>
array (
0 => ‘192.168.0.33’,
1 =>‘nextcloud.yoursite.com’,
),

yes.

$CONFIG = array (
  ...
   'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.0.10'
  ),
   ...

Perhaps is a typo error, but I see you miss a ‘,’ at the end of the line 1 => ‘192.168.0.10’ . In your config.php do you have the ‘,’?

In other hand, perhaps you need to add your server ip to your DNS?

sorry I hastily copied my config to my answer. There were no typo though…

Also, I can access my Nc from any PC in my LAN, but not able to login. I am able to login only from my PC where I installed my Nc instance by accessing http://localhost/nextcloud

FIXED

by adding:

'overwriteprotocol' => 'http',

Thanks all

I am glad to see you find the fix!!