<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bajic Dusko</title>
    <description>The latest articles on DEV Community by Bajic Dusko (@bajicdusko).</description>
    <link>https://dev.to/bajicdusko</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F24400%2F6ef374a2-6e1f-4518-a05d-dad89196323f.jpg</url>
      <title>DEV Community: Bajic Dusko</title>
      <link>https://dev.to/bajicdusko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bajicdusko"/>
    <language>en</language>
    <item>
      <title>Setting up Nextcloud as alternative to Google services</title>
      <dc:creator>Bajic Dusko</dc:creator>
      <pubDate>Thu, 18 Jun 2020 13:48:32 +0000</pubDate>
      <link>https://dev.to/bajicdusko/setting-up-nextcloud-as-alternative-to-google-services-2i5p</link>
      <guid>https://dev.to/bajicdusko/setting-up-nextcloud-as-alternative-to-google-services-2i5p</guid>
      <description>&lt;p&gt;This is a second post in a row in &lt;a href="https://dusko.dev/posts/2020/06/moving-away-from-google-services"&gt;Moving away from Google services&lt;/a&gt; series. With the intention of replacing Google Drive, I have decided to try out a &lt;a href="https://nextcloud.com/"&gt;Nextcloud&lt;/a&gt; self-hosted solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nextcloud
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It can replace storage feature Google Drive offers.&lt;/li&gt;
&lt;li&gt;It can upload mobile photos automatically, which replaces Google Photos.&lt;/li&gt;
&lt;li&gt;You can install it on your home machine.&lt;/li&gt;
&lt;li&gt;You can install many different applications inside Nextcloud, such as

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://apps.nextcloud.com/apps/carnet"&gt;Carnet&lt;/a&gt; to replace Keep Notes from Google.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apps.nextcloud.com/apps/calendar"&gt;Calendar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apps.nextcloud.com/apps/contacts"&gt;Contacts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apps.nextcloud.com/apps/tasks"&gt;Tasks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apps.nextcloud.com/apps/mail"&gt;Mail&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;You can link external storage via SFTP or SMB&lt;/li&gt;
&lt;li&gt;Via WebDAV it syncs calendar events and tasks.&lt;/li&gt;
&lt;li&gt;Office documents management.&lt;/li&gt;
&lt;li&gt;Support for adding users, family management and its photos synchronization as well.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, it supports wide range of features I consume from Google every day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Private or "almost private"
&lt;/h2&gt;

&lt;p&gt;If we're running a private cloud, then it should be hosted on a machine we physically have control of. I don't have a spare machine to run it on, so I've decded to purchase a smallest and cheapest VPS I could find. &lt;a href="https://www.time4vps.com/"&gt;Time4VPS&lt;/a&gt; is great service with very acceptable prices. I've purchased&lt;br&gt;
Linux 2 package for 4 Eur per month. It offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single core CPU on 2.6GHz&lt;/li&gt;
&lt;li&gt;2GB of RAM&lt;/li&gt;
&lt;li&gt;20GB SSD storage&lt;/li&gt;
&lt;li&gt;Linux distribution of choice. I've decided to install Ubuntu Server 18.04.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;It's worth mentioning that I've tried installing Nextcloud on Raspberry 3 Model B at home. While the installation was successful and Nextcloud was running, unfortunatelly, Raspberry 3 have 1GB of RAM only, which isn't enough to host Raspbian, Nextcloud and MariaDB server, as MariaDB alone eats ~600MB.&lt;br&gt;&lt;br&gt;
It's important though, that if you have a Raspberry 4 at hand with at least 2GB RAM, you can install Nextcloud on Raspbian without issues. It'll work.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I have decided to go with VPS option due to my Raspberry performance issues. It's almost private solution, as mu virtual machine is somewhere in Lithuania.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Nextcloud
&lt;/h2&gt;

