Reinstall error but not trying to reinstall

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

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:

Nextcloud version (eg, 12.0.2): 16.something
Operating system and version (eg, Ubuntu 17.04): FreeNAS 11.2-U5
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.39
PHP version (eg, 7.1): 7.3

The issue you are facing:

I successfully installed NextCloud 16, created a couple of users and sync’d up a couple of computers. All looked fine. That was 2 days ago. Today, NextCloud does not appear to be running and when I try to connect via the web console I get this: “Error. It looks like you are trying to reinstall your NextCloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.”

So far as I know, I am not trying to reinstall NextCloud. If I create this CAN_INSTALL file (via “touch”), the web interface connection wants to go through the initial installation process again (e.g., asks me to create an admin account for the database, etc).

I have no idea why this is happening, or if I did something to inadvertently cause a reinstall process to start. Obviously, I don’t want to go through all that work again.

Please advise.

Thx.

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

In the Nextcloud root a directory named “config” should exist, in which the config.php file of your instance can be found. Make sure that the directory and the file exist and can be accessed/loaded by Nextcloud.

1 Like

Same problem here! Came back from vacation and got the same error message like @SupperDad .

Linux nextcloudpi 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l GNU/Linux
Nextcloud version 16.0.2.1

@j-ed Which permissions should be set for config.php? These are mine: -rw-r-----

This thread seams to discuss the same problem: Nextcloud hangs on/stuck on : CAN_INSTALL file missing after upgrade

Regards
soe

0640 should be ok, as long as the file is owned by the user under which the web server is running.

Thx, but I don’t think permissions are the issue here (though I could easily be mistaken). httpd runs as user www, and the config directory and config/config.php file both have www:www ownership, with the config.php file having 640 permissions. All directories above this are either owned by user www or have 755 permissions. As I said originally, if I create this CAN_INSTALL file in the config directory, via “touch”, then attempting to log in to the NextCloud web interface causes it to go through the initial setup procedure, asking for a mysql admin account and password to be created, etc. Is this supposed to happen, even though I already went through this process when setting up NextCloud initially? Any suggestions most welcome.

I believe I found the problem, though I’m not 100% sure of this. I think the problem was a mismatch between the GID of the mysql user created in the jail and the GID of the FreeNAS mysql user (my attempt to make them the same during the original install did not succeed, but I didn’t detect this at the time). Whether or not this was the problem, I just went through the process of “reinstalling” NextCloud, being more careful with the mysql user GIDs, and everything is working fine now. Thx for the help.

I think something happened during update in my case, just seen this error.
Config.php was broken and I decided to replace it with backed up last month.
Server runs update again and all seems fine.

Happened to me after i had my server in maintenance mode on and decided to to turn it off. The config files just reseted itself. I had to restore the config.php from a backup and it worked just fine. Always have backups!