No longer accessible after AIO

Some years ago I hd a nextcloud in a Raspbneryy PI; then I bought a PC exposed port 89 & 443 to my static piblic IP; I have a machine with Ubuntu and the Apache server in my LAN (192,168.1.2) which has multiple virtual servers.

```

mune@fedehome:~$ ls /var/www/html/

index.html nextmune.munerotto.it test.php www.mune.it www.munerotto.it```

mune@fedehome:~$ ls /etc/apache2/sites-enabled/

000-default.conf nextmune.munerotto.it.conf www.mune.it.conf www.munerotto.it.confnextmune.munerotto.it-le-ssl.conf www.mune.it-le-ssl.conf

```

``www.munerotto.it-le-ssl.conf`` (``/var/www/html/www.munerotto.it/``) is my own web home.

In June, to install nextcloud’s AI, I installed Nextcloud-AIO which uses docker and it stopped working; I was never able to use the AI, but -with the help of openAI- both my site and nextcloud worked again (there was probably a ReverseProxy in Apache’s VHost.conf). Last week I changed addresses to the LAN (the server from 192.168.2.200 to 192.168.1.2) but nextcloud didn’t recover. The Apache conf file of the two vhosts for nextcloud:

```

mune@fedehome:~$ cat /etc/apache2/sites-enabled/nextmune.munerotto.it.conf

<VirtualHost *:80>

ServerName nextmune.munerotto.it

DocumentRoot /var/www/html/nextmune.munerotto.it

# Reverse Proxy per Nextcloud AIO

ProxyPreserveHost On

ProxyPass / https://127.0.0.1:8080/

ProxyPassReverse / https://127.0.0.1:8080/

```

and

```

mune@fedehome:~$ cat /etc/apache2/sites-enabled/nextmune.munerotto.it-le-ssl.conf

<VirtualHost *:443>

ServerName nextmune.munerotto.it

# Reverse Proxy per Nextcloud AIO (HTTP sulla porta 8081)

ProxyPreserveHost On

ProxyPass / http://127.0.0.1:8180/

ProxyPassReverse / http://127.0.0.1:8180/

# Configurazione SSL

SSLEngine on

SSLCertificateFile /etc/letsencrypt/live/nextmune.munerotto.it/fullchain.pem

SSLCertificateKeyFile /etc/letsencrypt/live/nextmune.munerotto.it/privkey.pem

Include /etc/letsencrypt/options-ssl-apache.conf

```

----------------------------

I understood that

  • Nextcloud AIO uses docker
  • inside the docker it uses caddy as web server

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • I don't know how to get it
  • Operating system and version (e.g., Ubuntu 24.04):
    • UBUNTU 22.04.5 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.52 (Ubuntu)

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!):

mune@fedehome:~$ sudo cat /var/www/html/nextmune.munerotto.it/config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'XXXXXXXXXXXXXXXXXXX',
  'passwordsalt' => 'YYYYYYYYYYYYYYYYYYYYYY',
  'secret' => 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ',
  'trusted_domains' => 
  array (
    0 => 'nextmune.munerotto.it',
    1 => '192.168.1.2',
    3 => 'localhost',
  ),
  'datadirectory' => '/opt/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '30.0.11.1',
  'overwrite.cli.url' => 'https://192.168.1.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '---',
  'dbpassword' => '----',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_domain' => '---',
  'mail_from_address' => '---',
  'mail_smtphost' => '----',
  'mail_smtpport' => '465 ',
  'mail_smtpname' => '---',
  'mail_smtppassword' => '---',
  'mail_smtpauthtype' => 'LOGIN',
  'installed' => true,
  'logfile' => '/var/log/nextcloud.log',
  'maintenance' => false,
  'loglevel' => 2,
  'theme' => '',
  'updater.secret' => '-----',
  'ai_assistant_provider' => 'openai',
  'ai_assistant_openai_api_key' => '-----',
  'ai_assistant_openai_model' => 'gpt-4',
  'push_provider' => '\\OC\\Notifications\\Push',
);


(Can't find occ.)

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Didn’t recover how? What happens when you access it?

Your provided configuration does not look like Nextcloud All-In-One (AIO). Are you sure that’s what you’re using?

1 Like

As long the modem/router forward ports 80/443, the IP change should have been transparent for the web server -and. as conseguent, to NC. That is what with “recover” I meant.


You are right: I have the same feeling. I think that when in June I made that upgrade I made an Nextcloud FRANKSTEIN installation: one half is an old PHP/HTML and a half which is docker based; how it worked up to the last week is a mystery. I think the config.php is the one I used with PHP/HTML one.

I have a simple idea.

  1. I can make a backup (beside all the files already synced on my machine there are cooking recipes);
  2. delete everything;
  3. reinstall the latest NC from scratch;
  4. fill the brand new NC with the backup;

Is it feasible solution?

mune@fedehome:/var/www/html/nextmune.munerotto.it$ sudo -E -u www-data php occ config:list system
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "nextmune.munerotto.it",
            "1": "192.168.1.2",
            "3": "localhost"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.11.1",
        "overwrite.cli.url": "https:\/\/192.168.1.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465 ",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "installed": true,
        "logfile": "\/var\/log\/nextcloud.log",
        "maintenance": true,
        "loglevel": 2,
        "theme": "",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "ai_assistant_provider": "openai",
        "ai_assistant_openai_api_key": "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",
        "ai_assistant_openai_model": "gpt-4",
        "push_provider": "\\OC\\Notifications\\Push"
    }
}