# Login redirect issue, even on localhost, without proxy

**URL:** <https://help.nextcloud.com/t/login-redirect-issue-even-on-localhost-without-proxy/205200>\
**Category:** ℹ️ Support\
**Tags:** reverseproxy, caddy, nc30, nc29, setup\_warning\
**Created:** [September 29, 2024, 5:50pm UTC](https://help.nextcloud.com/t/login-redirect-issue-even-on-localhost-without-proxy/205200 "2024-09-29T17:50:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dexterdy](https://help.nextcloud.com/user_avatar/help.nextcloud.com/dexterdy/32/62761_2.png) [@dexterdy](https://help.nextcloud.com/u/dexterdy)\
**Post date:** [September 29, 2024, 5:50pm UTC](https://help.nextcloud.com/t/login-redirect-issue-even-on-localhost-without-proxy/205200/1 "2024-09-29T17:50:36Z")

</div>

Nextcloud version _(eg, 29.0.5)_: `30.0.0.14`  
Operating system and version _(eg, Ubuntu 24.04)_: `fedora 40`  
Apache or nginx version _(eg, Apache 2.4.25)_: `caddy (idk what version)`  
PHP version _(eg, 8.3)_: `8.2.23`

I am having a, what seems to be, very common issue, where nextcloud keeps redirecting me back to the login screen, in a loop, when I try to log in during the installation process. Going to the page works fine, but after I click the link, I am 303 redirected back to the login page with the following query parameters: `direct=1&user=XXX`

I followed [this](https://help.nextcloud.com/t/tutorial-for-running-nextcloud-in-rootless-podman-with-mariadb-redis-caddy-webserver-all-behind-a-caddy-reverse-proxy/159216) guide, which has worked for me before on a different machine.

I have found many posts of people who have this issue, but they only get it if they are behind a reverse proxy of some sort. I get it even on localhost, in fact, I do not have it configured for public access at all.

This is my config.php file:

```auto
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'password' => 'XXX',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX:8080',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'http://XXX:8080',
  'dbname' => 'XXX',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
);

```

This is my caddyfile:

```auto
:80 {
        root * /var/www/html
        file_server

        php_fastcgi 127.0.0.1:9000

        redir /.well-known/carddav /remote.php/dav 301
        redir /.well-known/caldav /remote.php/dav 301

        # .htaccess / data / config / ... shouldn't be accessible from outside
         {
                path /.htaccess
                path /data/*
                path /config/*
                path /db_structure
                path /.xml
                path /README
                path /3rdparty/*
                path /lib/*
                path /templates/*
                path /occ
                path /console.php
        }

        respond 404
}

```

I am on fedora and I am accessing my network via tailscale. I am using the community container image and podman in rootless mode

I have tried following the advice mentioned in the posts I find on the internet, like including/excluding overwrite.clu.url, overwriteprotocol and overwritehost, but none of those options worked at all.

Can anybody help me?

---

<div class="post-metadata">

**Author:** ![dexterdy](https://help.nextcloud.com/user_avatar/help.nextcloud.com/dexterdy/32/62761_2.png) [@dexterdy](https://help.nextcloud.com/u/dexterdy)\
**Post date:** [September 29, 2024, 7:19pm UTC](https://help.nextcloud.com/t/login-redirect-issue-even-on-localhost-without-proxy/205200/2 "2024-09-29T19:19:05Z")

</div>

I have found the problem. Apparently, the comma character is not a valid for the password and gets parsed incorrectly either on the nextcloud or on the redis side. I am suspecting the nextcloud side, but I am not certain

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [December 28, 2024, 7:19pm UTC](https://help.nextcloud.com/t/login-redirect-issue-even-on-localhost-without-proxy/205200/3 "2024-12-28T19:19:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
