[Solved] Login not accepted after server IP change

Nextcloud version: 20.0.1.1
Operating system and version: Ubuntu 20.04.1
Apache or nginx version: Apache 2.4.41
PHP version: 7.3.24-3

New install of Nextcloud is working well and accessible on my local network using 192.168.1.8:8080
However I need to change the IP address of the server.

I changed the IP from 192.168.1.8 to 192.168.1.121
(network-manager not interfaces)
I added the new trusted domain in config.php

The Nextcloud login screen thankfully becomes available using 192.168.1.121:8080
However the problem is the passwords (admin and user) are no longer accepted.
After entering them the login screen is just returned.

If I change the IP back to 192.168.1.8 I can again login as normal.

Any ideas would be greatly appreciated!

The Nextcloud log says:

Warning (core) Login failed: 'admin' (Remote IP: '192.168.1.202')

The output of the config.php file is as follows:

<?php
$CONFIG = array (
  'passwordsalt' => 'hidden',
  'secret' => 'hidden',
  'trusted_domains' =>
  array (
          0 => 'localhost',
          1 => '192.168.1.8',
          2 => '192.168.1.121',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.1.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud_user',
  'dbpassword' => 'hidden',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'oc5ab6nz9ufe',
);

Webserver logs:

192.168.1.202 - - [08/Nov/2020:16:59:52 +1100] "POST /index.php/login HTTP/1.1" 303 994
192.168.1.202 - - [08/Nov/2020:16:59:52 +1100] "GET /index.php/settings/user HTTP/1.1" 303 1000
192.168.1.202 - - [08/Nov/2020:16:59:52 +1100] "GET /index.php/login?redirect_url=/index.php/settings/user HTTP/1.1" 200 4692
192.168.1.202 - - [08/Nov/2020:16:59:52 +1100] "GET /index.php/core/js/oc.js?v=52518fd7 HTTP/1.1" 200 4819
192.168.1.202 - - [08/Nov/2020:16:59:53 +1100] "GET /cron.php HTTP/1.1" 200 1100

These are redirects, can you check them, so you do not forward stuff to the old ip? E.g. try with curl to open index.php/login and see where you get redirected. In theory, there is nothing else to change on the server, I’d perhaps see to use the current IP as the default hostname/url (overwrite.cli.url, overwrite.host (https://github.com/nextcloud/server/blob/master/config/config.sample.php#L472) is normally not required but you could try, and I’d use the most used host name first in the trusted domains).

Thank you for the reply. I have followed the suggestions but unfortunately adding 192.168.1.121:8080 as ‘overwrite.host’ and ‘overwrite.cli.url’ hasn’t solved the issue - it still just returns to the login screen.

Here is the output of “curl 192.168.1.121:8080/index.php/settings/user”

{"message":"Current user is not logged in"}

Here is the output of “curl 192.168.1.121:8080/index.php/login”

<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="en" >
        <head
 data-requesttoken="MkZ7KyBoerzUaz1ePXHoXS93loLElaN5ux1URMem9G8=:eXY+SFRQSsWtAHobDB+uPl49+buowPMQiFEjLaLyngY=">
                <meta charset="utf-8">
                <title>
                Nextcloud               </title>
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
                                <meta name="apple-itunes-app" content="app-id=1125420102">
                                <meta name="theme-color" content="#0082c9">
                <link rel="icon" href="/core/img/favicon.ico">
                <link rel="apple-touch-icon" href="/core/img/favicon-touch.png">
                <link rel="mask-icon" sizes="any" href="/core/img/favicon-mask.svg" color="#0082c9">
                <link rel="manifest" href="/index.php/apps/theming/manifest?v=0">
                <link rel="stylesheet" href="/apps/files_rightclick/css/app.css?v=46c85d58-0">
<link rel="stylesheet" href="/core/css/guest.css?v=52518fd7-0">
                <script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/index.php/core/js/oc.js?v=52518fd7"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/core/js/dist/main.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/core/js/dist/files_fileinfo.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/core/js/dist/files_client.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/index.php/js/core/merged-template-prepend.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/core/js/backgroundjobs.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/files_sharing/js/dist/main.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/files_pdfviewer/js/files_pdfviewer-public.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/files_videoplayer/js/main.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/files_rightclick/js/script.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/files_rightclick/js/files.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/apps/theming/js/theming.js?v=52518fd7-0"></script>
<script nonce="TWtaN0t5Qm9lcnpVYXoxZVBYSG9YUzkzbG9MRWxhTjV1eDFVUk1lbTlHOD06ZVhZK1NGUlFTc1d0QUhvYkRCK3VQbDQ5K2J1b3dQTVFpRkVqTGFMeW5nWT0=" defer src="/core/js/dist/login.js?v=52518fd7-0"></script>
                <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="/index.php/apps/accessibility/css/user-a82fd95db10ff25dfad39f07372ebe37"/><meta property="og:title" content="Nextcloud"/><meta property="og:description" content="a safe home for all your data"/><meta property="og:site_name" content="Nextcloud"/><meta property="og:url" content="http://192.168.1.121:8080/"/><meta property="og:type" content="website"/><meta property="og:image" content="http://192.168.1.121:8080/core/img/favicon-touch.png"/><link rel="stylesheet" href="/index.php/apps/theming/styles?v=0"/><meta name="robots" content="noindex, nofollow"/>  </head>
        <body id="body-login">
                <noscript>
        <div id="nojavascript">
                <div>
                        This application requires JavaScript for correct operation. Please <a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">enable JavaScript</a> and reload the page.            </div>
        </div>
</noscript>
                                        <input type="hidden" id="initial-state-core-loginUsername" value="IiI=">
                                        <input type="hidden" id="initial-state-core-loginAutocomplete" value="dHJ1ZQ==">                                        <input type="hidden" id="initial-state-core-loginThrottleDelay" value="MA==">
                                        <input type="hidden" id="initial-state-core-loginResetPasswordLink" value="IiI=">
                                        <input type="hidden" id="initial-state-core-loginCanResetPassword" value="dHJ1ZQ==">
                                        <input type="hidden" id="initial-state-core-webauthn-available" value="ZmFsc2U=">
                                        <input type="hidden" id="initial-state-core-config" value="eyJzZXNzaW9uX2xpZmV0aW1lIjoxNDQwLCJzZXNzaW9uX2tlZXBhbGl2ZSI6dHJ1ZSwiYXV0b19sb2dvdXQiOmZhbHNlLCJ2ZXJzaW9uIjoiMjAuMC4xLjEiLCJ2ZXJzaW9uc3RyaW5nIjoiMjAuMC4xIiwiZW5hYmxlX2F2YXRhcnMiOnRydWUsImxvc3RfcGFzc3dvcmRfbGluayI6bnVsbCwibW9kUmV3cml0ZVdvcmtpbmciOmZhbHNlLCJzaGFyaW5nLm1heEF1dG9jb21wbGV0ZVJlc3VsdHMiOjAsInNoYXJpbmcubWluU2VhcmNoU3RyaW5nTGVuZ3RoIjowLCJibGFja2xpc3RfZmlsZXNfcmVnZXgiOiJcXC4ocGFydHxmaWxlcGFydCkkIn0=">
                                        <input type="hidden" id="initial-state-core-capabilities" value="eyJjb3JlIjp7InBvbGxpbnRlcnZhbCI6NjAsIndlYmRhdi1yb290IjoicmVtb3RlLnBocFwvd2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ZmF2aWNvbiI6Imh0dHA6XC9cLzE5Mi4xNjguMS4xMjE6ODA4MFwvY29yZVwvaW1nXC9sb2dvXC9sb2dvLnN2Zz92PTAifSwidXNlcl9zdGF0dXMiOnsiZW5hYmxlZCI6dHJ1ZSwic3VwcG9ydHNfZW1vamkiOnRydWV9LCJ3ZWF0aGVyX3N0YXR1cyI6eyJlbmFibGVkIjp0cnVlfX0=">
                                        <input type="hidden" id="initial-state-accessibility-data" value="eyJ0aGVtZSI6ZmFsc2UsImhpZ2hjb250cmFzdCI6ZmFsc2V9">
                                        <input type="hidden" id="initial-state-theming-data" value="eyJuYW1lIjoiTmV4dGNsb3VkIiwidXJsIjoiaHR0cHM6XC9cL25leHRjbG91ZC5jb20iLCJzbG9nYW4iOiJhIHNhZmUgaG9tZSBmb3IgYWxsIHlvdXIgZGF0YSIsImNvbG9yIjoiIzAwODJjOSIsImltcHJpbnRVcmwiOiIiLCJwcml2YWN5VXJsIjoiIiwiaW52ZXJ0ZWQiOmZhbHNlLCJjYWNoZUJ1c3RlciI6IjAifQ==">
                                <div class="wrapper">
                        <div class="v-align">
                                                                        <header role="banner">
                                                <div id="header">
                                                        <div class="logo">
                                                                <h1 class="hidden-visually">
                                                                        Nextcloud
                </h1>
                                                                                                                       </div>
                                                </div>
                                        </header>
                                                                <main>

<div id="login"></div>

                                </main>
                        </div>
                </div>
                <footer role="contentinfo">
                        <p class="info">
                                <a href="https://nextcloud.com" target="_blank" rel="noreferrer noopener" class="entity-name">Nextcloud</a> – a safe home for all your data                     </p>
                </footer>
        </body>
</html>

you are also using a different port, did you try to put this in your trusted domains:

'192.168.1.121:8080'

and perhaps remove the old IP entry.

Thanks for the suggestion.
I removed the old IP entry and added the port to the new trusted domain but nothing changed. :frowning:

I was using port 8080 with the old IP as well - just forgot to mention it initially.
The nextcloud virtualhost conf is as follows - note SSL is not implimented.

<VirtualHost *:8080>

 DocumentRoot /var/www/nextcloud

 Alias /nextcloud “/var/www/nextcloud/”

 <Directory /var/www/nextcloud>
  Options +FollowSymlinks
  AllowOverride All

  <IfModule mod_authz_core.c>
   <RequireAll>
       Require all granted
   </RequireAll>
  </IfModule>

  <IfModule mod_dav.c>
   Dav off
  </IfModule>

  SetEnv HOME /var/www/nextcloud
  SetEnv HTTP_HOME /var/www/nextcloud
 </Directory>

 ErrorLog /var/log/apache2/nextcloud-error_log
 CustomLog /var/log/apache2/nextcloud-access_log common

</VirtualHost>

You don’t use it in a subfolder, it’s on the main domain. So you can delete or comment this line.

Can you post as well the .htaccess

Here is var/www/nextcloud/.htaccess. I havn’t modified it at all.

<IfModule mod_headers.c>
  <IfModule mod_setenvif.c>
    <IfModule mod_fcgid.c>
       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
       SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
    </IfModule>
  </IfModule>

  <IfModule mod_env.c>
    # Add security and privacy related headers

    # Avoid doubled headers by unsetting headers in "onsuccess" table,
    # then add headers to "always" table: https://github.com/nextcloud/server/pull/19002
    Header onsuccess unset Referrer-Policy
    Header always set Referrer-Policy "no-referrer"

    Header onsuccess unset X-Content-Type-Options
    Header always set X-Content-Type-Options "nosniff"

    Header onsuccess unset X-Download-Options
    Header always set X-Download-Options "noopen"

    Header onsuccess unset X-Frame-Options
    Header always set X-Frame-Options "SAMEORIGIN"

    Header onsuccess unset X-Permitted-Cross-Domain-Policies
    Header always set X-Permitted-Cross-Domain-Policies "none"

    Header onsuccess unset X-Robots-Tag
    Header always set X-Robots-Tag "none"

    Header onsuccess unset X-XSS-Protection
    Header always set X-XSS-Protection "1; mode=block"

    SetEnv modHeadersAvailable true
  </IfModule>

  # Add cache control for static resources
  <FilesMatch "\.(css|js|svg|gif)$">
    Header set Cache-Control "max-age=15778463"
  </FilesMatch>

  # Let browsers cache WOFF files for a week
  <FilesMatch "\.woff2?$">
    Header set Cache-Control "max-age=604800"
  </FilesMatch>
</IfModule>
<IfModule mod_php7.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
<IfModule mod_rewrite.c>

I am assuming that nextcloud can access the mysql dbase as my understanding is generally the login page wont load at all if the database config is wrong - and also it works for 192.168.1.8.

Is it possible that the nextcloud database is able to be used by nextcloud (nextcloud_user) but somehow access to the tables within has been blocked for a specific host / IP (192.168.1.121) ?

nextcloud_user@localhost has all privileges’ for the nextcloud mysql database.
No mysql configurations have been modified.

Just checked the table data and there are no entries in the oc_bruteforce_attempts table. The oc_preferences table also indicates no failed login attempts.
Is this because the passwords I have used are correct or has the table has not been accessed at all :confused:

image

Some more checking

sudo -u www-data php occ app:check-code notifications
 - App is compliant - awesome job!
sudo -u www-data php occ encryption:status
 - enabled: false
 - defaultModule:

Your database is local, so that shouldn’t change anything. And if there was, it whould trigger a different error. Just one thing came up my mind, there is the bruteforce-detection, can you check the table oc_bruteforce_attempts?
Having the encryption module disable is pretty normal, this encryption should only used for external storage.

Can you also check with a different browser or in a private window? Also check extensions that you don’t block anything (perhaps you added an exception for the previous address)

I previously could not log in with all three browsers (Chrome, Edge, Firefox) from any client.

This time however Chrome and Firefox worked straight away.
Edge worked after all the cookies were deleted.

Obviously one of the previous suggestions (summarised below) fixed the issue and I didn’t realize because I was using Edge to do the testing.

  1. Adding the port to the trusted host in config.php
  2. Adding the server IP and port to ‘overwrite.host’ and ‘overwrite.cli.url in config.php
  3. Adding “auth.bruteforce.protection.enabled”: false, to config.php
  4. Adding the msql port (3306)
    Note I will set bruteforce back to true to determine if it is the issue.

Thank you for taking the time to help!