[Nextcloud] A cloud for personal or group use

Ok, I have Onlyoffice managed by Nextcloud:
In the Nextcloud’s app catalog I have installed:

  • Onlyoffice: 7.1.2
  • Community Document Server: 0.1.11

This explains why we don’t have the same behavior.

There must be a problem between the ynh package Onlyoffice and Nextcloud.

I didn’t try to install it since I saw a lot of negative comments on the store
https://apps.nextcloud.com/apps/documentserver_community
They talk about data loss and not being able to save documents.
The onlyoffice server in yunohost is reliable and stable, the only issue I have is that I can’t set a secret key, so anyone who knows the address can use it without needing a key.

1 Like

I tried to install onlyoffice via the ynh package, and it works out of the box in nextcloud (without the secret key).

FYI, you have a discussion about the secret key here: Onlyoffice Secret Key Issue - #2 by alankeny - onlyoffice - Nextcloud community

You can edit the file /etc/onlyoffice/documentserver/local.json, set to true all tokens “inbox”, “outbox” and “browser”, define the secret, and run sudo supervisorctl restart all

2 Likes

Yes I read this thread and a lot of other threads. Modifying local.json doesn’t make a difference. I already set inbox, outbox and browser to true and defined a secret key, but in the connector, it doesn’t connect if I input the secret key, but if I leave it blank, it connects.
I discussed it with @addictif80 and we didn’t find a way, here NextCloud vraiment lent - #21 by jarod5001

After doing that, if I leave the secret key blank, it doesn’t work anymore (as expected)

I am with YunoHost 4.2.8.3 (stable).
I tried to update from Nextcloud 22.1.1~ynh1 to 22.2.0~ynh1 and it failed (log at https://paste.yunohost.org/raw/lenafoyuhu)
Nextcloud was kept at its previous stage.

But it remains in maintenance mode.
So I did :

admin@xxx:~$ cd /var/www/nextcloud/
admin@xxx:/var/www/nextcloud$ sudo -u nextcloud /usr/bin/php7.3 occ maintenance:mode --off
[sudo] password for admin: 
Sorry, user admin is not allowed to execute '/usr/bin/php7.3 occ maintenance:mode --off' as nextcloud on bb.yyy.zz.
admin@xxx:/var/www/nextcloud$ su
Password: 
root@xxx:/var/www/nextcloud# sudo -u nextcloud /usr/bin/php7.3 occ maintenance:mode --off
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

But it failed again so I can’t have back my Nextcloud on.
Could you give me some advice where to look for a solution? :pray:

Thanks in advance :slight_smile:

Add apc.enable_cli=1 at the end of /etc/php/7.3/cli/php.ini and restart the service php7.3-fpm with yunohost service restart php7.3-fpm

1 Like

Thanks @metyun for your support ! It worked :tada:
Nextcloud is back online!

But I am still wondering why can’t I use occ comand with sudo and I need SU to get some result?

I have now to investigate the error during the upgrade. It seems linked to the backup process.

You can, but you have to add the argument: --define apc.enable_cli=1

sudo -u nextcloud /usr/bin/php7.3 --define apc.enable_cli=1 occ maintenance:mode --off
2 Likes

Smooth update.
Thanks !

I cannot find any php.ini file.

Also my nc is stucked in maintenance mode after updating to 21 to 22.

Any suggestion? Thank you.

Try [Nextcloud] A cloud for personal or group use - #422 by Kayou

@jarod5001 I tried but it didn’t work.

I restored a previous backup and I didn’t save the error, but was very similar to this one.

OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Salut,
J’ai trouvé la cause probable de ces montées de charge.
Dans “Paramètres → Stockage externe”, j’avais les stockages externes “Multimedia” et “Shared multimedia” dupliqué 5 fois chacun. Càd 5 lignes “Multimedia” et 5 lignes “Shared multimedia”.

Cela est probablement dû au fait que mon serveur yuno est en production depuis plus de 6 ans et que je tourne owncloud puis nextcloud depuis ce temps.

J’ai supprimé les raccourcis en doublons et je n’ai plus de montée de charge.
Youpi !

I made a mistake, the file is /etc/php/7.3/cli/php.ini

1 Like

I updated the php.ini file with apc.enable_cli=1
But I still have this error.

admin@home:~$ su
Password: 
root@home:/home/admin# sudo -u nextcloud /usr/bin/php7.3 --define apc.enable_cli=1 occ maintenance:mode --off
Could not open input file: occ
root@home:/home/admin#

To update nextcloud

sudo yunohost update nextcloud

To disable maintenance mode

sudo nano /var/www/nextcloud/config/config.php

Set maintenance to false

'maintenance' => "false"

You’re not in the right folder, occ command is in /var/www/nextcloud. Move in with the command cd /var/www/nextcloud before execute the occ command. Or you can also replace occ with /var/www/nextcloud/occ if you’re not in the folder. You can add explicit command --define apc.enable_cli=1, but if you modify the php.ini by adding apc.enable_cli=1 at the end, it’s not necessary.

As you have modify php.ini and you’re not in the right folder, the command must be:

sudo -u nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ maintenance:mode --off

You can also use @jarod5001 method. There are several ways to achieve this, you must choose one of them.

Thank you both.

admin@home:~$ su
Password: 
root@home:/home/admin# cd /var/www/nextcloud
root@home:/var/www/nextcloud# sudo -u nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ maintenance:mode --off
Maintenance mode already disabled

On config.php maintenance mode is already set to false.

I still have the internal error when I try to open nextcloud. .

Try to refresh with ctrl+shift+R