&lt;p&gt;Whether you choose to purchase a VPS or go with home setup, this guide assumes Debian based operating system in the background.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install dependencies
&lt;/h3&gt;

&lt;p&gt;Nextcloud is a PHP application running on MySQL database by default. Therefore we have to install its dependencies first:&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo apt install apache2 mariadb-server libapache2-mod-php&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo apt install php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Download and unpack Nextcloud
&lt;/h3&gt;

&lt;p&gt;Navigate to &lt;code&gt;/var/www/&lt;/code&gt; directory. You can find latest Nextcloud version &lt;a href="https://nextcloud.com/install/#instructions-server"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo wget https://download.nextcloud.com/server/releases/nextcloud-19.0.0.zip&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Extract downloaded package&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo unzip nextcloud-19.9.9.zip&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Make sure that directory structure looks like this: &lt;code&gt;/var/www/nextcloud/&lt;/code&gt; with the nextcloud contents inside.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Prepare database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Execute &lt;code&gt;sudo mysql&lt;/code&gt; to enter MySQL CLI.&lt;/li&gt;
&lt;li&gt;Create nextcloud user: &lt;code&gt;CREATE USER 'nextcloud' IDENTIFIED BY 'nextcloud';&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create nextcloud database: &lt;code&gt;CREATE DATABASE nextcloud;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Wire these two by adding permissions:
&lt;code&gt;GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@localhost IDENTIFIED BY ‘nextcloud’;&lt;/code&gt;
and then flush'em
&lt;code&gt;FLUSH PRIVILEGES;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Quit MySQL CLI: &lt;code&gt;quit&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Configure Apache
&lt;/h3&gt;

&lt;h4&gt;
  
  
  User permissions
&lt;/h4&gt;

&lt;p&gt;Our web server is Apache and user it creates is named &lt;code&gt;www-data&lt;/code&gt;. Therefore, we have to allow this user to access to nextcloud directory so that Apache can serve its contents. While you're in &lt;code&gt;/var/www&lt;/code&gt; directory, execute these commands:&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo chmod 750 nextcloud -R&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo chown www-data:www-data nextcloud -R&lt;/code&gt;  &lt;/p&gt;

&lt;h4&gt;
  
  
  Configure Nextcloud
&lt;/h4&gt;

&lt;p&gt;Navigate further to &lt;code&gt;/var/www/nextcloud/config&lt;/code&gt; and open &lt;code&gt;config.php&lt;/code&gt; file. This file contains basic configuration of Nextcloud setup and should be customized to fit our needs. I had a couple of push-n-pulls with this configuration until I make it correct.&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo nano config.php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the example of my configuration:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
    $CONFIG = array (
    'passwordsalt' =&amp;gt; 'some_salt',
    'secret' =&amp;gt; 'some_secret',
    'trusted_domains' =&amp;gt; 
    array (
        0 =&amp;gt; 'nextcloud.dusko.dev',
    ),
    'datadirectory' =&amp;gt; '/home/dusko/nextcloud_data',
    'check_data_directory_permissions' =&amp;gt; false,
    'dbtype' =&amp;gt; 'mysql',
    'version' =&amp;gt; '18.0.3.0',
    'dbname' =&amp;gt; 'nextcloud',
    'dbhost' =&amp;gt; 'localhost',
    'dbport' =&amp;gt; '',
    'dbtableprefix' =&amp;gt; 'oc_',
    'dbuser' =&amp;gt; 'nextcloud',
    'dbpassword' =&amp;gt; 'some_password',
    'installed' =&amp;gt; true,
    'instanceid' =&amp;gt; 'ocgn1qo2r675',
    'overwrite.cli.url' =&amp;gt; 'https://nextcloud.dusko.dev',
    'htaccess.RewriteBase' =&amp;gt; '/',
    'preview_max_y' =&amp;gt; '1024',
    'preview_max_x' =&amp;gt; '1024',
    'jpeg_quality' =&amp;gt; '60',
    'maintenance' =&amp;gt; false,
    'twofactor_enforced' =&amp;gt; 'true',
    'twofactor_enforced_groups' =&amp;gt; 
    array (
    ),
    'twofactor_enforced_excluded_groups' =&amp;gt; 
    array (
    ),
    'has_rebuilt_cache' =&amp;gt; true,
    );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note on some of these properties:&lt;br&gt;&lt;br&gt;
    - &lt;code&gt;trusted_domain&lt;/code&gt; has to be set properly, if you're serving Nextcloud via your domain. In my case it's a CNAME pointing to VPS.&lt;br&gt;&lt;br&gt;
    - I was forced to set &lt;code&gt;check_data_directory_permissions&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; as the data directory I set to be used is shared between multiple users, + the path I've set is a soft-link and I had a hard time setting this up properly. Easiest way of going around was to set it to &lt;code&gt;false&lt;/code&gt; and never look back.&lt;br&gt;&lt;br&gt;
    - &lt;code&gt;preview_max_x&lt;/code&gt; and &lt;code&gt;preview_max_y&lt;/code&gt; is related to thumbnails. There is a detailed thumbnails explanation in &lt;a href="https://dusko.dev/posts/2020/06/nextcloud-honest-review"&gt;Nextcloud: Honest review&lt;/a&gt; post. I have literally lost whole week on setting this up and I'm still suspicious if it works properly.&lt;/p&gt;

&lt;h4&gt;
  
  
  Enable Nextcloud
&lt;/h4&gt;

&lt;p&gt;To make Nextcloud available on webserver, we have to play with Apache a bit. First, let's configure nextcloud virtual host.&lt;br&gt;&lt;br&gt;
Open &lt;code&gt;nextcloud.conf&lt;/code&gt; from &lt;code&gt;sites_available&lt;/code&gt; directory:&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo nano /etc/apache2/sites-available/nextcloud.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of my configuration which includes &lt;code&gt;Alias&lt;/code&gt; and subdomain with &lt;code&gt;SSL&lt;/code&gt; setup. Alias is just a showcase as you might want to serve nextcloud on &lt;code&gt;example.com/nextcloud&lt;/code&gt;. In my case that's not feasable and I went with subdomain setup.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Alias /nextcloud "/var/www/nextcloud/"

&amp;lt;Directory /var/www/nextcloud/&amp;gt;
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        &amp;lt;IfModule mod_dav.c&amp;gt;
                Dav off
        &amp;lt;/IfModule&amp;gt;

&amp;lt;/Directory&amp;gt;
&amp;lt;IfModule mod_ssl.c&amp;gt;

    &amp;lt;VirtualHost nextcloud.dusko.dev:443&amp;gt;

        ServerAdmin my_email.com
        ServerName nextcloud.dusko.dev

        DocumentRoot /var/www/nextcloud

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile      /etc/ssl/certs/dusko.dev.pem
        SSLCertificateKeyFile   /etc/ssl/private/dusko.dev.key.pem

        &amp;lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&amp;gt;
            SSLOptions +StdEnvVars
        &amp;lt;/FilesMatch&amp;gt;
        &amp;lt;Directory /usr/lib/cgi-bin&amp;gt;
            SSLOptions +StdEnvVars
        &amp;lt;/Directory&amp;gt;
    &amp;lt;/VirtualHost&amp;gt;
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now we just have to enable the site and open it. Execute these two commands:&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo a2ensite nextcloud&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo a2enmod rewrite headers env dir mime&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open the domain you've set and you should be greeted with Nextcloud config page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--64B9RHiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-19-nextcloud-welcome-page.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--64B9RHiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-19-nextcloud-welcome-page.jpg" alt="Nextcloud config page" width="311" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon logging in, you can install necessary applications and go through Settings section, to restrict access and tighten up the security a bit.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Mobile app
&lt;/h3&gt;

&lt;p&gt;By installing Nextcloud on private server and setting up everything correctly, next step is to connect the mobile application to our Nextcloud instance. As I have the Android device only, I've tested and used Android version only.&lt;/p&gt;

&lt;p&gt;Go to PlayStore, and &lt;a href="https://play.google.com/store/apps/details?id=com.nextcloud.client"&gt;download the app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On the first run, you'll be prompted to enter server url and credentials. Once you pass that, you should be able to see the files and setup Auto-Upload feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QXUPdeCh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-19-nextcloud-mobile-app.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QXUPdeCh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-19-nextcloud-mobile-app.jpg" alt="Nextcloud mobile app" width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mobile application is highly troubling product at the moment. It's review is part of &lt;a href="https://dusko.dev/posts/2020/06/nextcloud-honest-review"&gt;Nextcloud: Honest review&lt;/a&gt; as well. Make sure to go through that post before you decide whether to install the Nextcloud or not.&lt;/p&gt;

&lt;p&gt;This post is originally posted on: &lt;a href="https://dusko.dev/posts/2020/06/nextcloud-alternative-to-google-services/"&gt;dusko.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>google</category>
      <category>privacy</category>
      <category>cloud</category>
      <category>nextcloud</category>
    </item>
    <item>
      <title>Nextcloud: Honest review</title>
      <dc:creator>Bajic Dusko</dc:creator>
      <pubDate>Thu, 18 Jun 2020 13:17:33 +0000</pubDate>
      <link>https://dev.to/bajicdusko/nextcloud-honest-review-56pd</link>
      <guid>https://dev.to/bajicdusko/nextcloud-honest-review-56pd</guid>
      <description>&lt;p&gt;You have probably went through short tutorial on how to setup Nextcloud in your private environment. If you haven't, make sure to check &lt;a href="https://dusko.dev/posts/2020/06/nextcloud-alternative-to-google-services"&gt;Setting up Nextcloud as alternative to Google Drive&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;I am using Nextcloud for 4 weeks already, and this is my review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Nextcloud setup
&lt;/h2&gt;

&lt;p&gt;In post install process, we have to go through the process of setting up some Nextcloud features of interest. First I've moved to security and turned on 2FA, by installing &lt;a href="https://apps.nextcloud.com/apps/twofactor_totp"&gt;TOTP Provider&lt;/a&gt; application. You can go one step further and play with IP geo-blocking and brute-force IP blocking. So far I haven't made any of these settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S6UgfE0j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-totp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S6UgfE0j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-totp.png" alt="Nextcloud Two-Factor authentication" width="800" height="1206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing the apps
&lt;/h2&gt;

&lt;p&gt;Under the &lt;em&gt;Apps&lt;/em&gt; menu, there is a categorized &lt;em&gt;AppStore&lt;/em&gt; with plenty of apps to choose from. I have installed Calendar, Contacts, Tasks, Mail and Carnet. All of these applications can be synchronized via Cal/Card/WebDAV to mobile phone via the application I'll install later.&lt;br&gt;&lt;br&gt;
Out of my current experience, those applications with 4.5 stars and applications with &lt;em&gt;Featured&lt;/em&gt; flag are worth checking.&lt;/p&gt;

&lt;p&gt;Reviewing each application is pointless. It's enough to say that the applications are working reliably. There are usual UI glitches here and there on Mail and Calendar, and UI/UX isn't perfect but it's acceptable. I guess I get used to Google apps UI for years and expecting all other apps to work the same way.&lt;/p&gt;

&lt;p&gt;Installing the applications is straight-forward process. In the beginning, I had a trouble of finding installed app, as it isn't under the &lt;em&gt;Apps&lt;/em&gt; menu, instead, it's under the &lt;em&gt;Settings&lt;/em&gt; menu. Some apps are configured in &lt;em&gt;Personal&lt;/em&gt; section, while some others are configured &lt;em&gt;Administration&lt;/em&gt; section. This tends to confuse the user.&lt;br&gt;&lt;br&gt;
Navigation is confusing a bit in the beginning, but once you get to know what to expect, it's much better.&lt;/p&gt;

