{"id":556,"date":"2023-08-10T10:22:07","date_gmt":"2023-08-10T16:22:07","guid":{"rendered":"https:\/\/www.scottharvanek.com\/?p=556"},"modified":"2023-08-10T10:22:07","modified_gmt":"2023-08-10T16:22:07","slug":"truenas-core-nextcloud-23-0-2-plugin-update-27-0-2","status":"publish","type":"post","link":"https:\/\/www.scottharvanek.com\/?p=556","title":{"rendered":"TrueNAS Core Nextcloud 23.0.2 Plugin update -> 27.0.2"},"content":{"rendered":"\n<p>A nextcloud plugin in a TrueNAS Core system that hadn&#8217;t been updated is well, a problem.  If you update the Plugin it will go straight to Nextcloud 27 which well you can&#8217;t do an update like that.  So here&#8217;s what we did.<\/p>\n\n\n\n<p>Update to the latest version of 23 in the web browser and proceed with this until you get to version 25.  You will notice that you cannot get past here if you&#8217;re on a Jail running 12.2 because it has PHP74 installed by default with the original Nextcloud package.<\/p>\n\n\n\n<p>After this point you have to install PHP 8.  But doing so will try and remove nextcloud-php74 package which would remove Nextcloud of course and kinda make the whole thing pointless so, we need to force that to remain installed while we gut PHP and reinstall PHP 8.<\/p>\n\n\n\n<p><strong>Lock the nextcloud package, we don&#8217;t want to remove it.<\/strong><\/p>\n\n\n\n<p><code>pkg lock nextcloud-php74<\/code><\/p>\n\n\n\n<p><strong>Install PHP80<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pkg install php80-bcmath php80-bz2 php80-ctype php80-curl php80-dom php80-exif php80-fileinfo php80-filter php80-gd php80-gmp php80-iconv php80-intl php80-ldap php80-mbstring php80-opcache php80-pcntl php80-pcntl php80-pdo_mysql php80-pecl-APCu php80-pecl-imagick php80-pecl-redis php80-posix php80-session php80-simplexml php80-xmlreader php80-xmlwriter php80-xsl php80-zip php80-zlib<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Restart FPM to reload the web UI:<br><\/strong>\/usr\/local\/etc\/rc.d\/php-fpm restart<\/p>\n\n\n\n<p><strong>Perform the update through to v27 from the Web UI.<\/strong><\/p>\n\n\n\n<p><strong>Update the plugin in TrueNAS Core once the web UI update completes<\/strong>. <strong>THIS WILL FAIL.<\/strong><\/p>\n\n\n\n<p><strong>Once it fails, log back into the console and manually uninstall\/install the following:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pkg unlock nextcloud-php74\npkg remove nextcloud-php74-23.0.2\npkg install nextcloud-php80 nginx mysql80-server redis php80-pecl-redis wget rsync\n\n<\/code><\/pre>\n\n\n\n<p><strong>Now, the included nextcloud version is 27.0.0 and we&#8217;re already above that and downgrading is not supported so, we need to pull the archive from nextcloud and copy over our install;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/root\/scratch\ncd \/root\/scratch\nwget https:\/\/download.nextcloud.com\/server\/releases\/latest.tar.bz2\ntar -xjvf latest.tar.bz2\nrsync -avz \/root\/scratch\/nextcloud\/ \/usr\/local\/www\/nextcloud\/\n\n<\/code><\/pre>\n\n\n\n<p><strong>Now we need to fix some permission:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/loca\/www\nchown www:www nextcloud\ncd nextcloud\nchown -R www:www .htaccess .user.ini 3rdparty\/ apps AUTHORS config\/ console.php COPYING core\/ cron.php dist\/ index.html index.php lib\/ occ ocm-provider\/ ocs* public.php remote.php resources\/ robots.txt status.php themes\/ updater\/ version.php<\/code><\/pre>\n\n\n\n<p><strong>Now start redis and mysql and, restart fpm;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/etc\/rc.d\/redis start\n\/usr\/local\/etc\/rc.d\/mysql-server start\n\/usr\/local\/etc\/rc.d\/php-fpm restart\n<\/code><\/pre>\n\n\n\n<p>All done, easy right? LOL.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A nextcloud plugin in a TrueNAS Core system that hadn&#8217;t been updated is well, a problem. If you update the Plugin it will go straight to Nextcloud 27 which well you can&#8217;t do an update like that. So here&#8217;s what &hellip; <a href=\"https:\/\/www.scottharvanek.com\/?p=556\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,46,1,8],"tags":[],"class_list":["post-556","post","type-post","status-publish","format-standard","hentry","category-asinine","category-code","category-opensource","category-random"],"_links":{"self":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts\/556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=556"}],"version-history":[{"count":1,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts\/556\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts\/556\/revisions\/557"}],"wp:attachment":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}