helm icon indicating copy to clipboard operation
helm copied to clipboard

File CAN_INSTALL is missing from your config directory.

Open Jymitar opened this issue 1 year ago • 4 comments

Describe your Issue

I have setup a clean k3s cluster and I am trying to install NextCloud but for some reason it doesn't work. I am using the latest HELM chart version.

Logs and Errors

Nextcloud 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.

Nextcloud – a safe home for all your data

Describe your Environment

  • Kubernetes distribution: k3s - 1.30.4

  • Helm Version (or App that manages helm): v3.12.3 using FluxCD 2.3.0

  • Helm Chart Version: 5.5.6

  • values.yaml:

  values:
    replicaCount: 1
    phpClientHttpsFix:
      enabled: true
      protocol: https
    nextcloud:
      host: cloud.example.com
      existingSecret: 
        enabled: true
        secretName: nextcloud-cred
      configs:
        custom.config.php: |-
          <?php
          $CONFIG = array (
            'maintenance_window_start' => 1,
            'default_phone_region' => 'BG',
            'default_timezone' => 'Europe/Sofia',
            'overwriteprotocol' => 'https',
            'overwritehost' => 'cloud.example.com',
            'trusted_proxies'   => ['10.0.0.0/8'],
          );
      phpConfigs:
        opcache-recommended.ini: |
          opcache.enable=1
          opcache.interned_strings_buffer=32
          opcache.max_accelerated_files=30000
          opcache.memory_consumption=512
          opcache.save_comments=1
          opcache.revalidate_freq=60
          opcache.jit=1255
          opcache.jit_buffer_size=128M
    persistence:
      enabled: true
      existingClaim: nextcloud
      nextcloudData:
        enabled: true
        existingClaim: nextcloud-data
    cronjob:
      enabled: true
    internalDatabase:
      enabled: false
    externalDatabase:
      enabled: true
      type: postgresql
      existingSecret:
        enabled: true
        secretName: nextcloud-postgres-nextcloud-admin
        usernameKey: LOGIN
        passwordKey: PASSWORD
        hostKey: HOST
        databaseKey: DATABASE_NAME

Additional context, if any

I am using local-path to provision the volumes I am using a secret to pass the initial username and password. I am using an already provisioned PostgreSQL instance using the bitnami chart - 15.5.31 I am using external postgres operator to create the database the user credentials and the secret I pass as an existing secret. All secrets values are passed correctly to the pod. The database is being seeded after nextcloud is deployed. There are no error logs in the pod. When I git the domain I get the above error.

Any advice would be appreciated.

Jymitar avatar Sep 14 '24 23:09 Jymitar

Since this is a new install and can you try deleting the install, and then wiping/deleting the PVC entirely and trying again? This typically happens when there's already data in the PVC. If your install takes a little bit, you may also want to adjust the probes, but this may not be necessary. You can learn more about probes here: https://github.com/nextcloud/helm/tree/main/charts/nextcloud#probes-configurations

jessebot avatar Sep 20 '24 08:09 jessebot

Also have the same issue, I was trying to migrate my nextcloud data using k8up, and when the application boot up, I'm getting this error.

So I can't wipe out my data because I need my client's data so they can still use the nextcloud.

s4ndalHat avatar Oct 22 '24 10:10 s4ndalHat

Hello @s4ndalHat

I just migrated my nextcloud installation from docker to kubernetes using k3s and I faced this message. I kept the same database. Here is what I did to solve it.

  • Backup your existing nextcloud directory.
  • Create the pv and pvc for nextcloud. In my case I used a local-path as storage class so I just created a directory on a node.
  • Migrate directories 3rdparties, apps and data from your previous installation to the new volume.
  • Create a values.yaml file for the helm chart
  • Deploy the helm chart

This first deployment creates other directories and configuration in the volume.

Update the file config/config.php:

  • Add a config is_installed => true
  • Set the same serverid as your previous installation (I am not sure if this is required).
  • Set the same 'passwordsalt' and 'secret'.
  • Restart the pod

This will not consider the deployment as a new one and you should not see the message anymore.

mivek avatar Nov 07 '24 22:11 mivek

Hello,

I just tried a fresh install, using the embedded postgresql database and face the same message.

I have a secret for all postgresql passwords (user, admin, replication). The issue was that I also needed to set in values.yml postgresql.global.postgresql.auth.password.

I am not sure to understand very well why I would need that, but it solved the problem in my case.

Tireur2cables avatar Mar 17 '25 23:03 Tireur2cables