<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Just for Fun (Posts about Nextcloud)</title><link>https://devel.grys.it/</link><description></description><atom:link href="https://devel.grys.it/categories/nextcloud.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:gian@grys.it"&gt;mgian&lt;/a&gt; </copyright><lastBuildDate>Fri, 11 Oct 2024 22:07:01 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Nextcloud take 2</title><link>https://devel.grys.it/posts/nextcloud-take-2/</link><dc:creator>mgian</dc:creator><description>&lt;p&gt;After some months (and tanks to some random people on Internet), I decided to give Nextcloud another chance... Well, not really.&lt;/p&gt;
&lt;p&gt;Back in February, I got sick of the problems I had upgrading Nextcloud which nearly destroyed my server. A server that as also some 
public sites I am running.&lt;/p&gt;
&lt;p&gt;After dropping Nextcloud, I still had the problem of synchronize the files on 3 PC (2 Linux and 1 windows) and a phone, so I tried out Syncthing. It was a good enough solution but I found it miss something, expecially in the configuration aspect. Maybe I set up it wrong, but I had to duplicate a bunch of locations to make it work.&lt;/p&gt;
&lt;p&gt;Anyway, talking to someone, I got the suggestion to use Nextcloud in a Docker container that should make it easy to integrate in a system with other complex software. Fine, let's try it.&lt;/p&gt;
&lt;p&gt;Good point: the installation were smooth enough. Even with the basic image and commands, Nextcloud was up and running in no time. &lt;br&gt;
Bad point: the default image is bugged. It work well with a browser, but if you want a desktop client, it does not work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The error&lt;/strong&gt;
The error you get, aside a warning in the web browser, while trying to login with a Desktop client (or mobile app) is:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The polling URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;which is  what ?&lt;/p&gt;
&lt;p&gt;After some digging, I found out that the cause is a missing option in the &lt;em&gt;config.php&lt;/em&gt; file, more precisely (at lease in my case)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;'overwriteprotocol' =&amp;gt; 'https',&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;Ok, simple enough to fix... or that is what I was thinking... I was wrong by a long shot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;
Simple, my Nextcloud was running inside a docker container and I am no expert in Docker. So, while I know it is possible, I have no idea how to change the docker-compose rules to either&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;allow to extract a file to the host machine&lt;/li&gt;
&lt;li&gt;include the option in the build process&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;
After some failed attempts, I solved this in the least optimal solution but hey, it worked.&lt;/p&gt;
&lt;p&gt;This is the set of commands I used. With &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;docker ps -a
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I got the id of the container, then with &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="nv"&gt;cf084d19db4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"head -46 config/config.php &amp;gt; config/test.php"&lt;/span&gt;
&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="nv"&gt;cf084d19db4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"echo \'overwriteprotocol\' =\&amp;gt; \'https\', &amp;gt;&amp;gt; config/test.php"&lt;/span&gt;
&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bb241e2e020b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"echo \)\; &amp;gt;&amp;gt; config/test.php"&lt;/span&gt;
&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bb241e2e020b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cat config/test.php"&lt;/span&gt;
&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bb241e2e020b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cp config/config.php config/config.php.orig"&lt;/span&gt;
&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bb241e2e020b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cp config/test.php config/config.php "&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I added the line to the a copy of the file and finally  &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;docker-compose stop &amp;amp;&amp;amp; docker-compose up -d
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to restart the container without building it.&lt;/p&gt;
&lt;p&gt;In the end it worked and I am now able to login with the desktop clients and mobile app.&lt;/p&gt;</description><category>Nextcloud</category><guid>https://devel.grys.it/posts/nextcloud-take-2/</guid><pubDate>Sun, 10 Apr 2022 23:26:51 GMT</pubDate></item><item><title>Leaving Nextcloud</title><link>https://devel.grys.it/posts/leaving-nextcloud/</link><dc:creator>mgian</dc:creator><description>&lt;p&gt;After many years of use, I finally say the last goodbye to Nextcloud, the self hosted solution
I used to sync my calendar, files and little more.&lt;/p&gt;
&lt;p&gt;I was using Nextcloud from before the fork from Owncloud, so I can say it was a long ride, but in the end the conclusion arrived.&lt;/p&gt;
&lt;p&gt;Why to change ? Well, basically because I am sick and tired to fight with its update process. At the beginning I was using a custom installation and the update was a pain. Then I switched to use the package provided by &lt;a href="https://www.archlinux.org"&gt;Archlinux&lt;/a&gt; but the problems were not solved.&lt;/p&gt;
&lt;p&gt;The biggest one is that PHP 8.x was non supported for a couple of major release (21 and 22 IIRC) and since the server also hosted some public sites, it became increasly harder to keep update the system &lt;em&gt;and&lt;/em&gt; Nextcloud. In the end I was locked to an old 21.x release. &lt;br&gt;
But as the new release come out, I realise it will became harder the more I wait to upgrade. So I removed the lock on the Nextcloud package in the pacman.conf file and run an update, after all what can go wrong ? Well, everything.&lt;/p&gt;
&lt;p&gt;Not only you cannot upgrade from more than 1 major release back (for example, 21.x-&amp;gt;22.x and not 21.x-&amp;gt;23.x), which I can somewhat understand, but even the upgrade process is broken, so after upgrading from 21.x to 22.x and from 22.x to 23.x, I ended up in and endless loop of "this app need to be upgraded"/launch the upgrade process/success/redirect back to step 1.&lt;br&gt;
Not what a user (even an advanced one) want.  &lt;/p&gt;
&lt;p&gt;After a lot of work and attempts, which nearly cost me all the Wordpress installations, I finally give up and decided get it out of the way. &lt;br&gt;
BTW, I don't really understand how every Open Source project tends to became a nightmare to use if not on the developer's machine (yes, akonady, I am also looking at you) once it became a little more complex. Or better, I get that it is a lot more fun to add new features, but come on, a software should be usable even from the average user, especially in a default configuration.&lt;/p&gt;
&lt;p&gt;Anyway, with Nextcloud out the game I still need to have a way to sync my calendars and the files, but what to use ? &lt;br&gt;
My requirements are failry simple: sync the files from the phone and a couple of PC, one of which is dualboot Linux/Win and just keep track of my calendars.&lt;/p&gt;
&lt;p&gt;Sooo, enter &lt;a href="https://radicale.org/v3.html"&gt;Radicale&lt;/a&gt; and &lt;a href="https://syncthing.net/"&gt;Synchthing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://radicale.org/v3.html"&gt;Radicale&lt;/a&gt; is a CalDav/CardDav server to allow to sync calendars and contacts.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://syncthing.net/"&gt;Synchthing&lt;/a&gt; is a file synchronization server/client that allow you to keep one or more directories on different systems synched. It has also and Android app.&lt;/p&gt;
&lt;p&gt;Both of them are pretty simple to set up and pretty fast, the only downside is that there is not a "real" web interface to access the data (but there is one to configure them), which can be a problem with the calendar &lt;em&gt;if&lt;/em&gt; you need to add something without using your phone (well, it can be an idea for a little desktop app) or some other already configured software.&lt;/p&gt;</description><category>Nextcloud</category><category>Radicale</category><category>Synchthing</category><guid>https://devel.grys.it/posts/leaving-nextcloud/</guid><pubDate>Tue, 01 Feb 2022 20:34:00 GMT</pubDate></item></channel></rss>