Working with Nextcloud

Working with Netcloud


This manual contains different Nextcloud tips and tricks, as well as on integration of your cloud-based third-party applications. Please refer to this manual to install Netcloud.


File preview

File types

Similar to file managers, Nextcloud can create thumbnails with a preview for pictures, video and audio files, text documents, and so on. Learn more here. To enable video preview, edit the configuration file by turning on thumbnails for all types of image and video files:


'enabledPreviewProviders' => array (

To extract the preview from a video file, install the ffmpeg package:

emerge ffmpeg


You should limit the size of the previews, otherwise all your images will be cached in the original size. To do so, add the following lines:


'preview_max_x' => 512,
'preview_max_y' => 512,

Cache update

For faster access to directories with thumbnail files, keep the cache up-to-date with [Preview Generator] (, which is provided by Nextcloud and can be installed in the "Multimedia" section.

Once installation completed, run:

su nginx -s /bin/bash

cd /var/calculate/www/nextcloud/htdocs

php occ preview:generate-all

If you have many image files stored in one directory, you may need to increase the size of RAM allocated for PHP. To do so, edit the value of the memory_limit variable:


; Maximum amount of memory a script may consume (128MB)
memory_limit = 512M

File naming

By default, the Nextcloud client loads the camera pictures in one dedicated directory on the cloud, naming them somewhat like this: IMG_20180806_124329_1.jpg, where "20180806" stands for YYYYMMDD, "124329" stands for HHMMSS, "1" stands for the second pic made at same second.

Pictures imported from the social media can though be random, as in "MY0bLxnxTaM.jpg". If they are photos (not drawings or screenshots), you can extract the time from the file's EXIF data. To do so, use the exiv2 utility, included in media-gfx/exiv2:

exiv2 -F -r'IMG_%Y%m%d_%H%M%S' rename -- *.jpg

To check all pics, you can replace the path for the renamed:

mkdir new; exiv2 -F -r'new/IMG_%Y%m%d_%H%M%S' rename -- *.jpg

As a result, there may remain screenshots and processed photos in the source directory, which you can easily separate from the original pictures.

This naming has several advantages.

  1. When merging photos from different cameras or memory cards, it is very unlikely that you encounter two identical names, which means you can easily put files into one directory after processing them.
  2. Photos will always be arranged in chronological order. You can store photos from different sources in one place.
  3. When merging cropped photos downloaded from the cloud and the originals, the file names will be the same. This means that after merging into one directory you will heve no duplicates and the cropped pictures will be replaced correctly.

If the filename extension was in capitals, you can lowercase it with the following command:

rename .JPG .jpg *.JPG

File creation date and time

When you copy photos, the file modification time may change. This is not convenient, because information about the time when the picture was taken gets lost. You can restore the time of file creation by retrieving EXIF information with the exiv2 tool, that was described above. To fetch it, go to the pictures directory and run:

exiv2 -T *.jpg

Reset the index to validate.

A viewer for Android

To manage your photos stored on Nextcloud, you can install the QuickPic gallery application.


An audio player for Android

To play music your files stored on Nextcloud you can use the Soumi: Network Music Player. Besides allowing to play audio files stored on the cloud, this music player has its own play-list cache, as shown on the screenshot below:

Soumi: Network Music Player

Site password storage

We recommend Passman for storing passwords in Nextcloud. Passman creates an encrypted storage in your own cloud. Several storages of this type can be used simultaneously. For interaction with the password storage, you can use the password storage extensions developed for Firefox (including the mobile version) and Chrome. When connecting to the storage in the cloud, you create a password to encrypt the connection data:


Passman looks for authorization fields on the site and adds its icon to them. If there is a saved password, the fields will be filled in, as in: on the screenshot below:


Page bookmarks

To work with bookmarks in Nextcloud, use the Bookmarks application. Instead of the usual tree structure, it uses tags to find bookmarks. You can install the Bookmark extension FreedomMarks for Firefox or Chromium to access your bookmarks:


There is also the [Nextcloud Bookmarks] application ( for Android, to access bookmarks. It uses tags as well.

If you stick to the classic approach to storing bookmarks, you can use the floccus extension. This extension adds its tag to each tab, together with the nesting level.

GPS navigation

To work with GPS navigation, use can use [PhoneTrack] ( that allows you to import routes from files with the .gpx extensiongpx так и отслеживать положение устройств в режиме реального времени.

PhoneTrack configuration

All devices from which you need to receive data can be combined into groups, or sessions. A session is created and then it is necessary to reserve a device in it.


On the screenshot above, a "Family" group was created, containing three reserved devices, each of them has a name and a label.

In the next tab, all possible URLs for data transmission in real time are listed. Each option has an exclamation mark next to it. Click on it to get the link to be specified. The device label must also be specified.


Below a GPS Logger configuration is described as an example.

GPS logger configuration

GPS Logger saves routes to a .gpx file,gpx и передавать их как в ручном режиме так и в автоматическом. It is possible to send coordinates in real time.

To send in real time, go to Settings - Save logs to the user-specified URL-address and enter the URL address specifying the label of the device we need instead of yourname.

GPS Logger

The check-up includes a HTTP Test and log check-up.

GPS Logger

GPS Logger

On the screenshots below a successful test and the log contents are shown, informing the user that the coordinates have been defined and forwarded to the specified address.

The data is written to your database. The device will immediately appear in the list as a colored circle with the first letter of the device name inside.


If the computer has no Internet connection yet, the coordinates will be sent once it has been up.

Working with office documents

After installing NextCloud, you will be able only to view, to manage and to edit documents in txt format. You can use Collabora Online to work with all kinds of office documents.

Collabora Online

Install and configure Collabora Online according to the manual.


Database reindexing

You should update your Nextcloud database whenever you copy or forward files, modify access rights or edit files directly on the server, not via the Nextcloud Web interface of WebDAV. To so, run:

If you have direct access to Nextcloud files (not via WebDAV or a Web interface), do not forget to re-scan the files. To so, run:

su nginx -s /bin/bash

cd /var/calculate/www/nextcloud/htdocs

php occ files:scan user

Replace user with your login.