[ NextCloud ] [ 21.0.3] OwnCloud Fork

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
Zeven
New here
Posts: 9
Joined: Fri Feb 15, 2013 9:52 pm

Cron

Post by Zeven »

I'd prefer to use cron over AJAX, but I'm not sure how to do this here. It should be something like this (source https://docs.nextcloud.com/server/12/ad ... ation.html):

Code: Select all

*/15  *  *  *  * php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php
But the php-part is giving me trouble. I'm not sure which php file to use. I've tried the new one in Qapache:

Code: Select all

/share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php
This throws a bucketload lot of errors, so I've tried an old version by using:

Code: Select all

/mnt/ext/opt/apache/bin/php
Which seems to work fine, but I don't know if it's smart to use something outside of Qapache here.

Advice would be appreciated! If I find the correct command, I'll add it to the crontab on boot using something like:

Code: Select all

echo "15 * * * *  php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php >> /etc/config/crontab
Edit: apparently, the errors can be ignored and are caused by also running the default Qnap php 5. Just add the following to the crontab (instructions are here: https://wiki.qnap.com/wiki/Add_items_to_crontab):

Code: Select all

*/15 * * * * /share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php
Last edited by Zeven on Sat Aug 05, 2017 9:19 pm, edited 2 times in total.
Zeven
New here
Posts: 9
Joined: Fri Feb 15, 2013 9:52 pm

Re: [ NextCloud ] [ 10.0.0 ] OwnCloud Fork

Post by Zeven »

KibosJ wrote:
QNAP_Stephane wrote:you checked the config.sample.php as example ?

Code: Select all

/**
 * Which mode to use for sending mail: ``sendmail``, ``smtp``, ``qmail`` or
 * ``php``.
 *
 * If you are using local or remote SMTP, set this to ``smtp``.
 *
 * If you are using PHP mail you must have an installed and working email system
 * on the server. The program used to send email is defined in the ``php.ini``
 * file.
 *
 * For the ``sendmail`` option you need an installed and working email system on
 * the server, with ``/usr/sbin/sendmail`` installed on your Unix system.
 *
 * For ``qmail`` the binary is /var/qmail/bin/sendmail, and it must be installed
 * on your Unix system.
 */
'mail_smtpmode' => 'sendmail',

/**
 * This depends on ``mail_smtpmode``. Specify the IP address of your mail
 * server host. This may contain multiple hosts separated by a semi-colon. If
 * you need to specify the port number append it to the IP address separated by
 * a colon, like this: ``127.0.0.1:24``.
 */
'mail_smtphost' => '127.0.0.1',

/**
 * This depends on ``mail_smtpmode``. Specify the port for sending mail.
 */
'mail_smtpport' => 25,

................................
I have yeah.

If I could find the smtp/email log then I might get a little further.

...
Where you ever able to fix this? I've got the same problem when setting up email. Tried to edit config.php, using settings that work perfectly on the Qnap itself.

Edit: email, using my own SMTP server, works - but only with Encryption on None. My guess is the SSL certificate still isn't configured 100% correctly.
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

CasaP wrote:All set up now, except for Memory Cache, so thank you for your (once again) great work Stephane.

Does anybody have any idea how to set up either Redis (preferable) or memcached?

I'm getting a lot of "Locked" errors.

Also, how do we run the occ command line commands in qNap, I get the Ubuntu syntax, but no idea how to replicate on the qNap. It would be great if somebody could do an a-z how to on this, I might attempt at the weekend, snowed here in work at the moment.

Thanks in advance
this worked for me.

EDIT: updated to using unix socket than port connection. Somehow QNAP resets the redis.conf back to port 0 after some time. So it disables the redis server connection through port 6379.

check redis is running with

Code: Select all

ps ax | grep redis

you should see a line that says
3654 admin 3456 S /mnt/ext/opt/netmgr/util/redis/redis-server *:0

if it isn't running you'll need to start it with

Code: Select all

/mnt/ext/opt/netmgr/util/redis/start.sh start
check socket is available at /tmp

Code: Select all

cd /tmp
ls | grep redis*.sock
You should be see this response
netmgr-redis.sock=
edit the nextcloud config file

Code: Select all

vim /opt/NextCloud/nextcloud/config/config.php
add in the lines

Code: Select all

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/netmgr-redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
restart nextcloud

done!

tested with TS453 with QTS4.3.3
Last edited by yanuk on Sat Aug 05, 2017 11:46 am, edited 3 times in total.
TS451
TS453
TVS-682
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

to run occ commands

I use Qapache's php7
add php to the path

Code: Select all

export PATH=/share/CACHEDEV1_DATA/.qpkg/Qapache/bin:$PATH
run occ example:

Code: Select all

/opt/NextCloud/nextcloud/occ files:scan --all
you will get some php warnings
PHP Warning: Module 'memcached' already loaded in Unknown on line 0
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_dblib' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning: Module 'PDO_ODBC' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_pgsql' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning: Module 'apcu' already loaded in Unknown on line 0
PHP Warning: Module 'timezonedb' already loaded in Unknown on line 0
PHP Warning: Module 'raphf' already loaded in Unknown on line 0
PHP Warning: Module 'propro' already loaded in Unknown on line 0
PHP Warning: Module 'xattr' already loaded in Unknown on line 0
PHP Warning: Module 'solr' already loaded in Unknown on line 0
PHP Warning: Module 'hrtime' already loaded in Unknown on line 0
PHP Warning: Module 'mailparse' already loaded in Unknown on line 0
PHP Warning: Module 'hprose' already loaded in Unknown on line 0
PHP Warning: Module 'scrypt' already loaded in Unknown on line 0
PHP Warning: Module 'xxtea' already loaded in Unknown on line 0
PHP Warning: Module 'krb5' already loaded in Unknown on line 0
PHP Warning: Module 'swoole' already loaded in Unknown on line 0
PHP Warning: Module 'dba' already loaded in Unknown on line 0
PHP Warning: Module 'ev' already loaded in Unknown on line 0
PHP Warning: Module 'eio' already loaded in Unknown on line 0
PHP Warning: Module 'OAuth' already loaded in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
PHP Warning: Module 'redis' already loaded in Unknown on line 0
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
According to Stephane it's normal because he's just declared those again to be safe while they were loaded from Qnap's php5

it will still run the occ command after the warnings.
TS451
TS453
TVS-682
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

12.01 is out and I eagerly updated it via the web interface.

Now I can't execute occ from the commandline, it says
-sh: ./occ: Permission denied
ouch. is there anything I can do? sudo doesn't work
TS451
TS453
TVS-682
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by raidforsaving »

yanuk wrote:12.01 is out and I eagerly updated it via the web interface.

Now I can't execute occ from the commandline, it says
-sh: ./occ: Permission denied
ouch. is there anything I can do? sudo doesn't work
Do this and share the output:

Code: Select all

ls -lt /opt/NextCloud/nextcloud/occ
If the owner is not admin, then you can probably change it using chmod, but I'm not going to be the one to advise the change. It may at least identify the cause.
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

raidforsaving wrote:
yanuk wrote:12.01 is out and I eagerly updated it via the web interface.

Now I can't execute occ from the commandline, it says
-sh: ./occ: Permission denied
ouch. is there anything I can do? sudo doesn't work
Do this and share the output:

Code: Select all

ls -lt /opt/NextCloud/nextcloud/occ
If the owner is not admin, then you can probably change it using chmod, but I'm not going to be the one to advise the change. It may at least identify the cause.
the output is
-rw-rw-rw- 1 admin administ 283 Aug 8 10:00 /opt/NextCloud/nextcloud/occ
did a chmod +x occ and it runs now but...
I think that's the last of my issues.

My clients can log on but cannot sync
8/8/17 8:50:31 PM, Operations/Proposed Layout/file1.shd, Nextcloud,Operation canceled
8/8/17 8:50:31 PM, Operations/Proposed Layout/file2.JPG, Nextcloud,Operation canceled
8/8/17 8:50:31 PM, Operations/Proposed Layout/Revised.JPG, Nextcloud,Operation canceled
8/8/17 8:50:31 PM, Operations/Proposed Layout/Propose Revise.JPG, Nextcloud,Operation canceled
8/8/17 8:50:31 PM, Operations/Proposed Layout/Den.shd, Nextcloud,Operation canceled
8/8/17 8:50:31 PM, Operations/Proposed Layout/Jessa.shd, Nextcloud,Error downloading https://cloud.mywebiste.me/remote.php/w ... s/Proposed Layout/neGoh.shd - server replied: Service Unavailable
8/8/17 8:50:30 PM, General Admin/Minutes of Meeting/~$Minutes 1.xlsx, Nextcloud,File is listed on the ignore list.
8/8/17 8:50:30 PM, .@__thumb, Nextcloud,File/Folder is ignored because it's hidden.
Service Unavailable.. ooops.. that's bad..

If i backup the config file, delete the Nextcloud App, reinstall it and copy the config file back. will I get back my previous NC12.0 install?
TS451
TS453
TVS-682
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

After I run

occ files:scan --all

everything seems to be working now. so I guess updating via the webui works somewhat but will require to set permissions to the occ file to execute, then run scan files. Not sure if that was the issue, but at least it works now :)
TS451
TS453
TVS-682
chandlerbing
Starting out
Posts: 17
Joined: Tue Feb 07, 2017 5:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by chandlerbing »

It would be great to know what you guys are doing to fix your installations after using the built-in updater. I'm using the Universal QPKG so it's using the built-in web server. When I use the updater, it goes though the entire process without errors, but then the pages are completely dead when trying to visit the page after that. This was a clean install so no harm done, but I'd love to figure out a dependable way to use the built-in updater.

EDIT: Thank you for the super quick update Stephane!!
chandlerbing
Starting out
Posts: 17
Joined: Tue Feb 07, 2017 5:45 am

Re: [ NextCloud ] [ 12.0.1 ] OwnCloud Fork

Post by chandlerbing »

I'm getting a problem when installing the Universal version of the 12.0.1 QPKG manually. After running the first-time setup, I'm taken to the Nexcloud homescreen where I should see the first-run wizard pop up. However, the wizard isn't there and none of the buttons respond to any clicks. I'm installing from scratch, and the 12.0.0 QPKG still installs fine. Could this be an issue with the universal QPKG?
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by yanuk »

chandlerbing wrote:It would be great to know what you guys are doing to fix your installations after using the built-in updater. I'm using the Universal QPKG so it's using the built-in web server. When I use the updater, it goes though the entire process without errors, but then the pages are completely dead when trying to visit the page after that. This was a clean install so no harm done, but I'd love to figure out a dependable way to use the built-in updater.

EDIT: Thank you for the super quick update Stephane!!
I have encountered the same issue. See my reply above.

In short I chmod the occ file to allow eXecution. did a files:scan --all and it worked
TS451
TS453
TVS-682
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ NextCloud ] [ 12.0.1 ] OwnCloud Fork

