Nextcloud Memories - Your best practises

I’ve been organizing my photos with Nextcloud Memories for a while now. I’d like to continue doing this, but unfortunately I haven’t yet found the perfect way to organize it for myself.

What folder structure did you choose? I initially created one folder per year. Then, when I got a new phone, some pictures, presumably without EXIF metadata, were uploaded to the 2025 folder, resulting in duplicates based on the file names. If I’d only had one folder, this probably wouldn’t have happened. Or do you, for example, delete the photos after uploading them?

How do you handle pictures you receive via WhatsApp? Currently, I’m uploading them, but this is really cluttering up my gallery. Do you have a good solution for filtering out unimportant pictures and videos?

I’d also be generally interested in smart solutions for how you organize your gallery. Thanks in advance for your help.

1 Like

I had also this problem with many different filename-schemas from different cameras…

So i wrote a bunch of scripts to rename ALL files in one name-scheme, set the artist, move the files from the upload-folder to a filestructure by year and month “YYYY/YYYY_MM”

I run nextcloud AIO so this must be handled inside and outside the container.
The scripts use inotifywait (it works much better then incrond!!!) on the filesystem on the docker host, where the nextcloud-data is stored.
It waits for filesystem-changes and decides what has to be done.

one script (exif-fixdatetime) is looking in exif-data if there is a valid date/time set. If not, it looks in the filename if it can extract a valid date/time for the image.
Then it renames the file to a namescheme YYYYMMDD_HHMMSS. and moves it to the Folder YYYY/YYYY_MM

If there a file exists with the same filename, it adds -1 or -2 (depending on the last existing) to the filename (it’s a feature of exiftool)

So i have 2 inotifywait-watchers . One for the Upload-Folder in Nextcloud, and one for the rest.

The watcher in the uploadfolder takes each uploaded file, puts it into a batch-job and run the exif-fixdatetime script. batch runs the script only if the load of the computer is less than 0.5 So if you upload a big amount of images in a bunch, the server stays still responsive.

The other watcher for the rest of the filesystem takes filesystem-changes and writes the path of the directory or the file in a “stack” file. Because Changes of one file can lead to many filesystem-change-operations…
Or sometimes you change a file more than one time in a short timespan…

If each change leads directly to a rescan of nextcloud files, your server will become unresponsive… that’s not good.

So i collect all changed files and directories in a stack. And a cronjob takes every minute or 2 the stack sorts and uniqs the entries and do a selective occ files:scan (even with directories and groupfolders as well!!!) only for the changed files or directories, and when needed also recursive.

Fazit:
You define an Upload-Folder (in german nextcloud-installations it’s called per default SofortUpload) and all your Uploads (Camera, Whatsapp, Signal…) you want to have processed like this, go into this folder (and as well subfolders!!!)

You take a photo or receive an image on Whatsapp, the nextcloud app uploads it to the nextcloud. Wait a Minute or 2, and you can see your Images in a shell-sortable namescheme in a resulting folder-structure by YYYY/YYYY_MM rescaned by nextcloud, so your images appear in the correct timeline in memories too.

:slight_smile:

If collect my bunch of scripts here in my git

You can modify this scripts to be run on a bare-metal installation (without docker) as well.

But you have to be admin with root-access to the server on your instance of nextcloud to run this.

If you have questions, feel free and ask.

Regards

Jakob

The only unsolved problem i still have is…

I store my uploaded images automatically in a groupfolder (now called team-folder) for my family. And all images from my family-members have their images stored inside this group-folder.

Because most of our images are for “us”.

I have a separate folder for my private images (Railway, traffic-situations, what else stuff my familiy is not interested in). And i have to move “my” images away from our family folder manually to my private folder.

memories is configured for all users in that way, it uses the group- and the private-folder. so each timeline for each user is different in memories. because it contains our images and the users private images too. which is a good solution.

But i can not decide, which images should go to my private images and which to the groupfolder… especially when we are on holidays, and i take a bunch of railway images… this images bores my family-members… but if they are not in the same folder/context with the other images, i lose information, where i’ve taken them… but this is another solveable problem i’ve still not solved for me. :slight_smile: