#+TITLE: Nextcloud installation to shared hosting (kapsi.fi) #+SUBTITLE: With Borg backups #+DATE: <2017-06-04 Tue> #+AUTHOR: Tuomas Pyyhtiä #+EMAIL: pyyhttu+nextcloud@pm.me #+DESCRIPTION: A description of how Nextcloud was installed to kapsi.fi hosting #+KEYWORDS: nextcloud kapsi.fi debian #+LANGUAGE: en # Don't show table of contents, export underscore as underscore instead of # highlight in HTML (was: ^:nil), include priority cookies: #+OPTIONS: toc:t ':t pri:t # Rest of options (as explained here: https://orgmode.org/manual/Export-Settings.html): #+OPTIONS: num:nil p:nil stat:t tags:t tasks:t tex:t timestamp:t #+BEGIN_COMMENT #+PROPERTY: header-args :eval never-export :exports both :results replace #+END_COMMENT # Include usable macros from https://github.com/fniessen/org-macros: #+INCLUDE: ../org-mode/macros/org-macros.setup #+BEGIN_COMMENT #+INFOJS_OPT: view:content ltoc:nil path:../org-mode/js/org-info.js # for more info see: https://orgmode.org/worg/code/org-info-js #+END_COMMENT #+HTML_HEAD: #+HTML_LINK_HOME: https://pyyhttu.kapsi.fi #+HTML_LINK_UP: https://pyyhttu.kapsi.fi/debian/ * Nextcloud ** Philosophy #+BEGIN_QUOTE Nextcloud offers the industry-leading, on-premises content collaboration platform. #+END_QUOTE - Decentralized and federated cloud. - Decentralized: I'm in control, but also responsible of my data. - Federated: Scales infinitely, I can easily share, and never run out of space. This obv. requires me to contact Kapsi admins and [[https://www.kapsi.fi/palvelut/levytila.html][request more disk space]] or, setup e.g. an Amazon S3 bucket as an external storage. - Open source: no vendor lock-in, ensured continuous development, and I like Nextcloud's roadmap, when compared e.g. to [[https://tech.slashdot.org/story/20/06/18/1522201/dropbox-is-a-total-mess][Dropbox]]. - Photos backup in original quality, so I don't have to pay Google Photos / iCloud subscription. ** Preparation - Find a hosting provider, e.g. Kapsi, that has the needed infrastructure already setup and maintained (MariaDB, php, etc.). Install there to data storage called [[https://www.kapsi.fi/palvelut/levytila.html]["Siilo"]]. - If Kapsi is to be selected, then request Kapsi admins a data storage page, [[https://www.kapsi.fi/ohjeet/web2.html][see instructions]] for that. In my case the page requested was: https://pyyhttu-siilo.kapsi.fi/. *** Data Migration - Migrating existing data into Nextcloud can currently be done from [[https://nextcloud.com/blog/easy-migration-to-nextcloud-from-insecure-and-privacy-unfriendly-platforms-now-available/][Google, Dropbox and OneDrive]]. However, I used [[https://rclone.org/][Rclone]] and [[file:///c:/users/tpyyhtia/Nextcloud/Documents/Orgzly/exiftool/exiftool.html][exiftool.]] ** Pre-installation tasks on kapsi - After you've requested and paid for your Kapsi-credentials, none. Infra and OS are already in place. ** Installation Navigate to your www-directory: ~$ cd ~/siilo/sites/yoursite-siilo.kapsi.fi/www~ Download the latest install tarball, in my case 16.0.4: ~$ wget 'https://download.nextcloud.com/server/releases/nextcloud-16.0.4.tar.bz2'~ Extract it: ~$ tar xvfj nextcloud-16.0.4.tar.bz2~ - Open browser and go to https://yoursite-siilo.kapsi.fi/nextcloud/index.php/login - Choose whether to install into a sub-folder or to the root of www -directory (in that case just enter =.= (dot) for the installation path). - Create admin account by entering admin username and password. - Select =Storage & Database= section, select =MariaDB=. - Enter database. Usually the database name and the user is the same as the Kapsi username. The host address of Kapsi MySQL server is =db1.n.kapsi.fi=. If you do not have a personal password for database, you can ask for it from the Kapsi support. Database maintenance then happens at https://pakki.kapsi.fi/phpmyadmin/ ** Post-installation tasks *** Edit =.htaccess= - When connecting through https, the following error is shown in the admin panel: #+BEGIN_SRC bash The “Strict-Transport-Security” HTTP header is not configured to at least “15552000” seconds. #+END_SRC To do away with that, modify =.htaccess=: ~$ nano ~/siilo/sites/yoursite.siilo.kapsi.fi/www/nextcloud/.htaccess~ - Insert inside ==: #+BEGIN_SRC bash Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" #+END_SRC - +Allow access from different ip-addresses if accessing Nexcloud with+ +multiple clients. Inside == insert:+ #+BEGIN_SRC bash RewriteCond %{ENV:HTTPS} !on RewriteRule (.*) https://yoursite-siilo.kapsi.fi/$1 [R=301,L] #+END_SRC *Edit*: Above seems not to be needed anymore after Nextcloud version 16.0.1. - Last, append to the end of =.htaccess= a rule: #+BEGIN_SRC bash IndexIgnore * order allow,deny allow from all #+END_SRC *** Edit =.user.ini= - Otherwise error is thrown in =Settings - Overview:= #+BEGIN_SRC bash The PHP memory limit is below the recommended value of 512MB #+END_SRC - Error was found on [2019-05-17 Fri] after upgrade from 15.0.7 to version 16.0.1. This seems to be kapsi specific. - Fixed this on [2019-05-19 Sun] as per [[https://www.kapsi.fi/ohjeet/phpini.html][Kapsi's php.ini instructions]] by appending to =/nextcloud/.user.ini= the values: #+BEGIN_SRC bash post_max_size = 10000M upload_max_filesize = 10000M memory_limit = 512M #+END_SRC Same issue has been reported at [[https://github.com/nextcloud/server/issues/15609][Github's nextcloud project]]. *** Edit =config.php= - Append: #+BEGIN_SRC -n -r bash 'trashbin_retention_obligation' => '30, 60', (ref:trashbin) 'versions_retention_obligation' => '30, 180', (ref:versions) 'tempdirectory' => '/siilo/6/pyyhttu/sites/tmp', (ref:tempdirectory) 'simpleSignUpLink.shown' => false, (ref:signuplink) 'default_phone_region' => 'FI', (ref:phone) #+END_SRC Where, - [[(trashbin)][trashbin_retention_obligation]] controls when the deleted files are purged, - [[(versions)][versions_retention_obligation]] controls when the versioned files are purged. More information from [[https://www.reddit.com/r/NextCloud/comments/koqg7y/nextcloud_tech_tip_by_default_at_least_with_mine/][here]] and from [[https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=trashbin_retention_obligation][official documentation]]. - [[(tempdirectory)][tempdirectory]] defines custom, writable location for Nextcloud's temp-files. - [[(signuplink)][signuplink]] hides "register free account" link on shared links. - [[(phone)][default_phone_region]] to [[https://help.nextcloud.com/t/unavoidable-security-setup-warnings-with-nc-21-update/108667][avoid warning]] "Your installation has no default phone region set". *** Two-Factor Authentication - Login with your admin account to nextcloud and go to =Settings - Personal - Security=. - Generate the backup codes and store them somewhere safe. You need them if you lose your phone and access to TOTP. - Download and install to your phone a [[https://apps.apple.com/us/app/authenticator/id766157276][two-factor authenticator app]]. - Click ="Enable TOTP"=, scan with the phone installed app the displayed QR-code. - Input the code from phone and click =verify=. - Consider enabling the same for all user accounts for added security. *** Apps from phone After upgrade, go to Apps to check that the apps are still enabled. Some may have been marked with ="Enable untested app"= and needs to be enabled manually as the apps don't yet support the new nextcloud version. Current unofficial Apps installed: **** [[https://apps.nextcloud.com/apps/metadata][Metadata]] **** [[https://apps.nextcloud.com/apps/contacts][Contacts]] To setup the contact record synchronization from iOS client's Contacts app to Nextcloud via CardDAV, follow the [[https://docs.nextcloud.com/server/18/user_manual/pim/sync_ios.html#contacts][nextcloud docs]]. For Kapsi-specific settings I used these: Also change =Default Account= to =Nextcloud= in iOS at =Settings=, =Contacts=. This way when opening =Contacts= app, the master group for contacts is already Nextcloud (and not Exchange, local iPhone etc.). **** [[https://apps.nextcloud.com/apps/groupfolders][Group Folders]] Group folders are setup like so: #+CAPTION: Settings - Administration - Group folders | Folder name | Groups | Write/Share/Delete | |------------------+------------------+--------------------| | Family_shared | group_family | All | | Heidi_home | group_heidi | All | | Tuomas_home | group_tuomas | All | **** [[https://apps.nextcloud.com/apps/news][News]] Also edit cron so that News [[https://crontab.guru/#*/15_*_*_*_*]["at every 15th minute"]] polls the content from the feeds: ~$ crontab -e~ #+BEGIN_SRC bash # */15 * * * * php -f /home/users/pyyhttu/siilo/sites/yoursite.kapsi.fi/www/nextcloud/cron.php #+END_SRC Then [[https://github.com/nextcloud/news#sync-clients][install a client]] for your phone/desktop. **** [[https://apps.nextcloud.com/apps/unsplash][Unsplash]] **** [[https://apps.nextcloud.com/apps/camerarawpreviews][Camera Raw Previews]] **** [[https://apps.nextcloud.com/apps/extract][Extract]] **** [[https://apps.nextcloud.com/apps/files_rightclick][Right Click]] **** [[https://apps.nextcloud.com/apps/sharingpath][Sharing Path]] **** [[https://apps.nextcloud.com/apps/maps][Maps]] (Does not work yet with groupfolder photos due to [[https://github.com/nextcloud/maps/issues/123][bug 123]]. Photos' exif coordinates are scanned periodically by a background job. This will not apply to any past photos prior Maps installed, so to add those to map, run: ~$ php occ maps:scan-photos user_id~ *Note:* Upon inspecting results after this command fom Maps, the existing pictures disappear. Now waiting if they come back, or if I botched by database. Current official Apps disabled: [[https://github.com/nextcloud/recommendations/][Recommendations]] (disabled [[https://help.nextcloud.com/t/recently-edited-items-in-nextcloud-16/52280/6][to hide recently edited files]] from UI) **** [[https://apps.nextcloud.com/apps/apporder][AppOrder]] **** [[https://apps.nextcloud.com/apps/side_menu][Side menu]] **** [[https://apps.nextcloud.com/apps/phonetrack][PhoneTrack]] **** Memories Install with ~$ php occ app:install memories~, then run scan ~$ php occ memories:index~. See rest of the settings at =/settings/admin/memories=: EXIF Extraction Media Indexing File Support Photo Viewer Performance Recommended Apps Reverse Geocoding Video Streaming Transcoder HW Acceleration **** DONE Configure =File Support= for videos for previews to be visible in memories. If not, I'll see on video thumbnail empty placeholder and an error: =Video not configured. Run occ memories:video-setup= #+BEGIN_SRC $ php occ memories:video-setup This command will help you setup video streaming It will check if ffmpeg and ffprobe are installed and go-vod (the transcoder) works If you are running go-vod externally, feature detection will not work properly In that case you will need to manually adjust the configuration file (add --print-config) For details on hardware support: https://github.com/pulsejet/memories/wiki/HW-Transcoding Press enter to continue or CTRL+C to abort ffmpeg is installed ffprobe is installed Checking for go-vod binary Trying go-vod from /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/apps/memories/exiftool-bin/go-vod-amd64 go-vod is installed! You can use transcoding and HLS streaming This is recommended for better performance, but has implications if you are using external storage or run Nextcloud on a slow system. Read the following documentation carefully before continuing: https://github.com/pulsejet/memories/wiki/Configuration Do you want to enable transcoding and HLS? [Y/n] Y Starting ffmpeg feature detection This may take a while. Please be patient Downloading test video file ... OK Attempting to start go-vod ... OK go-vod logs will be stored at: /tmp/go-vod/ocg80o430zwr.log Testing transcoding with CPU ... FAIL CPU transcoding failed with error HTTP status: 404 Check the log file of go-vod for more details (/tmp/go-vod/ocg80o430zwr.log) Checking for VAAPI acceleration (/dev/dri/renderD128) ... NOT FOUND Checking for NVIDIA acceleration with NVENC Testing transcoding with NVENC (scale_npp) ... FAIL Testing transcoding with NVENC (scale_cuda) ... FAIL NVENC does not seem to be available Feature detection completed Transcoding and HLS are now enabled! Monitor the log file for any errors You should restart the server for changes to take effect #+END_SRC If needed to use =.nomedia= see this [[https://github.com/pulsejet/memories/issues/185][issue.]] **** [[https://apps.nextcloud.com/apps/previewgenerator][Preview Generator]] - After installed, run in =../nextcloud/=: ~$ php occ preview:generate-all -vvv~ - Once finished, add the crojob: ~$ crontab -e~ #+BEGIN_SRC bash */10 * * * * php /home/users/pyyhttu/siilo/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/occ preview:pre-generate -vvv~ #+END_SRC ***** NEXT Figure out how much disk space this takes, and where - And why mp3s are also indexed. - Study the article [[https://ownyourbits.com/2019/06/29/understanding-and-improving-nextcloud-previews/][Understanding and improving Nextcloud Previews]] for recommended settings. - Also study [[https://www.allerstorfer.at/nextcloud-install-preview-generator/][the alternative install instructions]]. - On [2023-08-08 Tue] noticed the logs contained a lot of errors: : sem_get(): Failed for key 0xa11: Permission denied at /var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Preview/Generator.php#272 Although the addon is disabled, the errors persisted so removed it altogether which stopped the errors. *** Settings - Login as an admin user, go to =Settings= (upper right corner). **** Personal Info - Language: =English (US)= - Locale: =English (Finland)= **** Security - TOTP (Authenticator app): =[✓] Enable TOTP= Remember to generate backup codes and store them somewhere safe. - Create new app passwords for devices and services that need it ([[https://www.reddit.com/r/NextCloud/comments/gnjt4r/nextcloud_system_monitor_for_iphone/][NextStats]] for iOS etc.) **** Sharing - Sharing Path: =[✓]= Enable Sharing Path **** Basic Settings - Email server - Send mode: =SMTP= - Encryption: =STARTTLS= - From address: =[your-handle]@kapsi.fi= - Authentication method: =None= =[✓]= Authentication required - Server address: =mail.kapsi.fi:587= - Credentials: =[your-handle]= =[your password]= *Edit:* =Send mode:= =SMTP= seems to write =config/config.php= with ='mail_smtppassword'= in plain text, which is not wanted. Luckily, =Send mode:= =Sendmail= does not require authentication, so configure Email server with that instead: - Send mode: =Sendmail= - Encryption: - From address: =[your-handle]@kapsi.fi= **** Theming - Random Background Images: =[✓]= Set random image as login background *** Other tweaks - Hide rich workspaces: Login as a non-admin user, go to =Settings= (lower left corner), uncheck =Show rich workspaces=. *** FOLLOWUP Security scan Running security scan at https://scan.nextcloud.com/ against hosting at Kapsi should give A. The only missing score is from =__Host-Prefix=, which is because I have nextcloud [[https://help.nextcloud.com/t/security---host-prefix-cookie-setting/9740/5][installed to a subdirectory]]. Observe also [[https://www.reddit.com/r/NextCloud/comments/llrjuw/all_those_having_a_security_scan_ratinghow_did_u/][this reddit thread]] and especially its linked Github issue for resolution. *** NEXT Reinstall Nextcloud to root of siilo to get the highest rating. ** Maintenance *** Backups **** NEXT investigate into backup strategy - Will eventually use the [[https://ecc-comp.blogspot.com/2020/07/backing-up-for-mortals.html][3-2-1 rule]] for backups, which will result in automatized, versioned backups. [[https://proton.me/blog/3-2-1-backup][3-2-1-backups]] explained. - For now, we run a manual rsync [[https://docs.nextcloud.com/server/15/admin_manual/maintenance/backup.html][for backup]]. First, put the server to maintenance mode: ~$ php occ maintenance:mode --on~ - Then config, data, themes and database are needed for complete nextcloud backup: ~$ rsync -avx config/ ../config-bak_`date +"%Y%m%d"`/~ ~$ rsync -avx data/ ../data-bak_`date +"%Y%m%d"`/~ ~$ rsync -avx themes/ ../themes-bak_`date +"%Y%m%d"`/~ ~$ mysqldump --single-transaction -h db1.n.kapsi.fi -u pyyhttu -p[password] pyyhttu > nextcloud-sql-bak_`date +"%Y%m%d"`.bak~ - Finally, remember to lift the maintenance mode off: ~$ php occ maintenance:mode --off~ **** NEXT Exlude images created by Preview Generator from backups - That is, location =..//nextcloud/data/appdata_ocg80o430zwr/preview=, which currently takes 78G (and counting). **** NEXT Investigate usage of NextBackup for DB-backups **** NEXT Investigate what is needed to [[https://www.reddit.com/r/selfhosted/comments/pq6ixl/backup_nextcloud_to_somewhere_else/hdac4qs/][backup contacts]] *** NEXT Install borgbackup on NAS pi and pull periodic backups from Kapsi to pi OpenMediaVault - Investigate how to complish: https://www.google.fi/search?sclient=psy-ab&site=&source=hp&q=nextcloud+backup+borg&=&=&oq=&pbx=1 - Also setup the borg script to backuo everything else from kapsi (highlander decks, debian notes etc.) *** Reindexing - When mass copying/moving files through ssh inside Nexcloud's directory structure, you need to issue a reindex command so that Nextcloud's DB indexes the copied/movied files and show them in its UI: ~$ cd ~/siilo/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/~ ~$ php occ files:scan --all~ *** Upgrading - New version is announced at [[https://nextcloud.com/blog/][Nextcloud blog]]. - When the next "dot-release" is announced, upgrade can be done usually right away. - When the next "major-release" is announced, it is not offered through stable update channels [[https://www.reddit.com/r/NextCloud/comments/j7cjn9/still_no_update_from_1902_to_12_in_the_updater/g83rx0s/?context=3][until the first dot release is out]]. More information at [[https://nextcloud.com/release-channels/][release channels]]. - Changelog of releases is available at [[https://nextcloud.com/changelog/][Nextcloud Server Changelog]]. - In any case, take backups prior upgrading since downgrading is [[https://www.reddit.com/r/NextCloud/comments/gywwtu/downgrade_from_19_to_1805/][not supported]]. - To upgrade to a new version, first inspect whether there are updates available for Apps. Update them from UI, or from command line by doing at =../nextcloud/=: ~$ php occ app:list~ ~$ php occ app:update ~ Then, review third-party apps (i.e. not Official), for their compatibility with the new Nextcloud major version. Before the upgrade, all 3rd party apps must be disabled manually. Disabling apps is not needed with =updater.phar= script as it disables apps automatically. After the upgrade has been completed, re-enable the supported apps that were disabled with their new versions one by one. - Run the whole upgrade from the [[https://docs.nextcloud.com/server/15/admin_manual/maintenance/update.html#using-the-command-line-based-updater][cmd line with updater.phar]] as the method avoids e.g. [[https://help.nextcloud.com/t/updater-app-runs-into-timeout/12891][php time-out errors]]. ~$ cd to /nextcloud/updater/~ ~$ php updater.phar~ #+BEGIN_SRC bash $ php updater.phar Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty Current version is 17.0.1. Update to Nextcloud 17.0.2 available. (channel: "stable") Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-17.0.2.zip Open changelog ↗ Steps that will be executed: [ ] Check for expected files [ ] Check for write permissions [ ] Create backup [ ] Downloading [ ] Verify integrity [ ] Extracting [ ] Enable maintenance mode [ ] Replace entry points [ ] Delete old files [ ] Move new files in place [ ] Done Start update? [y/N] #+END_SRC - Hit {{{kbd(Y)}}} to start the update: #+BEGIN_SRC bash Info: Pressing will finish the currently running step and then stops the updater. [✔] Check for expected files [✔] Check for write permissions [✔] Create backup [✔] Downloading [✔] Verify integrity [✔] Extracting [✔] Enable maintenance mode [✔] Replace entry points [✔] Delete old files [✔] Move new files in place [✔] Done Update of code successful. Should the "occ upgrade" command be executed? [Y/n] #+END_SRC - Hit {{{kbd(Y)}}} to start the upgrade. - Upgrade finishes with message: #+BEGIN_SRC bash Should the "occ upgrade" command be executed? [Y/n] Y Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade 2019-12-20T19:08:30+00:00 Set log level to debug 2019-12-20T19:08:30+00:00 Repair step: Repair MySQL collation 2019-12-20T19:08:30+00:00 Repair info: All tables already have the correct collation -> nothing to do 2019-12-20T19:08:30+00:00 Repair step: Repair SQLite autoincrement 2019-12-20T19:08:30+00:00 Repair step: Copy data from accounts table when migrating from ownCloud 2019-12-20T19:08:30+00:00 Repair step: Drop account terms table when migrating from ownCloud 2019-12-20T19:08:30+00:00 Updating database schema 2019-12-20T19:08:30+00:00 Updated database 2019-12-20T19:08:30+00:00 Updating ... 2019-12-20T19:08:30+00:00 Updated to 0.14.2 2019-12-20T19:08:31+00:00 Checking for update of app accessibility in appstore [...] Keep maintenance mode active? [y/N] #+END_SRC - Hit {{{kbd(N)}}}. - Upgrade has now finished. After the upgrade, do the "Post-installation tasks" again for =.htaccess= and =.user.ini=. The old, working files can be used to copy & paste the values from them in. The old files are at =nextcloud/data/updater-ocg80o430zwr/backups= [fn:1] - Navigate to login page and login. Go to =Settings - Logging= and check them for any errors. If none, upgrade has now been completed. [fn:2] ** Troubleshooting *** DONE Found on [2019-03-31 Sun] with version 14.0.3 - Error in =Settings - Overview:= #+BEGIN_SRC bash The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. #+END_SRC - Run in =nextcloud/= directory: ~$ php occ db:add-missing-indices~ ---------------------------------------------------------------------------------------------------- *** NEXT Found on [2019-03-31 Sun] with version 14.0.3 Large video file uploads with ios client loop and never complete with error "502 error" On server side the logging shows error: =Sabre-DAV-Exception: expected filesize 10240000 got 7217152= Maybe something to do with apache settings. See reports [[https://help.nextcloud.com/t/sabre-dav-exception-badrequest-expected-filesize-10485760-got-2554891/51338/23][1]], [[https://github.com/nextcloud/server/issues/14884#issuecomment-483856168][2]], [[https://github.com/nextcloud/android/issues/4005][3]] and [[https://github.com/nextcloud/server/issues/15095][4]]. ---------------------------------------------------------------------------------------------------- *** DONE Found on [2019-03-31 Sun] with version 14.0.3 #+BEGIN_SRC bash Your web server is not properly set up to resolve "/.well-known/caldav". #+END_SRC - This is actually wanted behaviour if nextcloud is installed in a subdirectory, see [[https://github.com/nextcloud/server/issues/12572#issuecomment-440822490][issue 12572]] and especially comment in [[https://github.com/nextcloud/server/issues/11787#issuecomment-429239543][issue 11787]]. So to remedy this, I should install on shared hosting the nextcloud not to a subdirectory, but to root. *Update:* After updating from =20.0.11= to =21.0.3= I now get two new entries: #+BEGIN_SRC bash Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation. Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation. #+END_SRC I assume, that above finding of installing nextcloud to root fixes also warnings with webfinger and nodeinfo. ---------------------------------------------------------------------------------------------------- **** DONE Unclear still is, does carddav/caldav not work on kapsi, because of shared hosting? - Tested. It works still. **** NEXT Reinstall Nextcloud to root of siilo to avoid the error *** NEXT Found on [2019-03-31 Sun] with version 14.0.3 #+BEGIN_SRC bash No memory cache has been configured. To enhance performance, please configure a memcache, if available. #+END_SRC - As per [[https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html][caching documentation]] there are three memory caching options for data (APCu, Redis and Memcached). But Kapsi doesn't seem to to have any of those php modules installed. I can confirm this by doing ~$ php -m~. For more informationa see [[https://help.nextcloud.com/t/nc13-memcache-oc-memcache-apcu-not-available-for-local-cache/31027][help topic 31027]] and [[https://help.nextcloud.com/t/memcache-how-to-enable/2651/4][2651]]. **** NEXT Ask Kapsi to enable caching, as no response in [[https://ukk.kapsi.fi/questions/652/nextcloudin-optimointi][this thread yet]]. ----- *** DONE Found on [2019-03-31 Sun] with version 14.0.3 #+BEGIN_SRC bash Your web server is not properly set up to resolve "/ocm-provider/" in Settings, append to .htaccess: #+END_SRC Check [[https://help.nextcloud.com/t/your-web-server-is-not-properly-set-up-to-resolve-ocm-provider/48530/13][issue 48530]]. Edit [2019-04-07 Thu]: See last comment there, probably a bug, should go away in coming releases. Yes, fixed with version 15.0.6. Edit [2023-10-07 Sat]: Reappeared when updating from 27.1.1. to 27.1.2. but was fixed manually in =.htaccess= with [[https://github.com/nextcloud/server/issues/40794#issuecomment-1751031727][this.]] ----- *** DONE Found on 7.4.2019 with version 15.0.7 #+BEGIN_SRC bash Web based upgrade fails e.g. with "Parsing response failed. Step 6 is currently in process. #+END_SRC Or, #+BEGIN_SRC bash Can't handle ZIP file. Error code is: 28". #+END_SRC - This may be because of [[https://docs.nextcloud.com/server/15/admin_manual/maintenance/manual_upgrade.html#troubleshootin][PHP time outs]]. - To fix this, stop the upgrade process and finish it manually. First: force refresh the login page to bypass the cache ({{{kbd(Ctrl)}}}-{{{kbd(F5)}}} in Firefox) and login to the upgraded Nextcloud instance. ----- *** FOLLOWUP Found on [2019-04-07 Sun] with version 15.0.7 #+BEGIN_SRC bash MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this. #+END_SRC - Follow-up in issue [[https://help.nextcloud.com/t/innodb-file-format-from-antelope-to-barracuda/51102][51102]]. ----- *** NEXT Found on [2019-04-07 Sun] with version 15.0.7 Getting a php error: #+BEGIN_SRC bash Error: include(): Failed opening '/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/composer/composer/../../../lib/public/DB/QueryBuilder/IQueryFunction.php' for inclusion (include_path='/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/apps/news/vendor/pear/net_url2:/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/pear/archive_tar:/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/pear/console_getopt:/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/pear/pear_exception:/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/apps') at /var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/composer/composer/ClassLoader.php#444 #+END_SRC Similar error reported [[https://help.nextcloud.com/t/after-updating-to-nextcloud-14-0-4-php-fatal-error-ieventlogger-interface-missing/42458][here]]. Fix: if this is caused by a broken upgrade, this error should go away with a complete reinstall. ----- *** DONE Found on [2019-05-17 Fri] after upgrade from 15.0.7 to version 16.0.1 #+BEGIN_SRC bash Some files have not passed the integrity check. #+END_SRC - Delete the obsolete files, then move manually into place the original files from [[https://download.nextcloud.com/server/releases/][the installation package]]. ----- *** DONE Found on [2019-09-26 Thu] during upgrade from 16.0.4 to 16.0.5 - After invoking upgrade with ~$ php updater.phar~ an error is invoked after 2 hours in step 9, Delete old files: #+BEGIN_SRC bash ...client_loop: send disconnect: Connection reset by peer. #+END_SRC - Error was invoked after running ~$ php updater.phar~, and updater had been running for exceptionally long, 2 hours. Especially the "Create backup" took a lot of time. Resolved this by deleting =/nextcloud/data/updater-ocg80o430zwr/.step= and then rerunning ~$ php updater.phar~. Error was most probably due to lost ssh tunnel connection. Next time, I may want to run updated.phar in screen and monitor if this happens again. ----- *** DONE Found on [2019-09-28 Sat] after upgrade from 16.0.4 to 16.0.5 - When accessing the News, I got instead error page: #+BEGIN_SRC bash Internal Server Error The server was unable to complete your request. If this happens again, please send the technical details below to the server administrator. More details can be found in the server log. Technical details Remote Address: 88.115.55.164 Request ID: XY@LO38AAQEAAHwgoMYAAAGg #+END_SRC - This seemed to be an intermittent issue, as clearing the browser cache and force reloading (shift-f5) the page helped. ----- *** DONE Found on [2019-09-28 Sat] after upgrade from 16.0.4 to 16.0.5 - When trying to delete the access token under security (TOTP enabled), I get: #+BEGIN_SRC bash Error while deleting the token. #+END_SRC - Probably this bug: https://github.com/nextcloud/server/issues/17164 - *Edit:* This has been fixed in 17.0.0 ----- *** DONE Found on [2019-09-28 Sat] after upgrade from 16.0.4 to 16.0.5 - iOS client and News app in iOS do not seem update the server side. - iOS client constantly requires to login. Similar bug reported at: https://help.nextcloud.com/t/ios-app-2-24-0-continually-prompts-for-login/60952 and, https://help.nextcloud.com/t/cant-connect-to-nextcloud-server-from-my-ipad/60401 - Common nominator may be reverse proxy setup at kapsi and .htaccess. Should I try the reverse proxy commands from github link here: https://ukk.kapsi.fi/questions/768/djangon-asennusohjeet *Edit*: [2019-02-10 Wed]: This may have been Nextcloud issue all along, as going from 16.0.5 to 17.0.0 fixed the issue. In detail: 1. Enabled beta channel in Nextcloud Settings. 2. Executed ~$ php updated.phar~ 3. Installer failed after ~2 hours again on error message: #+BEGIN_SRC bash client_loop: send disconnect: Connection reset by peer #+END_SRC 4. Deleted =.step= file and reran ~$ php updated.phar~ 5. Script finished, upgrade finished. 6. Did post-installation tasks. ----- *** DONE Found on [2019-12-20 Fri] after upgrade from 17.0.1 to 17.0.2 #+BEGIN_SRC bash Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this. mounts.storage_id mounts.root_id mounts.mount_id #+END_SRC As per [[https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/bigint_identifiers.html][documentation on BigInt (64bit) identifiers]] we in =../nextcloud= do the following: 1. Put maintenance mode on with ~$ php occ maintenance:mode --on~ 2. Run ~$ php occ db:convert-filecache-bigint~ 3. Once finished, put maintenance mode back off with ~$ php occ maintenance:mode --off~ ----- *** FOLLOWUP Found on [2020-08-26 Wed] with version 18.0.7 Local desktop client's Nextcloud directory structure disappeared. Same was observed in Nextcloud mobile client on iOS. Following three errors in server's frontend logs at =Settings=, =Logging= were observed: #+BEGIN_SRC bash Error: Class 'OCA\GroupFolders\BackgroundJob\ExpireGroupVersions' not found OCP\AppFramework\QueryException: Could not resolve appFolder! Class appFolder does not exist OCP\AppFramework\QueryException: Could not resolve OCA\GroupFolders\ACL\RuleManager! Class OCA\GroupFolders\ACL\UserMapping\IUserMappingManager does not exist #+END_SRC Checked next the installed addons: ~$ php occ app:list~ #+BEGIN_SRC bash Enabled: - accessibility: 1.4.0 - activity: 2.11.0 - apporder: 0.10.0 - bookmarks: 3.3.4 - bruteforcesettings: 1.6.0 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - contacts: 3.3.0 - dav: 1.14.0 - federatedfilesharing: 1.8.0 - federation: 1.8.0 - files: 1.13.1 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - maps: 0.1.6 - metadata: 0.12.0 - news: 14.1.11 - nextcloud_announcements: 1.7.0 - notifications: 2.6.0 - oauth2: 1.6.0 - password_policy: 1.8.0 - phonetrack: 0.6.4 - photos: 1.0.0 - privacy: 1.2.0 - provisioning_api: 1.8.0 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - sharingpath: 0.2.5 - side_menu: 1.8.5 - support: 1.1.1 - survey_client: 1.6.0 - systemtags: 1.8.0 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - twofactor_totp: 4.1.3 - unsplash: 1.1.6 - updatenotification: 1.8.0 - viewer: 1.2.0 - workflowengine: 2.0.0 Disabled: - admin_audit - camerarawpreviews - encryption - extract - files_external - groupfolders - recommendations - user_ldap #+END_SRC - For some reason, groupfolders addon was disabled. - By re-enabling the addon, then rebuilding on local desktop client the directory structure, the files were restored. Synchronization functionality on mobile client was restored automatically. *Edit [2021-01-10 Sun]*: This has been happening more regularly now. Similar to [[https://github.com/nextcloud/groupfolders/issues/1152][issue 1152]]. ----- *** DONE Found on [2020-08-27 Thu] after upgrade from 18.0.8 to version 19.0.2 Following error observed at =Settings=, =Overview=: #+BEGIN_SRC bash The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running "occ db:add-missing-columns" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability. #+END_SRC Fixed by running in =../nextcloud/=: ~$ php occ db:add-missing-columns~ ----- *** FOLLOWUP Found on [2020-09-05 Sat] with version 19.0.2 - Enabled app Preview Generator and ran ~$ php occ preview:generate-all -vvv~ as recommended and documented in app's README.md. - This operation lasted for 24h and resulted in 90GB of files at =../nextcloud/data/appdata_ocg80o430zwr/preview/=. - After this logs started to show errors as: ~Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158~ - Above error can be triggered when I try to delete a photo. - There is potential fix at [[https://github.com/nextcloud/server/pull/22008][#22008]] but will be merged in at earlies in Nextcloud 20 milestone (but backported to earlier release then). - Follow up #22008 at [[https://nextcloud.com/changelog/][server changelogs]] and observe if the errors are mitigated after update. If not, then: - Run again ~$ php occ files:scan --all~ to rectify if ~preview:generate-all~ initially did [[https://help.nextcloud.com/t/solved-nextcloud-16-0-7-17-0-2-php-cron-php-out-of-memory/67556/2][corrupt]] my database. - Then rerun Preview Generator, but this time not for every preview, but with "Recommended configuration" as [[https://github.com/rullzer/previewgenerator/issues/202#issuecomment-675634035][instructed here]]. ----- *** DONE Found on [2020-10-02 Fri] with version 19.0.3 When accessing the login page, I get an error: ~We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds.~ I also see that both iOS apps News and Nextcloud sync client do not finish their syncs. - [[https://help.nextcloud.com/t/error-message-on-login-screen/40692][The error]] is caused by multiple requests coming from my IP, triggering [[https://apps.nextcloud.com/apps/bruteforcesettings][Brute-force settings]] to throttle the login attempts. - Solution: Go to =/settings/admin/security/= and define under =Brute-force IP whitelist= your IP. - After this error is no longer displayed on login page, and sync clients work. ----- *** NEXT To resolve News module's error code: "Non UTF-8 charset for MySQL/MariaDB database detected!" - https://docs.nextcloud.com/server/15/admin_manual/configuration_database/mysql_4byte_support.html Edit: Following requires at least MariaDB 10.3, however, according to phpmyadmin, I'm only at Server version: 10.0.37-MariaDB-0+deb8u1 - (Debian) *Note:* do below again with fresh install when kapsi upgrades Debian to Buster. MariaDB 10.3. should then be available. *Note* : Seems to be available now as doing: ~$ mysql -V~ =mysql Ver 15.1 Distrib 10.3.18-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2= However, phpMyAdmin still shows v. 10.0.38 as well as by doing ~$ mysql -u pyyhttu -p pyyhttu~ #+BEGIN_SRC bash Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 81186655 Server version: 10.0.38-MariaDB-0+deb8u1 (Debian) #+END_SRC *Edit [2021-01-17 Sun]*: Now both ~$ myswl -V~ and ~$ mysql -u pyyhttu -p pyyhttu~ show version 10.3.27. Following from: https://github.com/nextcloud/nextcloud-snap/issues/369#issuecomment-337257286 ~mysql --user=pyyhttu --password pyyhttu ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;~ ~$ php occ config:system:set mysql.utf8mb4 --type boolean --value="true"~ ~$ php occ maintenance:repair~ ----- *** DONE Found on [2020-11-04 Wed] with version 19.0.3 - When trying to update the apps from webui, I get an error: ~An error occured during the request. Unable to proceed.~ - Upgraded via command line instead, as recommended by [[https://github.com/nextcloud/documentserver_community/issues/168][issue 168]]. ----- *** DONE Found on [2020-12-06 Sun] during upgrade from 19.0.5 to version 20.0.2 - Upgrade failed on upgrading the news addon: #+BEGIN_SRC bash 2020-12-06T18:50:23+00:00 Update app news from appstore An unhandled exception has been thrown: Error: Undefined class constant 'DEFAULT_SETTINGS' in /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/apps/news/lib/Migration/MigrateConfig.php:49 Stack trace: #0 [internal function]: OCA\News\Migration\MigrateConfig->__construct(Object(OCA\News\Config\LegacyConfig), Object(OC\AllConfig), Object(OCA\News\AppInfo\Application)) #1 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): ReflectionClass->newInstanceArgs(Array) #2 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass)) #3 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\News\\Migrat...') #4 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(455): OC\AppFramework\Utility\SimpleContainer->query('OCA\\News\\Migrat...') #5 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/ServerContainer.php(140): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\News\\Migrat...') #6 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Repair.php(119): OC\ServerContainer->query('OCA\\News\\Migrat...') #7 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_App.php(1035): OC\Repair->addStep('OCA\\News\\Migrat...') #8 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_App.php(979): OC_App::executeRepairSteps('news', Array) #9 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Installer.php(206): OC_App::updateApp('news') #10 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Updater.php(452): OC\Installer->updateAppstoreApp('news') #11 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Updater.php(260): OC\Updater->upgradeAppStoreApps(Array) #12 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Updater.php(130): OC\Updater->doUpgrade('20.0.2.2', '19.0.5.2') #13 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/Command/Upgrade.php(255): OC\Updater->upgrade() #14 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/console.php(100): OC\Console\Application->run() #20 /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/occ(11): require_once('/siilo/6/pyyhtt...') #21 {main} Keep maintenance mode active? [y/N] N Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled #+END_SRC - This was then fixed by continuing upgrade manually: ~$ php occ upgrade~ #+BEGIN_SRC bash Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Updating database schema Updated database Updating ... Updated to 15.0.6 Checking for update of app accessibility in appstore Checked for update of app "accessibility" in appstore Checking for update of app activity in appstore Checked for update of app "activity" in appstore Checking for update of app admin_audit in appstore Checked for update of app "admin_audit" in appstore Checking for update of app apporder in appstore Checked for update of app "apporder" in appstore Checking for update of app bookmarks in appstore Checked for update of app "bookmarks" in appstore Checking for update of app bruteforcesettings in appstore Checked for update of app "bruteforcesettings" in appstore Checking for update of app cloud_federation_api in appstore Checked for update of app "cloud_federation_api" in appstore Checking for update of app comments in appstore Checked for update of app "comments" in appstore Checking for update of app contacts in appstore Checked for update of app "contacts" in appstore Checking for update of app contactsinteraction in appstore Checked for update of app "contactsinteraction" in appstore Checking for update of app dav in appstore Checked for update of app "dav" in appstore Checking for update of app federatedfilesharing in appstore Checked for update of app "federatedfilesharing" in appstore Checking for update of app federation in appstore Checked for update of app "federation" in appstore Checking for update of app files in appstore Checked for update of app "files" in appstore Checking for update of app files_pdfviewer in appstore Checked for update of app "files_pdfviewer" in appstore Checking for update of app files_rightclick in appstore Checked for update of app "files_rightclick" in appstore Checking for update of app files_sharing in appstore Checked for update of app "files_sharing" in appstore Checking for update of app files_trashbin in appstore Checked for update of app "files_trashbin" in appstore Checking for update of app files_versions in appstore Checked for update of app "files_versions" in appstore Checking for update of app files_videoplayer in appstore Checked for update of app "files_videoplayer" in appstore Checking for update of app logreader in appstore Checked for update of app "logreader" in appstore Checking for update of app lookup_server_connector in appstore Checked for update of app "lookup_server_connector" in appstore Checking for update of app news in appstore Checked for update of app "news" in appstore Checking for update of app nextcloud_announcements in appstore Checked for update of app "nextcloud_announcements" in appstore Checking for update of app notifications in appstore Checked for update of app "notifications" in appstore Checking for update of app oauth2 in appstore Checked for update of app "oauth2" in appstore Checking for update of app password_policy in appstore Checked for update of app "password_policy" in appstore Checking for update of app photos in appstore Checked for update of app "photos" in appstore Checking for update of app privacy in appstore Checked for update of app "privacy" in appstore Checking for update of app provisioning_api in appstore Checked for update of app "provisioning_api" in appstore Checking for update of app serverinfo in appstore Checked for update of app "serverinfo" in appstore Checking for update of app settings in appstore Checked for update of app "settings" in appstore Checking for update of app sharebymail in appstore Checked for update of app "sharebymail" in appstore Checking for update of app support in appstore Checked for update of app "support" in appstore Checking for update of app systemtags in appstore Checked for update of app "systemtags" in appstore Checking for update of app text in appstore Checked for update of app "text" in appstore Checking for update of app theming in appstore Checked for update of app "theming" in appstore Checking for update of app twofactor_backupcodes in appstore Checked for update of app "twofactor_backupcodes" in appstore Checking for update of app twofactor_totp in appstore Checked for update of app "twofactor_totp" in appstore Checking for update of app unsplash in appstore Checked for update of app "unsplash" in appstore Checking for update of app updatenotification in appstore Checked for update of app "updatenotification" in appstore Checking for update of app viewer in appstore Checked for update of app "viewer" in appstore Checking for update of app workflowengine in appstore Checked for update of app "workflowengine" in appstore Starting code integrity check... Finished code integrity check Update successful Turned off maintenance mode Resetting log level #+END_SRC However, after the upgrade news addon is still generating errors in logs, namely this PHP error: #+BEGIN_SRC bash Error: mkdir(): Permission denied at /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/apps/news/lib/AppInfo/Application.php#104 #+END_SRC - Opening the issue at [[https://github.com/nextcloud/news/issues/1020][News app Github]] suggested to use ='tempdirectory'= to override the default =/tmp= where Nextcloud stores temporary files. - So edited =../nextcloud/config/config.php= and appended: #+BEGIN_SRC bash 'tempdirectory' => '/siilo/6/pyyhttu/sites/tmp' #+END_SRC - After above config change, the error was no longer visible. ----- *** DONE Found on [2020-12-25 Fri] with version 20.0.4 - Noticed in the morning that iOS News client had stopped updating and further investigating showed that whole instance was offline. After navigating to login page there was an error: #+BEGIN_SRC bash 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. #+END_SRC - However, no updates were set to run in past 24h. In fact, latest update was completed on [2020-12-17 Thu] without issues. - Doing at =/nextcloud/= ~$ touch CAN_INSTALL~ results in login page to update the message, this time offering a new installation, which is unwanted. - Noticed that =/nextcloud/config/config.php= had been getting modified on [2020-12-26 Sat], and the contents of it resembled nothing of a like normal =config.php=: #+BEGIN_SRC bash 'my-instance-id', ); #+END_SRC - I had my last update backups at =/nextcloud/data/updater-ocg80o430zwr/backups/nextcloud-20.0.3.2-1608203646/= - So returning the backup by doing ~$ cp ../nextcloud/data/updater-ocg80o430zwr/backups/nextcloud-20.0.3.2-1608203646/config/config.php ../nextcloud/config/config.php~ and then force reloading {{{kbd(Ctrl)}}}-{{{kbd(F5)}}} in browser the login page triggers an update from =20.0.3= to =20.0.4=: - ~$ cd ../nextcloud/updater/~ - ~$ php updater.phar~ *Update:* This happened again on [2021-01-06 Wed] at 03:11 AM and [2021-01-08 Fri] at 08:13. This time decided to look at the =nextcloud.log=. There's a mention of "stale file handle": #+BEGIN_SRC bash {"reqId":"6yDSxPtiyjMXGbR1ocbP","level":0,"time":"2021-01-06T01:11:03+00:00","remoteAddr":"91.154.145.230","user":"Tuomas","app":"files_sharing","method":"PROPFIND","url":"/nextcloud/index.php/apps/files/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":"20.0.4.0"} {"reqId":"6yDSxPtiyjMXGbR1ocbP","level":0,"time":"2021-01-06T01:11:03+00:00","remoteAddr":"91.154.145.230","user":"Tuomas","app":"twofactor_totp","method":"PROPFIND","url":"/nextcloud/index.php/apps/files/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":"20.0.4.0"} {"reqId":"6yDSxPtiyjMXGbR1ocbP","level":0,"time":"2021-01-06T01:11:03+00:00","remoteAddr":"91.154.145.230","user":"Tuomas","app":"unsplash","method":"PROPFIND","url":"/nextcloud/index.php/apps/files/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":"20.0.4.0"} {"reqId":"qV4yIynPEe1s7oufG5PS","level":2,"time":"2021-01-06T01:11:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"qV4yIynPEe1s7oufG5PS","level":2,"time":"2021-01-06T01:11:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"NyHajtXXg9kcHFdla8zA","level":2,"time":"2021-01-06T01:12:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"NyHajtXXg9kcHFdla8zA","level":2,"time":"2021-01-06T01:12:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"nYzN09Zfth4E5wmXE23K","level":2,"time":"2021-01-06T01:12:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"nYzN09Zfth4E5wmXE23K","level":2,"time":"2021-01-06T01:12:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"JZfsM4k17exqpdfecdRn","level":2,"time":"2021-01-06T01:13:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"JZfsM4k17exqpdfecdRn","level":2,"time":"2021-01-06T01:13:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"1bnAvm28rsVZkhMMHYX2","level":2,"time":"2021-01-06T01:13:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"1bnAvm28rsVZkhMMHYX2","level":2,"time":"2021-01-06T01:13:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"3DKFhRiM7MkulJ7nXY1C","level":2,"time":"2021-01-06T01:13:48+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/index.php/csrftoken","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","version":""} {"reqId":"3DKFhRiM7MkulJ7nXY1C","level":2,"time":"2021-01-06T01:13:48+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/index.php/csrftoken","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","version":""} {"reqId":"u3itDNmIzWHY4mt2HiDm","level":2,"time":"2021-01-06T01:14:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"u3itDNmIzWHY4mt2HiDm","level":2,"time":"2021-01-06T01:14:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"HkZtZuRY0Uf9pop9ofAx","level":2,"time":"2021-01-06T01:14:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"HkZtZuRY0Uf9pop9ofAx","level":2,"time":"2021-01-06T01:14:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"nNa4XrfMDfeikuQVGrkM","level":2,"time":"2021-01-06T01:15:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"nNa4XrfMDfeikuQVGrkM","level":2,"time":"2021-01-06T01:15:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"nXNRwwQd1fIXmpvmKZXu","level":3,"time":"2021-01-06T01:15:08+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php","line":653,"function":"checkInstalled","class":"OC","type":"::","args":[]},{"file":"/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php","line":1091,"function":"init","class":"OC","type":"::","args":[]},{"file":"/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/cron.php","line":42,"args":["/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php","Line":283,"CustomMessage":"--"},"userAgent":"--","version":""} {"reqId":"YQlJFieaI6HsB2ZQCUB2","level":2,"time":"2021-01-06T01:16:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"YQlJFieaI6HsB2ZQCUB2","level":2,"time":"2021-01-06T01:16:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"SQm4Tbe9rqRyXdywbW8P","level":2,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"SQm4Tbe9rqRyXdywbW8P","level":2,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"SQm4Tbe9rqRyXdywbW8P","level":3,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"PHP","method":"PROPFIND","url":"/nextcloud/index.php","message":{"Exception":"Error","Message":"scandir(/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/l10n/): failed to open dir: Stale file handle at /var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php#295","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":295,"function":"scandir"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":410,"function":"findAvailableLanguages","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":197,"function":"getLanguageFromRequest","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Util.php","line":632,"function":"findLanguage","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":115,"function":"addTranslations","class":"OC_Util","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":78,"function":"initTemplateEngine","class":"OC_Template","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":269,"function":"__construct","class":"OC_Template","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/Controller/SetupController.php","line":91,"function":"printGuestPage","class":"OC_Template","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/Controller/SetupController.php","line":69,"function":"displaySetupForbidden","class":"OC\\Core\\Controller\\SetupController","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php","line":946,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"SQm4Tbe9rqRyXdywbW8P","level":3,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"PHP","method":"PROPFIND","url":"/nextcloud/index.php","message":{"Exception":"Error","Message":"scandir(): (errno 116): Stale file handle at /var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php#295","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":295,"function":"scandir"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":410,"function":"findAvailableLanguages","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/L10N/Factory.php","line":197,"function":"getLanguageFromRequest","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Util.php","line":632,"function":"findLanguage","class":"OC\\L10N\\Factory","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":115,"function":"addTranslations","class":"OC_Util","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":78,"function":"initTemplateEngine","class":"OC_Template","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/legacy/OC_Template.php","line":269,"function":"__construct","class":"OC_Template","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/Controller/SetupController.php","line":91,"function":"printGuestPage","class":"OC_Template","type":"::"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/core/Controller/SetupController.php","line":69,"function":"displaySetupForbidden","class":"OC\\Core\\Controller\\SetupController","type":"->"},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/base.php","line":946,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"XRLR9fqcjAwqxcctOSr4","level":2,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"XRLR9fqcjAwqxcctOSr4","level":2,"time":"2021-01-06T01:16:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"6GHzz6ryUknPeOtXtmiX","level":2,"time":"2021-01-06T01:17:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"6GHzz6ryUknPeOtXtmiX","level":2,"time":"2021-01-06T01:17:02+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} {"reqId":"fys9tImFq1apHOUvsrS2","level":2,"time":"2021-01-06T01:17:32+00:00","remoteAddr":"91.154.145.230","user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""} #+END_SRC ----- *** DONE Creating backup during upgrade fails Running ~$ php updater.phar~ gave: #+BEGIN_SRC bash Start update? [y/N] y Info: Pressing Ctrl-C will finish the currently running step and then stops the updater. [✔] Check for expected files [✔] Check for write permissions [ ] Create backup ...PHP Warning: copy(/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/data/updater-ocg80o430zwr/backups/nextcloud-22.2.1.2-1639213625/lib/public/Search/SearchResult.php): failed to open stream: Disk quota exceeded in phar:///siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/updater/updater.phar/lib/Updater.php on line 395 [✘] Create backup failed Could not copy "/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/lib/public/Search/SearchResult.php" to "/siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/data/updater-ocg80o430zwr/backups/nextcloud-22.2.1.2-1639213625/lib/public/Search/SearchResult.php". Destination /siilo/6/pyyhttu/sites/pyyhttu-siilo.kapsi.fi/www/nextcloud/data/updater-ocg80o430zwr/backups/nextcloud-22.2.1.2-1639213625/lib/public/Search/SearchResult.php is not writable Update failed. To resume or retry just execute the updater again. #+END_SRC Reason was the disk space for which I had exceeded the given quota. This can be checked with ~$ quota -s~. More disk space can be requested from Kapsi admins. ----- *** DONE Found on [2022-02-17 Thu] after upgrade from 23.0.0 to version 23.0.2. Warning in =Settings - Overview:= #+BEGIN_SRC bash The PHP OPcache module is not properly configured: The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply opcache.interned_strings_buffer to your PHP configuration with a value higher than 8. #+END_SRC Googling this out, gives plenty of results: [[https://github.com/nextcloud/server/issues/31223][The OPcache interned strings buffer is nearly full #31223]] [[https://github.com/nextcloud/all-in-one/issues/192][adjust opcache settings #192]] [[https://github.com/nextcloud/docker/issues/1692][ PHP OPcache module is not properly configured: OPcache interned strings buffer is nearly full #1692]] Also troubleshooted this and [[https://github.com/nextcloud/all-in-one/issues/192#issuecomment-1053652741][contributed with a question.]] Update [2023-01-24 Tue]: This was resolved after and upgrade to version 25.0.1. ----- *** NEXT Entry will not be accessible due to incompatible encoding #+BEGIN_SRC bash $ php occ files:scan --all Starting scan for user 1 out of 4 (Alvaro) Starting scan for user 2 out of 4 (Heidi) Starting scan for user 3 out of 4 (pyyhttu) Starting scan for user 4 out of 4 (Tuomas) Entry "files/Photos/1997/06/Video_1997-06-15_Tuomas\ Rippi\ ja\ yo.mp4" will not be accessible due to incompatible encoding +---------+--------+--------------+ | Folders | Files | Elapsed time | +---------+--------+--------------+ | 8881 | 138082 | 00:14:57 | +---------+--------+--------------+ #+END_SRC ----- *** DONE Found on [2024-02-17 Sat] after upgrade from 28.0.1 to version 28.0.2. Warning in =Settings - Overview:= #+BEGIN_SRC bash Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks. #+END_SRC Warning documented [[https://docs.nextcloud.com/server/28/admin_manual/configuration_server/background_jobs_configuration.html][here]] and [[https://help.nextcloud.com/t/nextcloud-server-has-no-maintenance-window-start-time-configured-error/180556/4][here]]. So warning resolved by adding ='maintenance_window_start' => 23,= (maintenance then starts daily 23 UTC = 01 EET onward in some random 4h window). ----- *** DONE Found on [2024-02-17 Sat] after upgrade from 28.0.1 to version 28.0.2. Warning in =Settings - Overview:= #+BEGIN_SRC bash This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them: bz2. #+END_SRC Turns out this module is [[https://help.nextcloud.com/t/docker-image-setup-warning-missing-bz2-after-update-to-nc-28-0-0/176605][not needed after all]], so it will be removed in the next point release. ----- *** DONE Found on [2024-02-17 Sat] after upgrade from 28.0.1 to version 28.0.2. Error in =Settings - Logging:= #+BEGIN_SRC bash Could not load log entries #+END_SRC Verified by [[https://github.com/nextcloud/logreader/issues/1058][disabling ublock origin]]. Some of the blocklists caused the logging window entries to be falsely blocked, so resolved by adding to ublock's Trusted sites my Nextcloud domain as whitelisted. ----- *** DONE Found on [2024-02-17 Sat] after upgrade from 28.0.1 to version 28.0.2. Noticed in =Settings - Personal info:= The time under Locale field is s off by 2 hours. Also the logs are off by 2 hours with local time display option set. This is caused by Nextcloud [[https://help.nextcloud.com/t/time-of-nextcloud-instance-not-correct/53096/4][relying on browser]] telling the time, and gets this through fingerprinting. However, I don't want to turn in =about:config= the =privacy.resistFingerprinting= to =false=, so I add my Nextcloud domain to =privacy.resistFingerprinting.exemptedDomains= instead, which gets the job done too. ----- ** Observations and future direction *** NEXT Move nextcloud installation to https://pyyhttu-siilo.kapsi.fi/ - As this is a major change, do this after the offsite backups have been setup and taken with borg. *** NEXT Custom domain If I ever want to run nextcloud from custom domain, then see [[https://www.reddit.com/r/NextCloud/comments/w7yrly/custom_domain_with_nextcloud/][this]]. *** NEXT Layout customization - Google =gallery.cnf= what is possible in terms of presentation and sorting. *** NEXT Large file uploads - Enable large file uploads (study Manual p.41), also: https://docs.nextcloud.com/server/15/admin_manual/configuration_files/big_file_upload_configuration.html - Also see: https://www.reddit.com/r/NextCloud/comments/w4b9w1/uploading_large_files_from_ios_does_not_work/ - *** DONE Investigate on enabling encryption - Check [[https://www.netways.de/blog/2017/07/19/how-to-use-nextcloud-cli/][this blog for background.]] Ensure that data is backed up and then after enabling encryption, test nextcloud phone app that it works while encryption is enabled. Note: Encryption as of 14.0.3 is very Alpha quality. Retain from implementing until it is more mature. - Edit [2020-08-24 Mon]: Much [[https://help.nextcloud.com/t/help-test-the-latest-version-of-e2ee/87590][more mature]] now but still [[https://www.reddit.com/r/NextCloud/comments/ihkv0b/nextcloud_providers_and_end_to_end_encryption/][beta quality]]. - Encryption key on server are located in =../data= directory, that's why [[https://www.reddit.com/r/NextCloud/comments/ihixqo/nextcloud_backups/g30w04h/?context=3][server side encryption for local data is pointless]]. The encryption Nextcloud comes now with,is more for remote storage: #+BEGIN_QUOTE If your Nextcloud server is not connected to any remote storage services, then it is better to use some other form of encryption such as file-level or whole disk encryption. Because the keys are kept on your Nextcloud server, it is possible for your Nextcloud admin to snoop in your files, and if the server is compromised the intruder may get access to your files. Source: [[https://docs.nextcloud.com/server/stable/user_manual/en/files/encrypting_files.html][Nextcloud's encryption documentation]] #+END_QUOTE Different [[https://www.reddit.com/r/NextCloud/comments/jnzihi/noob_question_https_serverside_encryption_and_e2ee/][encryption methods explained]]. - EndtoEnd encryption is a no-go due to the [[https://nextcloud.com/endtoend/][documented feature loss]]. A better choice is full disk encryption on home hosted server. Reconsider this when upgrading home NAS. *** NEXT Research Cryptomator compatibility with NextCloud - Investigate especially if there's any [[https://help.nextcloud.com/t/nextcloud-client-side-encryption-with-cryptomator-feature-request/13323/6][feature]] loss if [[https://apps.apple.com/us/app/cryptomator/id953086535][iOS app]] is combined with iOS Nextcloud app. Google also cryptomator + nextcloud to see if there are problems with Nextcloud synchronization. *** DONE Nextcloud iOS client settings #+ATTR_HTML: :title More - Settings :style float:left;margin:0px 50px 50px 50px; #+ATTR_HTML: :width 35% :height 35% [[file:Photo_2023-06-04_2153.png]] #+ATTR_HTML: :title More - Settings - Advanced :style float:left;margin:0px 0px 50px 50px; #+ATTR_HTML: :width 35% :height 35% [[file:Photo_2023-06-04_2152.png]] #+ATTR_HTML: :title More - Settings - Auto upload :style float:left;margin:0px 50px 50px 50px; #+ATTR_HTML: :width 35% :height 35% [[file:Photo_2023-06-04_2154.png]] #+ATTR_HTML: :title More - Settings - Auto upload #+ATTR_HTML: :style float:left #+ATTR_HTML: :margin:0px 0px 50px 50px; #+ATTR_HTML: :width 35% :height 35% [[file:Photo_2023-06-04_2155.png]] # #+ATTR_HTML: :title More - Settings - Auto uplo :style float left # #+ATTR_HTML: :width 35% :height 35% # [[file:Photo_2023-06-04_2156.png]] # - Go to: =More - Settings - Advanced=. Toggle: # - =Show hidden files=: =No= (Otherwise files outside =Photos= are pulled, # like CD covers from music directory etc.) # - =Most Compatible=: =No= (May require Camera RAW Previews to support =heic=). # - =Live Photo=: =Yes= (May require Camera RAW Previews to support =heic=). See [[https://www.reddit.com/r/NextCloud/comments/wsvfrn/camera_raw_previews_thank_you/][this.]] # - =Remove from camera roll=: =Yes= (This will delete the photos from phone # *after successful* photo upload to Nextcloud. Handy as establishes master # photo location to NextCloud). # - Leave other settings to their defaults. # # - Go to: =More - Settings - Auto upload=. Toggle: # - =Auto upload photos/videos=: =Yes= # - =Select the "Auto upload" folder=: =Photos= # - =Auto upload photos=: =Yes= # - =Auto upload videos=: =Yes= # - =Use subfolders=: =Yes= # # - Go to: =Change file name mask=. Toggle: # - =Specify type in filename=: =Yes= # - =Filename=: =_YYYY-MM-DD_= # # - Go back to =Settings - Auto upload=. Toggle: # - =Upload the whole camera roll=: =Yes= # # - Go to: =Media= and press the "three dots", press =Select the "Media" # folder= and select "Photos". This will ensure Media view is not cluttered # with anything else than photos. *** NEXT Beorg iOS app settings For beorg to sync over WebDAV to kapsi host, configure beorg settings like so: Sync method: =WebDAV= Folder: =/Documents/Orgzly/= [[https://docs.nextcloud.com/server/latest/user_manual/en/files/access_webdav.html][WebDAV URL]]: =https://YOURSITE-siilo.kapsi.fi/nextcloud/remote.php/dav/files/USERNAME/= Username: USERNAME Password: PASSWORD - If you need to troubleshoot beorg sync issues over WebDAV to Kapsi, enable logging in beorg with [[https://appsonthemove.freshdesk.com/support/discussions/topics/14000012952][=(log-contents)=]]. - write/screenshot documentation on ios client settings - Also document how to disable blank readme.md creation: https://www.reddit.com/r/NextCloud/comments/fq4q8m/disable_blank_readmemd_creation/ *** DONE Beorg init.org config Create this file in beorg, as per instructions [[https://beorgapp.com/learning/initorg/][here.]] #+BEGIN_SRC scheme ,* UI #+BEGIN_SRC scheme (set! ui-start-tab "files" "Start tab.") (defvar ui-swap-item-swipe-direction #f "Whether the swipe direction on items in the agenda or TODO tab should be swapped. If #t then swiping left-to-right will show state change options rather than editing the item in the outliner.") (set! show-notes-tab #f "Disable notes tab presented in v. 3.17 if having subdirectories enabled.") (set! filter-include-default #t "Whether or not the built-in TODO filters should be shown") (set! org-priorities '("A" "B" "C") "Priorities") (filter-add "ÔØù´©ÅTop Priority TODO" (lambda (item) (and (string=? (item-priority item) "A") (string=? (item-state item) "NEXT") (not (member "ARCHIVE" (item-tags item))) ))) ,#+END_SRC ,* Subdirectories, todo-states, disable delete #+BEGIN_SRC scheme (set! sync-subfolders #t "Subfolders support as per https://appsonthemove.freshdesk.com/support/discussions/topics/14000016681") (set! org-todo-action-keywords '("NEXT" "FOLLOWUP") "Todo states.") (set! org-todo-done-keywords '("DONE") "Done states.") (set! file-disable-delete #f "If set to #t then the option to delete files won't be available in beorg.") ,#+END_SRC ,* Item Editor Quick Actions #+BEGIN_SRC scheme (define (my/schedule-for-today) (set-current-item-scheduled! (current-date))) (define (my/schedule-todo-for-today) (begin (set-current-item-scheduled! (current-date)) (set-current-item-state! "NEXT"))) (define (add-location-to-current-item) (location-get-lat-lon (lambda (lat lon) (set-current-item-property! "location" (string-append lat "," lon))))) (define (make-current-item-top-priority-today) (begin (set-current-item-scheduled! (current-date)) (set-current-item-priority! "A"))) (define (schedule-current-item-for-tomorrow) (set-current-item-scheduled! (date-adjust (current-date) 1 'days))) (define (my/schedule-todo-for-tomorrow) (begin (set-current-item-scheduled! (date-adjust (current-date) 1 'days)) (set-current-item-state! "NEXT"))) (define (remove-all-dates-from-current-item) (begin (delete-current-item-scheduled!) (delete-current-item-deadline!) (delete-current-item-active-date!))) (defvar item-editor-menu '(("Assign current location" (add-location-to-current-item)) ("Make top priority today" (make-current-item-top-priority-today)) ("Schedule TODO for today" (my/schedule-todo-for-today)) ("Schedule for today" (my/schedule-for-today)) ("Schedule TODO for tomorrow" (my/schedule-todo-for-tomorrow)) ("Schedule for tomorrow" (schedule-current-item-for-tomorrow)) ("Remove all dates" (remove-all-dates-from-current-item))) "The items defined here can be run directly from the item editor screen to make quick adjustments.") ,#+END_SRC ,* Editor Toolbar Items #+BEGIN_SRC scheme (set! beorg-add-newline-between-headlines #t "https://appsonthemove.freshdesk.com/support/discussions/topics/14000015618") (defvar editor-toolbar-items '( ("icon-time" (insert (date->string (current-date) "<~Y-~m-~d ~a ~H:~M>"))) ("icon-list" (insert "+ ")) ("icon-todolist" (insert "+ [ ] ")) ("icon-change" (show-transform-commands)) ("icon-tools" (show-tools-commands)) ("icon-settings" (insert-code-snippet))) "A list of buttons to show above the keyboard when editing notes. The list is a list of lists stating the button text and the code to run. For example '(("icon-left" (backward-char)) ("icon-right" (forward-char))) defines a toolbar with the buttons < and > which respectively execute the functions backward-char and forward-char.") ,#+END_SRC #+END_SRC *** DONE Beorg with Working Copy Git client Notes can be version controlled in iOS with Working Copy Git client. It is a [[https://www.reddit.com/r/orgmode/comments/hxqn9t/comment/fz8wezi/?utm_source=share&utm_medium=mweb3x&utm_name=mweb3xcss&utm_term=1&utm_content=share_button][bit pricey]] but you can setup a synchronized directory against your Github repository. Here are [[https://www.reddit.com/r/emacs/comments/10nih0o/comment/j6bleo3/?utm_source=share&utm_medium=mweb3x&utm_name=mweb3xcss&utm_term=1&utm_content=share_button][the settings]] to use it with. *** NEXT Address certain apps (group folders) crashes - If needed, reinstall whole nextcloud *** NEXT Monit to Kapsi - Inbox: "Re: [TN#660857] Lakka asennuspyyntö: [...]", April 25th 2021 - To bounce crashed apps based on =nextcloud.log=. ** NEXT Google Photoprims or Librephotos, to be installed along Nextcloud in shared hosting - [[https://www.reddit.com/r/NextCloud/comments/kkibwf/les_pas_your_photo_album_for_nextcloud/gh43pu0/?context=3][Seems to be possible]], at least with Photoprism, but they have paid subscription model in mind. - Would make it possible to have syncing of nextcloud and managing/tagging in photoprism? - It seems that Photoprism can be pointed to my Nextcloud photos directory. ** NEXT Check that previews are enabled in =config.php= - See [[https://www.reddit.com/r/NextCloud/comments/r8oijz/comment/hn763ct/?context=3][this reddit thread.]] ** NEXT Enable HEIC support. - See [[https://lemmy.ca/post/11181857][this.]] * Footnotes [fn:1] Do not copy and replace the files from backups as this will mess with nextcloud's versioning. Rather, diff the files and manually append to the upgraded files the changes from the backups. [fn:2] Warnings are OK. In case of errors during upgrade, check the two logs from =nextcloud/data=: =nextcloud.log= and =updater.log=.