Install Nextcloud on Openwrt

Nextcloud version: 11.0.2
Operating system and version: OpenWrt 15.05.01
Apache or nginx version: 1.10.3
Hardware: Bananapi BPI-R1
PHP version : 7.1
Is this the first time you’ve seen this error?:yes

I had an painful long way to build openwrt, customizing all packages, adding innoDB to MySQL, setting user right to run the webserver… now everything seems right. The nextcloud installer shows up, the database is created, but the installer ends with an “Internal Server Error”. This is documented in the log below. I have no idea what to do with this error.
thanks for your help!

The output of your Nextcloud log in Admin > Logging:
not aviable

The output of your nginx og in /var/log/nginx/error.log:

2017/03/30 21:17:01 [error] 4152#0: *10 FastCGI sent in stderr: “PHP message: {“reqId”:“kgyNctkog4mWs43e9ss6”,“remoteAddr”:“192.168.1.186”,“app”:“index”,“message”:“Exception: {“Exception”:“OCP\\Files\\NotFoundException”,“Message”:””,“Code”:0,“Trace”:"#0 \/www\/nginx\/lib\/private\/Files\/Node\/Node.php(223): OC\\Files\\Node\\Node->getFileInfo()\n#1 \/www\/nginx\/lib\/private\/Files\/Node\/Node.php(106): OC\\Files\\Node\\Node->getPermissions()\n#2 \/www\/nginx\/lib\/private\/Files\/Node\/Folder.php(144): OC\\Files\\Node\\Node->checkPermissions(4)\n#3 \/www\/nginx\/lib\/private\/legacy\/util.php(370): OC\\Files\\Node\\Folder->newFolder(‘Photos’)\n#4 \/www\/nginx\/lib\/private\/legacy\/util.php(343): OC_Util::copyr(’\/www\/nginx\/core…’, Object(OC\\Files\\Node\\Folder))\n#5 \/www\/nginx\/lib\/private\/User\/Session.php(414): OC_Util::copySkeleton(‘admin’, Object(OC\\Files\\Node\\Folder))\n#6 \/www\/nginx\/lib\/private\/" while reading response header from upstream, client: 192.168.1.186, server: 192.168.1.1, request: “POST /index.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php7-fpm.sock:”, host: “192.168.1.1”

update:
in the last try i set the datafolder to /mnt/nextcloud which is an external connected hdd. this time i used default /www/nginx/data which let to this different errors.

“reqId”:“jnutcIX1huWOasAfJM/C”,“remoteAddr”:“192.168.1.186”,“app”:“no app in context”,“message”:“Exception: {“Exception”:“OCP\\Files\\NotFoundException”,“Message”:”\/ not found while trying to get owner",“Code”:0,“Trac$
{“reqId”:“jnutcIX1huWOasAfJM/C”,“remoteAddr”:“192.168.1.186”,“app”:“index”,“message”:“Exception: {“Exception”:“OCP\\Files\\NotFoundException”,“Message”:””,“Code”:0,“Trace”:"#0 \/www\/nginx\/lib\/private\/Files$

The first error looks like the webserver doesn’t have the permission to create the user folder. The second one (after you probably fixed the first one), I found some old references to bugs that are already fixed (none of those appeared during the installation process).

Please report this to the bugtracker on https://github.com/nextcloud/server/issues

ref: https://github.com/nextcloud/server/issues/4186

thx, this is my own post on github :wink:

Nextcloud version: 12.0.0.29
Operating system and version: OpenWrt DESIGNATED DRIVER (Bleeding Edge, 50104)
Apache or nginx version: 1.10.3
Hardware: ZBT-WG3526-SATA_V01
PHP version : 7.1.4
Extroot: No
Nextcloud on external storage: yes (/home/web/default/cloud)

I’m having trouble also. To simplify things, I decided to go with sqlite for now.

    {"reqId":"4JIWMC24r4XDPNTPASsK","level":3,"time":"2017-05-25T13:09:13+00:00","remoteAddr":"192.168.1.5","user":"--","app":"core","method":"GET","url":"\/nextcloud\/","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundExceptio
n\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private
\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(155): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/h
ome\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(92): OC\\\\Files\\\\Node\\\\Folder->newFolder('js')\\n#4 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(112): O
C\\\\Files\\\\AppData\\\\AppData->getAppDataFolder()\\n#5 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(83): OC\\\\Files\\\\AppData\\\\AppData->newFolder('core')\\n#6 \\\/home\\\/web\\\/default\\\/cl
oud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(105): OC\\\\Template\\\\JSCombiner->process('\\\/home\\\/web\\\/defau...', 'core\\\/js\\\/merged-...', 'core')\\n#7 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Templ
ate\\\/JSResourceLocator.php(68): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/home\\\/web\\\/defau...', 'core\\\/js\\\/merged-...')\\n#8 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Template\\\/
ResourceLocator.php(75): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#9 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/TemplateLayout.php(249): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#10 \\\
/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/TemplateLayout.php(132): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#11 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/legacy\\\/template.php(205): OC\\\\TemplateLay
out->__construct('error', '')\\n#12 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/Template\\\/Base.php(132): OC_Template->fetchPage()\\n#13 \\\/home\\\/web\\\/default\\\/cloud\\\/lib\\\/private\\\/legacy\\\/template.php(342):
OC\\\\Template\\\\Base->printPage()\\n#14 \\\/home\\\/web\\\/default\\\/cloud\\\/index.php(59): OC_Template::printExceptionErrorPage(Object(OCP\\\\Files\\\\NotFoundException))\\n#15 {main}\",\"File\":\"\\\/home\\\/web\\\/default\\\/cloud
\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","userAgent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/59.0.3071.86 Safari\/537.36","version":"12.0.0.29"}

Yei! It seems that nextcloud 10 works on latest trunk (50107) AND with php5. Latest trunk provides php7.1.4 which is incompatible with NC10 so php5 needs to be copied over from stable repo.

hi jannoke:
I have the same problem when install nextcloud12 and with php7. you mean that nextcloud 10 works well with php5 ?

Yes it works. It’s running on my WG2626 board (WG2626 is using MTK7621 solution, up to 880MHz. It supports 510/100/1000M RJ45 port, 1USB 3.0, 1* internal PCI-E interface, 1*Micro SD Card, SATA3.0)