# Config.php is a stub after update

**URL:** <https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586>\
**Category:** ℹ️ Support\
**Created:** [January 7, 2020, 4:51pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586 "2020-01-07T16:51:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 7, 2020, 4:51pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/1 "2020-01-07T16:51:58Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> 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 ❤

Nextcloud version _(eg, 12.0.2)_: 17.0.2  
Operating system and version _(eg, Ubuntu 17.04)_: arch  
Apache or nginx version _(eg, Apache 2.4.25)_: nginx 1.16.1  
PHP version _(eg, 7.1)_: 7.3

The issue you are facing:

After an update the nextcloud website invites me to create an admin user etc even though I had been running nextcloud for a while already. It looks like the reason is that my config.php in /etc/webapps/nextcloud/config, which is symlinked from /usr/share/webapps/nextcloud/config is basically empty after now. I can’t tell for sure what caused that, but at least checking the modification times I can tell that the last time config.php was modified is up to 1/2 of a second exactly the time when the update started. Maybe the file has disappeared earlier already and the update just put the stub file there because config.php had already gone, I don’t know. But I don’t know what would have caused the file to disappear if not the update. The ssd where config.php lies has not reported any errors so far.

It looks similar to [Nextcloud returns to page "create admin account" after update](https://help.nextcloud.com/t/nextcloud-returns-to-page-create-admin-account-after-update/51169).

Of course I had been doing backups, but only of /usr/share/webapps/nextcloud, and I hadn’t realized until now that the config folder there is only a symlink, and I configured the update in a way that it preserves symlinks, oh well… I will backup the config files in /etc/ from now on too, had been planning to do that anyways.

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:  
I don’t feel like testing that out.

The output of your Nextcloud log in **Admin \> Logging** :  
I don’t know where to find this.

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => 'oce7zkjp9x37',
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:  
Is this interesting?

EDIT: Actually I don’t know too much about how nextcloud works, so it might very well be that my assumption that nextcloud doesn’t work because config.php doesn’t seem to contain much is not correct. In any case, help would be much appreciated.

EDIT: Also when trying to turn on maintenance mode it says that nextcloud is not even installed. And that php says it can’t find imagick.

---

<div class="post-metadata">

**Author:** ![SmallOne](https://help.nextcloud.com/user_avatar/help.nextcloud.com/smallone/32/5326_2.png) [@SmallOne](https://help.nextcloud.com/u/SmallOne)\
**Post date:** [January 7, 2020, 8:58pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/2 "2020-01-07T20:58:09Z")

</div>

How did you do the update?

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 7, 2020, 9:13pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/3 "2020-01-07T21:13:02Z")

</div>

pacman -Syu

It wasn’t even a major update, just from 17.0.1 to 17.0.2.

---

<div class="post-metadata">

**Author:** ![SmallOne](https://help.nextcloud.com/user_avatar/help.nextcloud.com/smallone/32/5326_2.png) [@SmallOne](https://help.nextcloud.com/u/SmallOne)\
**Post date:** [January 7, 2020, 9:30pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/4 "2020-01-07T21:30:04Z")

</div>

So probably the package manager did something wrong and replaced files and more. I have never installed nextcloud from packages.

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 6:36am UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/5 "2020-01-08T06:36:28Z")

</div>

Oh really? I was assuming if this was the case then it would be effecting more people.

But then what should I do now?

1. tammikuuta 2020 23.40.10 GMT+02:00 Johan Bernhardsson via Nextcloud community [noreply@nextcloud.com](mailto:noreply@nextcloud.com) kirjoitti:

---

<div class="post-metadata">

**Author:** ![SmallOne](https://help.nextcloud.com/user_avatar/help.nextcloud.com/smallone/32/5326_2.png) [@SmallOne](https://help.nextcloud.com/u/SmallOne)\
**Post date:** [January 8, 2020, 8:15am UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/6 "2020-01-08T08:15:18Z")

</div>

Check if you have an occ upgrade command in the nextcloud app folder sudo -u www-data /path/to/nextcloud/occ upgrade

and do check for pacman save files. It was some time since i used arch. I dont know the packages system that well only parts of it. In general applications like nextcloud is better installed manually so that it is upgraded separatly from the package system.

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 12:12pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/7 "2020-01-08T12:12:36Z")

</div>

Thank you.

There is no pacsave for any nextcloud file.

So what can I do now? I was thinking about trying to write a new config.php manually. Does this make sense? The thing is I dont even know if config.php is the only cause of problems. Or should I run follow the installation instructions of the web interface?

The good thing is all my data seems to be still there and I also have a recent backup of that.

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 1:03pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/8 "2020-01-08T13:03:58Z")

</div>

Ah or did you mean that occ upgrade might somehow fix the problem I have right now?

---

<div class="post-metadata">

**Author:** ![SmallOne](https://help.nextcloud.com/user_avatar/help.nextcloud.com/smallone/32/5326_2.png) [@SmallOne](https://help.nextcloud.com/u/SmallOne)\
**Post date:** [January 8, 2020, 2:01pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/9 "2020-01-08T14:01:46Z")

</div>

Yes. Normal upgrades when done from within nextcloud runs an upgrade procedure after new files are copied in. You get the option of doing that from the webui or the cli with the occ command

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 4:52pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/10 "2020-01-08T16:52:25Z")

</div>

I see thanks. It said ‘nextcloud is not installed’ and ‘command upgrade is not defined’ though.

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 6:31pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/11 "2020-01-08T18:31:38Z")

</div>

Hm well actually I knew that. This is actually what I used to have to do when updating. At least for major upgrades. I don’t remember if also for small ones

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 8, 2020, 8:19pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/12 "2020-01-08T20:19:09Z")

</div>

So should I try to “install” nextcloud, or can that break things?

---

<div class="post-metadata">

**Author:** ![cadaeib](https://help.nextcloud.com/letter_avatar/cadaeib/32/5_5575768a8748004e209b776fc1b2916d.png) [@cadaeib](https://help.nextcloud.com/u/cadaeib)\
**Post date:** [January 12, 2020, 5:42pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/13 "2020-01-12T17:42:56Z")

</div>

i rewrote the config.php and so far it is working again.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 8:06pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/14 "2024-12-11T20:06:22Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 8:06pm UTC](https://help.nextcloud.com/t/config-php-is-a-stub-after-update/67586/15 "2024-12-11T20:06:23Z")

</div>


