Updater redirect to dashboard

Hi.

I have Nextcloud 22.2.0 and I want to install the 22.2.3 version. When I select the button to open the updater, this redirects to the dashboard.

I have seen in another post that they add

apc.enable_cli=1

into php.ini. But I have with docker and can’t find the file.

Any ideas? Thank you

Hi,

If you want to find the location of the php.ini file, you can run: php -i | grep php.ini from the command line.

apc.enable_cli=1 is only required if you have APCu enabled in your NC installation, so check that first.

https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/caching_configuration.html

1 Like

Thank you for your answer.

I have APCu enabled.

root# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/etc/php
root# ls /usr/local/etc/php/
conf.d php.ini-development php.ini-production

But I have 2 php.ini :sweat:

Not a worry.

cd to /usr/local/etc/php/, then cp php.ini-production php.ini

then you can use your favourite text editor to set apc.enable_cli=1 in your new php.ini

You’ll need to do restart apache and php-fpm (if necessary) before trying again.

Let me know when it’s working
-G

1 Like

Perfect, now I have the php.ini with apc.enable_cli line. Thank you for this :slight_smile:

But I still same problem with redirect updater.

Any idea?

Let’s try running the updater from the command line and see what happens?
Just make sure that www-data is the correct user, as it may be different on your system.

sudo -u www-data php /var/www/nextcloud/updater/updater.phar

See here for more info => https://docs.nextcloud.com/server/stable/admin_manual/maintenance/update.html

1 Like

I can’t find updater folder and updater.phar.

root:/var/www/html# ls
3rdparty COPYING config core custom_apps index.html lib occ ocs public.php resources status.php version.php
AUTHORS apps console.php cron.php data index.php memoria.sh ocm-provider ocs-provider remote.php robots.txt themes

root:/var/www/html# find /var/www/ -name “updater.phar”
root:/var/www/html#

OK, let’s take a step back and cd to your nextcloud directory.

then let’s try

sudo -u www-data php occ upgrade

1 Like

root:/var/www/html# sudo -u www-data php occ upgrade

Nextcloud is already latest version

So the files haven’t been downloaded yet, you should be able to use the command line updater now though:

sudo -u www-data php /var/www/html/updater/updater.phar

can’t find the updater yet :pensive:

root:/var/www/html# sudo -u www-data php /var/www/html/updater/updater.phar

Could not open input file: /var/www/html/updater/updater.phar

If all else fails, you can always update manually, see link below.

https://docs.nextcloud.com/server/22/admin_manual/maintenance/manual_upgrade.html

1 Like

I’ll try it.

Thank you :grinning:

with docker you are not expected to run an updater… you should wait until the desired version is available (latest 22.2 is based on 22.2.3) and then update your container…

Docker Hub > Update to a newer version

1 Like

If I have it in portainer is it the same?

I’m not sure how portainer works. Nextcloud keeps using same version tag for long time - maybe portainer doesn’t recognize there is new image… so please check how/if there is a way to force refresh of the container… but in general the process is the same: docker container must be updated by running new image and not through internal updater…

2 Likes

Perfect. Thank you so much :grinning:

Update using portainer:

  1. Select Containers, then stop the container that you’d like to update.
  2. Select the container, and you’ll see a button named Recreate. By selecting this button, the container will take the persistent data and recreate the container. Keep in mind that the only data that will stay on the container is data that was mapped to a volume. This is explained in greater detail in the video above.
  3. Select Pull latest image, then Recreate.
  4. When this process is finished, the container will be recreated with the latest image. Select the container and Start it. The status will change to running.

It works :smiley:

1 Like