Post by yanuk »

After clicking on the update within the webui, i saw the app from repository was available for update (thank you stephane!)

couldn't resist clicking on the update (though I'm already on 12.0.1) and everything worked well.
TS451
TS453
TVS-682
User avatar
mackowiakp
Starting out
Posts: 23
Joined: Wed Mar 08, 2017 5:17 pm

Re: [ NextCloud ] [ 12.0.1 ] OwnCloud Fork

Post by mackowiakp »

I try to upgrade NextCloud form 12.0.0 to 12.0.1 via WEB interface but it display only info "Initialising" and nothing more happens. I installed ver 12.0.0 from added community repo in App Center. Of course 12.0.1 QPKG package is avaliable here but I dont know can I install it over existing and working installation or not. Any advice what I have to do?
QNAP TS-453A

Linux is like wigwam. No Windows, no Gates but Apache inside.
CylonCenturion

Re: [ NextCloud ] [ 12.0.0 ] OwnCloud Fork

Post by CylonCenturion »

QNAP_Stephane wrote:old ARMv5 must use the universal package with web server enable

i do not schedule to build Qapache for old NAS, it require a minimum of ressrouce to runs and glibc is too old to cross compil some required libs
12.0.2!
:wink: :wink: :wink:
User avatar
mackowiakp
Starting out
Posts: 23
Joined: Wed Mar 08, 2017 5:17 pm

Re: [ NextCloud ] [ 12.0.1 ] OwnCloud Fork

Post by mackowiakp »

Still can nou upgrade from 12.0.0 to 12.0.2 using build-in WEB GUI updater. It still display "Initialising" and nothing more. Any advice? Logs are clear...
QNAP TS-453A

Linux is like wigwam. No Windows, no Gates but Apache inside.
Post Reply

Return to “Community Apps”