7.9 KiB
description |
---|
Steps to configure Memories for the best experience and performance |
Configuration
!!! danger "Use the admin interface"
Starting with v5.0.0, you can fully configure memories using the admin panel. With an admin account in Nextcloud, go to `Settings -> Memories`.
Using the admin interface for configuration is **strongly recommended** in most cases.
Memories runs a background indexing job to extract EXIF metadata from photos and videos, as well as immediately on every upload.
If you just installed memories and want to speed up indexing, run the following commands. For usage of the occ
command line, refer here for more information.
occ memories:places-setup # set up reverse geocoding, will force re-indexing
occ memories:index # index existing photo files (can run in parallel, refer to admin panel)
!!! warning "OCCWeb"
The OCCWeb app is deprecated, and will not work with Memories. You must use the `occ` command line.
!!! tip "Cron"
You **DO NOT** need to set up a cron job or run `occ memories:index` periodically, since this is handled internally.
Any subsequently uploaded files will be indexed automatically with hooks. In case you upload files externally and run
`files:scan`, the background job will index these files. Make sure Nextcloud cron is configured correctly.
!!! tip "OCC with Docker"
If you are using docker, make sure you run these commands with an interactive TTY. For example,
```bash
docker exec -it my_nc_container php occ memories:index
# ^^^ <-- this is required
```
If you are using Nextcloud AIO, see [this documentation](https://github.com/nextcloud/all-in-one#how-to-run-occ-commands).
Storage support
The app can work with external storage for photos. Just set the mountpoint as the timeline directory.
- If you add any photos from outside Nextcloud, you must run the scan and index commands.
- Indexing may be slow, since all files must be downloaded from the storage.
!!! warning "Transcoding with external storage"
Video transcoding requires the entire file to be available locally for ffmpeg. To prevent downloading the
entire for every playback, transcoding is disabled for external storage.
Image/Video support
To get support for all file types including HEIC, TIFF and RAW, refer to this page.
To enable support for high resolution images, you need to update Nextcloud's config.php
to include
'preview_max_memory' => 4096,
'preview_max_filesize_image' => 256,
Transcoding
Memories bundles a transcoding server with HLS capabilites for adaptive streaming. You need to configure transcoding to be able to play any videos. HLS enables the browser to download the video as small chunks and in resolutions adaptive to the connection speed. As a result, this is usually expected to have a major boost in video experience and performance.
You can configure transcoding from the admin panel. Make sure to test all settings carefully on different kinds of videos.
Read the following considerations carefully regarding transcoding:
- In general, transcoding can be very compute intensive. If you run Nextcloud on an RPi, it will not work for you.
- If you use external storage, transcoding might be very slow or not work at all. In this case, you should disable it.
- Make sure there is a lot of space available in
/tmp
for the transcoded files. - If transcoding fails, the video player will fall back to the original video stream. Check the output of
/tmp/go-vod/<instanceid>.log
- For better performance, you may configure the transcoder to use hardware acceleration. See this page.
Reverse geocoding
Memories supports reverse geocoding to find the location of photos. To set up geocoding you need to download the planet boundary dataset and store it in the database. This works only on MySQL/MariaDB/Postgres (no SQLite support). To set up, go to the admin panel. Note that all your files will be re-indexed after downloading the planet database.
Recommended apps
- Preview Generator - For pre-generating image previews (required for best performance)
- Recognize - The official Nextcloud app for AI tagging of images and people.
- Photos - The official Nextcloud Photos app, required for albums support.
- Face Recognition - An alternative face recognition app, which offers more fine-tuning. Alpha stage integration.
Preview storage
By default, previews upto 4096px
size are generated by Nextcloud. Each of the largest previews might be a few megabytes in size. This may not be ideal if you have limited storage space, since the preview size may become larger than the originals (especially if you use efficient image formats like HEIC). In this case, you can limit previews to a smaller size like 2048px
.
Note that Memories will, by default, load the full image upon zooming in. If you are okay with this, you may use a even smaller size like 1024px
to save more space as well as faster preview generation time. Non-JPEG files will be converted on the server when loading in full-res, which may lead to some server load.
On Nextcloud AIO, these options are set to the recommended values by default.
'preview_max_x' => 2048,
'preview_max_y' => 2048,
You can also set the preview JPEG quality to 80 to save more space.
occ config:app:set preview jpeg_quality --value="80"
If you already generated previews and want to regenerate, run the following (at your own risk; have backups)
rm -rf <nextcloud-data-dir>/appdata_*/preview
occ files:scan-app-data
Migration
Memories directly uses EXIF metadata from files, so migration should be generally easy. The file structure of your photos is preserved as-is.
If you are migrating from Nextcloud Photos, you don't need to do anything. Your albums and tags will be carried to Memories as-is.
If you are migrating from Google Takeout, you may run the following command to move JSON metadata to EXIF.
occ memories:migrate-google-takeout
Customization
Header Logo
Nextcloud supports customizing the logo for your instance. To properly theme the logo to match the user's theme, the logo you use in Admninistration => Theming
must follow the following criteria:
- It must be an SVG file.
- The
viewBox
attribute on the<svg>
element must be set appropriately. - All paths that correspond to white areas must have the
fill
attribute set tocurrentColor
. These areas will then automatically be colored according to the user's theme. - Since Nextcloud doesn't support
currentColor
, you must set the default value for the color (e.g.white
) as an inline style on the<svg>
element (<svg style="color:white">
).
A sample SVG that follows these criteria is shown below (from here):
--8<-- "src/assets/nextcloud.svg"
Note that you may skip these steps and also use a PNG file, but the logo will not be colored according to the user's theme. This can be especially troublesome since Nextcloud mostly shows the logo on a dark background while Memories uses both light and dark backgrounds.
Other notes
- For optimal performance, enable HTTP/2 on your reverse proxy (nginx/apache)
- Make sure your server timezone is configured correctly. If a photo does not contain an EXIF date, the server time is used.
- Perform additional server tuning for Nextcloud. See the docs.
- The archive feature moves photos to a separate folder called
.archive
at the root of your timeline. You can, for example, mount this folder to a cold storage.