&lt;h2&gt;
  
  
  External storage
&lt;/h2&gt;

&lt;p&gt;Without going into details how (this will be explained in the future post), I have attached two directories from my home NAS as external storage.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iiFq8caQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-external-storage.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iiFq8caQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-external-storage.jpg" alt="Nextcloud external storage" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, I'm able to browse the photos from my NAS located in my home, via Nextcloud instance running on some remote VPS. As visible on the screenshot above, I've added &lt;em&gt;GDrive Pictures&lt;/em&gt; directory, which is the directory synchronized with Google Drive at the same time. If you upload something to Google Drive, that file will be downloaded to my NAS and it'll show up in Nextcloud as well.&lt;/p&gt;

&lt;p&gt;As shown on screenshot above, setting up the external storage is simple as choosing the protocol and filling the fields. I had it working from 6th or 7th try, as you have to guess where to put &lt;code&gt;/&lt;/code&gt; in the directory path and to guess the &lt;em&gt;domain&lt;/em&gt; value, &lt;code&gt;WORKGROUP&lt;/code&gt; on the screenshot.&lt;br&gt;&lt;br&gt;
Once you pass that, it'll work stable and without issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thumbnail generator
&lt;/h2&gt;

&lt;p&gt;Having in mind that I've connected home NAS with photos originating from Google Drive and photos originating from mobile phones as well, generating thumbnails is massive work initially.  You might think, why not just opening the directory and thumbnails will be generated in flight? Yes, you're right, but that'd be quite slow. All those images have to be uploaded from home NAS to Nextcloud running on VPS in order to generate thumbnails. You'd have to wait for the whole process to complete in order to see actual photos in the gallery.&lt;br&gt;&lt;br&gt;
For big galleries, this is a deal-breaker, as being unable to browse your photos "instantly", makes the product unusable.&lt;br&gt;&lt;br&gt;
Therefore, we have to pre-generate small thumbnails (called preview files from now one) which will be loaded in gallery when certain directory is opened.&lt;/p&gt;

&lt;p&gt;By default, Nextcloud will generate files from 32x32 to 4096x4096 with step of power of 4 in between. For some photos, this means using more storage than initial file takes. For my &amp;gt;200GB media collection, this means generating preview files with almost the same size as original file. This is also a deal-breaker as I don't have storage that large on my VPS. Instead, I have 20GB only :).&lt;/p&gt;

&lt;p&gt;I come up with two strategies for preview files:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I'll force the nextcloud to store the preview files on NAS as well&lt;/li&gt;
&lt;li&gt;I'll have to limit the size of thumbnails somehow.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Preview files on NAS
&lt;/h3&gt;

&lt;p&gt;Having preview files on NAS at home is a solution that works. Those files are small and are transfered at decent speeds to Nextcloud server. However, as VPS comes up with limited monthly bandwidth, that means that preview files would be transfered from home to VPS and from VPS to client browser. This would happen each time and for each user. Eventually, traffic builds up and bandwidth might be breached.&lt;br&gt;&lt;br&gt;
Additionally, it's quite hard to store only preview files on NAS. Due to coupled directory structure, storing preview files assumes storing some other metadata on NAS as well and this slows down the Nextcloud too much.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preview generator
&lt;/h3&gt;

