Skip to main content
Version: 2.7.0

Nextcloud Shared Links

You can display images from a public Nextcloud folder share or Photos app album directly in Gallery View without requiring any Nextcloud account or connection configuration.

The nextcloud-share source type is entirely separate from the authenticated nextcloud source type. It works using public share URLs created on a Nextcloud server.


The nextcloud-share Source Schema​

sources:
- type: nextcloud-share
url: https://cloud.example.com/s/TOKEN
password: "optional-share-password"
recursive: true
filenameFilter: "IMG_*"
filters:
mimeTypes:
- image/jpeg
- image/png
minSizeKb: 10
maxSizeKb: 5000
sort:
by: name # name | size | lastModified
order: asc # asc | desc
limit: 20
view:
type: masonry
FieldTypeRequiredDescription
typestringYesMust be nextcloud-share.
urlstringYesPublic share URL from Nextcloud (standard /s/TOKEN or Photos app /apps/photos/public/TOKEN).
passwordstringNoPassword if the Nextcloud public share link is password-protected.
recursivebooleanNoWhen true, scans subdirectories inside the share. Defaults to true.
filenameFilterstringNoGlob pattern for filename matching (e.g. IMG_*, *.png).
filters.mimeTypeslist of stringsNoFilter files by MIME types (e.g. image/jpeg, video/mp4). image/* and video/* match every image or video type.
filters.minSizeKbnumberNoMinimum file size in kilobytes.
filters.maxSizeKbnumberNoMaximum file size in kilobytes.
sort.byname, size, or lastModifiedNoField to sort files by.
sort.orderasc or descNoSort order (asc or desc).
limitnumberNoMaximum number of images to display.

Supported URL Formats​

Gallery View automatically parses and resolves several Nextcloud public share URL formats:

  • Standard Files Public Link: https://cloud.example.com/s/TOKEN or https://cloud.example.com/index.php/s/TOKEN
  • Files App Share Link: https://cloud.example.com/apps/files/s/TOKEN
  • Photos App Public Album Link: https://cloud.example.com/apps/photos/public/TOKEN

Videos​

Videos in the share play in the image viewer; their tiles show a still frame with a play icon. The still frame is Nextcloud's public preview of the video when the server makes video previews. For password-protected shares, or servers without video previews, a video up to 50 MB is downloaded once to take its frame (not on phones or tablets), and larger ones show a dark placeholder. Playing downloads the whole video, so videos over Largest remote video to play in Settings offer Open in Nextcloud (the share's page) instead.

Examples​

These examples use shares on the public, read-only demo server, so you can paste them into a note as they are.

sources:
- type: nextcloud-share
url: https://demo-nextcloud.mkshp.dev/s/DAxM47SmHesMTqa
view:
type: masonry
sources:
- type: nextcloud-share
url: https://demo-nextcloud.mkshp.dev/s/ZSBpcMLfaQPCi2Y
password: "gallery-demo"
view:
type: thumbnail

3. Nextcloud Photos App Public Album​

sources:
- type: nextcloud-share
url: https://demo-nextcloud.mkshp.dev/apps/photos/public/wD9fLmI1TP6KEq76Yvs9fZrBdfDu8gfc
view:
type: justified

Troubleshooting​

  • Invalid Nextcloud Share URL: Ensure the URL is a valid public share link copied from Nextcloud.
  • Authentication Failed / Password Protected: If the share link requires a password, make sure to specify the password property in your YAML block.
  • Share Not Found or Expired: The share link may have expired or been deleted by the owner on Nextcloud.