Remote IP is always 127.0.0.1 (Plain Vanilla Install No Reverse Proxy - AIO - DockerDesktop - Windows )

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / ā€œas availableā€ basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.9
  • Operating system and version (e.g., Ubuntu 24.04):
    • Linux 6.6.87.2-microsoft-standard-WSL2 x86_64
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.65
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NA
  • PHP version (e.g, 8.3):
    • 8.3.26
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • On Install
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO, Docker Deskop, Windows
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Logs record 127.0.0.1 on failed remote login. It also produces another error related to brute-force training which my research appears to say it’s related to duplicate 127.0.0.1 entries, but I’m not 100% if they are related.

I suspect none of the protection systems (brute-force,suspicious log-in, or fail2ban will work this problem in place.

Steps to replicate it (hint: details matter!):

  1. Simply fail a log in.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"TmqoRySX3ICM2bbEqiET","level":2,"time":"2025-10-31T10:39:08+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: Admin disabled (Remote IP: 127.0.0.1)","userAgent":"Mozilla/5.0 (Android 16; Mobile; rv:144.0) Gecko/144.0 Firefox/144.0","version":"31.0.9.1","data":[],"id":"6904fb7c39150"}


{"reqId":"GTeEIaGnw5QfT1IaunhP","level":3,"time":"2025-10-30T22:25:00+00:00","remoteAddr":"","user":"--","app":"suspicious_login","method":"","url":"--","message":"Caught unknown error during IPv4 background training","userAgent":"--","version":"31.0.9.1","exception":{"Exception":"Rubix\\ML\\Exceptions\\InvalidArgumentException","Message":"Datasets must have the same number of columns, 48 expected, but 16 given.","Code":0,"Trace":[{"file":"/var/www/html/apps/suspicious_login/lib/Service/DataLoader.php","line":126,"function":"merge","class":"Rubix\\ML\\Datasets\\Labeled","type":"->","args":[{"__class__":"Rubix\\ML\\Datasets\\Labeled"}]},{"file":"/var/www/html/apps/suspicious_login/lib/Service/TrainService.php","line":55,"function":"generateRandomShuffledData","class":"OCA\\SuspiciousLogin\\Service\\DataLoader","type":"->","args":[{"__class__":"OCA\\SuspiciousLogin\\Service\\CollectedData"},{"__class__":"OCA\\SuspiciousLogin\\Service\\MLP\\Config"},{"__class__":"OCA\\SuspiciousLogin\\Service\\Ipv4Strategy"}]},{"file":"/var/www/html/apps/suspicious_login/lib/BackgroundJob/TrainJobIpV4.php","line":47,"function":"train","class":"OCA\\SuspiciousLogin\\Service\\TrainService","type":"->","args":[{"__class__":"OCA\\SuspiciousLogin\\Service\\MLP\\Config"},{"__class__":"OCA\\SuspiciousLogin\\Service\\TrainingDataConfig"},{"__class__":"OCA\\SuspiciousLogin\\Service\\Ipv4Strategy"}]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\\SuspiciousLogin\\BackgroundJob\\TrainJobIpV4","type":"->","args":[null]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":97,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":84,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/var/www/html/cron.php","line":170,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]}],"File":"/var/www/html/apps/suspicious_login/vendor/rubix/ml/src/Datasets/Labeled.php","Line":368,"message":"Caught unknown error during IPv4 background training","exception":[],"CustomMessage":"Caught unknown error during IPv4 background training"},"id":"6904fb7c39322"}


{"reqId":"g6wFKd92CSxXGnwtBEFn","level":2,"time":"2025-10-30T22:18:35+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: admin disabled (Remote IP: 127.0.0.1)","userAgent":"Mozilla/5.0 (Android 16; Mobile; rv:144.0) Gecko/144.0 Firefox/144.0","version":"31.0.9.1","data":[],"id":"6904fb7c39329"}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

NA

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

2025-10-31 06:45:31


Waiting for Nextcloud to start...
2025-10-31 06:45:37


Waiting for Nextcloud to start...
2025-10-31 06:45:42


Waiting for Nextcloud to start...
2025-10-31 06:45:47


Waiting for Nextcloud to start...
2025-10-31 06:45:52


Waiting for Nextcloud to start...
2025-10-31 06:45:57


Waiting for Nextcloud to start...
2025-10-31 06:46:02


Waiting for Nextcloud to start...
2025-10-31 06:46:07


Waiting for Nextcloud to start...
2025-10-31 06:46:12


Waiting for Nextcloud to start...
2025-10-31 06:46:17


Waiting for Nextcloud to start...
2025-10-31 06:46:22


Connection to nextcloud-aio-nextcloud (172.19.0.9) 9000 port [tcp/*] succeeded!
2025-10-31 06:46:22


/usr/lib/python3.12/site-packages/supervisor/options.py:13: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html.⁠ The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
2025-10-31 06:46:22


  import pkg_resources
2025-10-31 06:46:23


{"level":"info","ts":1761907583.9168868,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
2025-10-31 06:46:23


{"level":"info","ts":1761907583.9171436,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":7496176435,"previous":9223372036854775807}
2025-10-31 06:46:23


{"level":"info","ts":1761907583.9171758,"msg":"using config from file","file":"/tmp/Caddyfile"}
2025-10-31 06:46:23


{"level":"info","ts":1761907583.925758,"msg":"adapted config to JSON","adapter":"caddyfile"}
2025-10-31 06:46:23


[Fri Oct 31 06:46:23.934104 2025] [mpm_event:notice] [pid 63:tid 63] AH00489: Apache/2.4.65 (Unix) configured -- resuming normal operations
2025-10-31 06:46:23


[Fri Oct 31 06:46:23.934222 2025] [core:notice] [pid 63:tid 63] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
2025-10-31 06:46:23


{"level":"info","ts":1761907583.9806254,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes⁠ for details."}
2025-10-31 06:46:23


{"level":"info","ts":1761907583.9934454,"msg":"serving initial configuration"}

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "appsallowlist": false,
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "nextcloud.domain.com",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "https:\/\/ncloud.ooguy.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatedirectory": "\/nc-updater",
        "loglevel": 1,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "0": "OC\\Preview\\Imaginary",
            "1": "OC\\Preview\\OpenDocument",
            "2": "OC\\Preview\\Movie",
            "3": "OC\\Preview\\Krita",
            "4": "OC\\Preview\\Image",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 7200,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "US",
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.viewer.high_res_cond_default": "always",
        "memories.gis_type": 2,
        "session_lifetime": "10800",
        "remember_login_cookie_lifetime": "86400",
        "session_keepalive": "true",
        "auto_logout": "false",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Users",
            "Wolfpack",
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "preview_max_memory": 256,
        "preview_max_filesize_image": 128,
        "data-fingerprint": "0b246e18ee09fef0ff1be0c17b563dae",
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "updatechecker": false,
        "app_install_overwrite": [
            "apporder"
        ],
        "onlyoffice": {
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "jwt_header": "AuthorizationJwt"
        },
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "mail_smtpsecure": "ssl",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR",
            "HTTP_X_REAL_IP"
        ],
        "DOMAIN": "nextcloud.domain.com"
    }
}



 

Where are you connecting from? Web UI? A client mobile device? Etc.

Also please post raw log entries, as noted in the support template.

Also please post your Docker Compose or run command.

What appears under Admin settings->Overview?

P.S. occ commands can be run as described in the AIO docs: https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-run-occ-commands

Thank you for your inquiry.

  1. Web UI outside LAN

  2. I made corrections to my original post above. (I don’t see the log file for Apache/nginx/)

  3. :

I thought, this must be an issue with Docker Desktop, as this is such a vanilla install. I tried setting the ā€œEnable host networkingā€™ā€œ option under resources but that didn’t help.

Anyone have any insight how to diagnosis and possibly fix this issue?

How do you make Nextcloud available outside your LAN?

Do you use a reverse proxy/web server/third-party service for this?

This is a ā€˜stock’ AIO install (windows/Docker Desktop), (with no reverse proxy) through an open 80/443 port on my Unfi router.

I don’t know Docker, but either:

You are using some sort of port forwarding to allow your docker to be available outside your LAN, and your Android phone is blocking you from login authentication or

Those logs are unrelated to your remote attempts outside the LAN, and you need to do some additional configs.

In the latter’s case, you need to make your Nextcloud instance available outside your LAN. From within your LAN, connect to Nextcloud configs, and explore some of the Network options. Google DuckDNS, No-IP, Tailscale for options to access your Nextcloud from outside the LAN.

I’m using standard router port forwarding (80,443,8443) pointed to the Windows hosts IP address that runs Docker Desktop.

I have no problem accessing Nextcloud from anywhere (WAN or LAN) using the domain used during setup. Access is not the problem.

The problem is that every connection, either WAN or LAN gets identified as 127.0.01. Which makes every build-in (and added) defense that uses the unique remote IP address useless.

Have you checked your trusted proxys are correct? I am using a reserve proxy and to fix this with an reserve proxy you have to add him as a trusted proxy. May check if 172.0.0.1 is added as an trusted proxy.

Thanks, these are the values I see.

C:\Windows\System32>docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:get trusted_proxies
127.0.0.1
::1
172.19.0.0/16

I’ve tried adding the host machine’s and Docker Desktop network as a trusted proxy, and still only returns 127.0.0.1

C:\Windows\System32>docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:get trusted_proxies
127.0.0.1
::1
192.168.1.0/24
192.168.65.0/24
172.19.0.0/16

This I find interesting, I don’t see the newly added IP’s to the Nextcloud Startup Logs???

Nextcloud Startup Log
2025-11-09 06:53:44 System config value trusted_proxies => 0 set to string 127.0.0.1
2025-11-09 06:53:45 System config value trusted_proxies => 1 set to string ::1
2025-11-09 06:53:45 System config value trusted_proxies => 10 set to string 172.19.0.0/16
2025-11-09 06:53:46 Config value were not updated

I’ve set

docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set forwarded_for_headers 0 --value=ā€œHTTP_X_FORWARDED_FORā€
docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set forwarded_for_headers 1 --value=ā€œHTTP_X_REAL_IPā€

I’ve performed: (network ā€˜reset’)

docker network disconnect nextcloud-aio nextcloud-aio-mastercontainer
docker network rm nextcloud-aio
docker network create nextcloud-aio
docker network connect nextcloud-aio nextcloud-aio-mastercontainer

Nothing I do seems to correct the problem.