&lt;p&gt;In the AppStore, there is an app called &lt;a href="https://apps.nextcloud.com/apps/previewgenerator"&gt;&lt;em&gt;Preview generator&lt;/em&gt;&lt;/a&gt;. This application is used to generate previews, of course, but additionally we can do it from the console, instead of opening the directory containing the photos.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First issue you'll discover is that there is no GUI setup for it. This has to be done through the configuration files on the filesystem.&lt;/li&gt;
&lt;li&gt;Next you'll realize that simply running the console commands won't do much as you'll get preview files with the same size. Therefore we have to find a way to configure the preview generator to generate smaller files.&lt;/li&gt;
&lt;li&gt;Preview generator configuration isn't simple. Additionally, you won't find unique solution in the forums. Instead, you'll find a couple of solutions, claiming to be correct, but mutually quite different.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After whole week of try'n'errors with preview generator configurations I've manage to set it up and to have only necessary preview sizes for web gallery and mobile gallery, including bigger image compression. I've ended up with 3-4 GB of preview files, which is acceptable.&lt;/p&gt;

&lt;p&gt;By utilizing the crontab, I'm running preview generator 4 times an hour, to generate previews for freshly uploaded content.&lt;/p&gt;

&lt;p&gt;I'm not sure whether this become a huge issue for me as I have a tiny VPS, but I cannot escape the impression of this feature not being scalable enough. If you're offering the product called private cloud, I know you're assuming that users will install it on massive storage, but there are many users like me installing it on small VPS or on Raspberry with external storage attached and getting into preview generator problem instantly.&lt;br&gt;&lt;br&gt;
Another issue with these preview files is the computing power required to generate a couple of versions of same image and compress it. Running this on Raspberry takes days and days. I haven't tried it thought, that's something I read on forums.&lt;/p&gt;

&lt;p&gt;If you're connecting your home storage to remote nextcloud, make sure to run the preview generator once everything is set up, as you'll find yourself re-uploading whole collection multiple times (as I did).&lt;/p&gt;

&lt;h2&gt;
  
  
  Mobile app
&lt;/h2&gt;

&lt;p&gt;As a mobile developer myself, I might be too harsh on reviewing the mobile app. I've installed android version and connected it to my nextcloud instance. That worked instantly!&lt;br&gt;&lt;br&gt;
Out of main features for mobile application, I'd single-out browsing the nextcloud files and auto-upload feature.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Auto-Upload
&lt;/h3&gt;

&lt;p&gt;Auto-Upload feature scans for changes on local directories on mobile phones (read: detects new photos) and uploads them to Nextcloud. It offers some predefined directory upload configuration, however I haven't found those much useful as it doesn't fit my environment. There is a super-cool &lt;em&gt;Custom directory&lt;/em&gt; option where we can choose local directory to watch and remote directory to upload the files to. That's what I used.&lt;/p&gt;

&lt;p&gt;I see this feature as a main use-case for the app, and you expect it to work flawlesly, however, it's pretty buggy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qVZLu4bJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-auto-upload-fail.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qVZLu4bJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-16-nextcloud-auto-upload-fail.png" alt="Nextcloud Auto-Upload fail" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are some related features to auto-upload like "conflict resolve" (this reminds me on git) and choosing the default resolve strategy and I thought these features are advanced, but the more I use the app, the more I realise that these features are introduced to patch the unstable upload and transfer responsability to user. This is the result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2VfaIomk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-nextcloud-duplicated-files.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2VfaIomk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-nextcloud-duplicated-files.png" alt="Multiple uploads of the same file" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can only guess what happened in the background. This is the result of file conflict resolve where &lt;code&gt;(2)&lt;/code&gt; is added to the file name. And it happened 8 times in this case. This is almost always the case with large video files.&lt;/p&gt;

&lt;p&gt;Having this feature as unstable as now makes the whole product almost unusable. I want to have photos from my and my wife's mobile device uploaded to Nextcloud. At this point I'm not sure if some photos are lost, skipped or duplicated.&lt;br&gt;&lt;br&gt;
Truth to be said, as unstable as is, eventually it uploads the content to server, but it's definitelly something I can't rely on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Browsing photos
&lt;/h3&gt;

