Security & setup warnings stopped working after adding a Nginx Proxy in a separate VM

The Basics

  • Nextcloud Server version (e.g., 29.x.x): 30.0.4
  • Operating system and version (e.g., Ubuntu 24.04): Debian 12
  • Web server and version (e.g, Apache 2.4.25): Apache
  • Reverse proxy and version _(e.g. nginx 1.27.2) Nginx Proxy Manager
  • PHP version (e.g, 8.3): 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    Yes
  • When did this problem seem to first start?
    After adding a Nginx Proxy Manager in another VM to receive the traffic.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    Nope.

Summary of the issue you are facing:

I have a machine running NC 30 with Apache. It was receiving the traffic from the internet directly, but then I added a new machine with Nginx to forward traffic to the VM. Everything works but now when I go to Security & setup warnings I receive: Error occurred while checking server setup

There are NO errors on logs, when I inspect Network with the browser I see:
504 on GET DOMAIN/index.php/settings/ajax/checksetup

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

Simply go to Overview page on Administration.

Log entries

Nothing.

Web Browser

504 on GET DOMAIN/index.php/settings/ajax/checksetup

Web server / Reverse Proxy

504 on GET DOMAIN/index.php/settings/ajax/checksetup

Configuration

Nextcloud

<?php
$CONFIG = array (
  'passwordsalt' => 'some_salt',
  'secret' => 'some_secret',
  'trusted_domains' => 
  array (
    0 => 'my.domain',
  ),
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '30.0.4.1',
  'overwrite.cli.url' => 'https://my.domain',
  'dbname' => 'nextcloud',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'my_admin',
  'dbpassword' => 'my_password',
  'installed' => true,
  'instanceid' => 'my_instance_id',
  'default_phone_region' => 'BE',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => '0',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'maintenance_window_start' => 2,
  'updater.release.channel' => 'stable',
);

Apps

Not relevant.

A 504 indicates a reverse proxy is having problems interacting with the origin server (Nextcloud in this case).

Check the error logs of:

  • NPM
  • the Apache web server running on the server hosting Nextcloud

Note that your config indicates you’re running v29.0.5. Also that you’re on the beta channel.

You had a good eye for it @jtr… I fixed the real configuration (was a copy from an old post).

When I check access logs, I just see a 504 on Nginx Proxy:

[06/Jan/2025:06:27:10 -0500] - 504 504 - GET https <my-domain> "/index.php/settings/ajax/checksetup" [Client 77.63.75.21] [Length 566] [Gzip -] [Sent-to 1<my-nextcloud-ip>] "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" "-"

Actually, I found a similar solution to Error occurred while checking server setup, but there are not

I just needed to add to Nginx configuration:

  proxy_read_timeout 300s;
  proxy_send_timeout 300s;
1 Like

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