Uploading photos from another app to Nextcloud

Hello community,

I want to upload my pictures to Nextcloud.
I tried several things, but non worked. I run latest Nextcloud on my home server (Rocky Linux 9, php 8.2, Apache).
I want to upload the photos to my server (~50Gb). From posts I understand that Nextcloud looks for a directory “PhotoAlbum” under /data//files/.
Is that correct?

First way to upload was to create in Nextcloud app an Album in Photos and then upload all pictures. I am getting to the point as depicted underneath, when selecting a photo. Then nothing happens. Selected pictures do not get uploaded

I also played a bit with the system and tried to upload phtos by creating a structure in /data//files/PhotoAlbum/ and copying photos into subdirectories under /data//files/PhotoAlbum/

I ran the command

sudo -u papche php /path/to/nextcloud/occ files:scan --path=‘/PhotoAlbum’

Nothing happens there either.

What am I doing wrong?

Thanks for your support


What also is not working is to drag&drop pictures into the album

Any idea what is wrong?

Thanks, Wolfgang

The path to be scanned usually start with the user under which the files are shown (you?), followed by “/files/” and the folder structure from the users Nextcloud root folder, like “/marcus/files/PhotoAlbum”. BTW, if you add " -vvv" to the command it will show you a more verbose output.

Afaik, photo albums are not actual file paths, but only collections in the Photos app that are linking to photos that may be stored under different actual file paths. So if “PhotoAlbum” in your command is the name of the photo album you created, the above command won’t work.

I would try the following steps…

  1. Configure the Photos app and tell it which folders to display photos from and where the default upload location should be when uploading photos to an album.

    In the above example the Photos app will show photos from the Documents and Photos folders and it will upload photos, that you directly upload to an album to the Photos folder. (Afaik, that won’t change the location of existing photos that are already in one of the defined Media Folders on your Nextcloud when you add them to an album.)

  2. You cannot drag and drop photos directly into an album, but you can try one of the following methods instead:

    • Upload the photos via the Files app to one of your defined Media Folders, and then add them to an album manually in the Photos app…

    • Upload the photos from the “Folders” section in the side pane of the Photos app by clicking on the “+ New” button and then add them manually to an album

    • Upload the photos directly to an album by going into an existing album (can be an empty one) and clicking on “+ New” → “Upload Files” which will upload the photos to the “Upload Folder” defined in the screenshot above and add them to the respective album in one step.

Hope this is of any help.


thanks you for picking this topic up.
How can I let Nextcloud know that the pictures are on the server itself?
I don’t want to keep the photos on my client/laptop


Are you referring to the Nextcloud desktop client? If so, you can simply exclude the folder(s) where you uploaded the photos to from synchronization. That way, the photos won’t be downloaded to your computer.

I do not refer to the Nexctcloud client. I do not store any pictures there.

I do refer to my home server where all my pictures are stored. I am currently using an app called Piwigo which I would like to replace with Nextcloud.

I’m sorry, but then I don’t really understand your question.

I mean, as far as I understand from your screenshot, you’re uploading your photos manually through a browser, so there’s no way Nextcloud can know what’s on your computer, nor can it automatically delete the photos after you uploaded them.

Just delete them on your computer after you successfully uploaded them to your Nextcloud…

Or, you could connect your Nextcloud to your computer via WebDAV and then move the photos to the WebDAV mount in the file browser instead of uploading them through the browser.