&lt;p&gt;You can browse all files from mobile app. It's nice to have this feature and somehow its assumed to have it, however, it's quite slow and UX/UI should be improved.&lt;br&gt;&lt;br&gt;
By opening the photos directory you'll be presented with empty thumbnails for at least 10-15 seconds. And yes, each photo has a share button on it...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Le3z4B4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-nextcloud-mobile-browse-photos.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Le3z4B4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-nextcloud-mobile-browse-photos.jpg" alt="Nextcloud mobile photo browsing" width="800" height="1084"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;I am very grateful for all the hard work developers are putting into this application, it is built in free time and I am aware that it's community driven product. That doesn't justify the lower quality of the product though. It has to be tightened up a bit and it'll work like a charm.&lt;br&gt;&lt;br&gt;
I get the feeling that there is a lack of proper QA. It must not happen that main use-case gets shipped and failing for everyone.&lt;/p&gt;

&lt;p&gt;After I have installed the application, Auto-Upload wasn't working at all. By reading the reviews on the PlayStore I figured that developers wrote &lt;em&gt;"if you want this feature to work, install beta version"&lt;/em&gt;. That's not how its done people.&lt;/p&gt;

&lt;p&gt;There is a huge potential in this product and, as other users in the reviews said, &lt;em&gt;Not working Auto-Upload is a deal breaker for me, I'm gonna search for better product&lt;/em&gt; and I think the same. You see, this one feature makes people ditch whole Nextcloud product and that's the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Synchronizing Calendar and Contacts
&lt;/h2&gt;

&lt;p&gt;As mentioned, Calendar and Contacts can be synchronized through CardDAV/CalDAV. To have it working on Android, we have to install &lt;a href="https://play.google.com/store/apps/details?id=at.bitfire.davdroid"&gt;DAVx5&lt;/a&gt;. It costs 1$ and it's worth much more.&lt;/p&gt;

&lt;p&gt;In order to login to nextcloud with this application, we have to generate an application password on Nextcloud. This is a must as DAVx5 app has to authenticate without 2FA involvement. With application password, we'll proceed to create an account on DAVx5 for our Nextcloud instance and it'll work by itself. To avoid confusion, this is just a local in-app account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XB6JnVf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-davx5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XB6JnVf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dusko.dev/assets/img/posts/2020/2020-06-17-davx5.png" alt="DAVx5 application" width="800" height="819"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mindblown moment for me was when I figured out that you can use it to connect native Calendar app on your mobile device (in my case Samsung Calendar) and create events in native Calendar app, to have it synchronized to Nextcloud eventually. &lt;/p&gt;

&lt;p&gt;Its UI could be improved a bit, however as this application is made to work in the background, without much interraction, it's not a big issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final word
&lt;/h2&gt;

&lt;p&gt;Nextcloud is definitelly a solution to use in private environment. Its web app is awesome. Mobile app needs more work to stabilize. Nextcloud configuration and optimization could be improved overall.&lt;/p&gt;

&lt;p&gt;From personal perspective, Auto-Upload feature works but it is not reliable and I'm looking to other ways of syncing mobile photos to Nextcloud. Using script and cron it to pull Google Photos might be one of the solutions (as Google Photos backup works reliably anyway), but then I don't need the Nextcloud at all and I'm stick to Google service which I'm trying to find alternative for in the first place.&lt;br&gt;&lt;br&gt;
If I ditch Nextcloud, I'm losing Calendar and Tasks features which I find as nice replacement for Google Calendar and Keep Notes. &lt;/p&gt;

&lt;p&gt;Do you have similar experience with Nextcloud or you'd like to share a solution for the issues I've mentioned above. Please, tell me about it.&lt;/p&gt;

&lt;p&gt;This post is originally posted on: &lt;a href="https://dusko.dev/posts/2020/06/nextcloud-honest-review/"&gt;dusko.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>google</category>
      <category>privacy</category>
      <category>cloud</category>
      <category>nextcloud</category>
    </item>
  </channel>
</rss>
