Stores Payload upload files in Nextcloud through WebDAV and can create public share links using the OCS Files Sharing API. It is added to the Payload config as a plugin and enabled per upload collection. It requires Payload 3.37 or newer, the cloud-storage plugin and webdav packages, and a Nextcloud account, preferably with an app password.
A Payload CMS plugin that integrates Nextcloud as a storage adapter
Installation
npm i payload-nextcloud2
Stars
0
Forks
0
Open Issues
11 months ago
Last Updated
0
Weekly Downloads
v0.1.0
npm Version
108.6 KB
Unpacked Size
2
Dependencies
Trends appear after 7 days of data. Daily snapshots have not started yet.
Trends appear after 7 days of data. Daily snapshots have not started yet.
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1093935074-root)<a href="https://payloaddirectory.dev/plugins/1093935074-root"><img src="https://payloaddirectory.dev/badge/1093935074-root.svg" alt="Payload Directory"></a>README
Nextcloud storage adapter for Payload CMS (Payload 3). It integrates Nextcloud WebDAV for file uploads and can automatically create public share links via the OCS Files Sharing API.
Features
nextcloud.share_url on uploaded document)nextcloud.webdav_url) for internal useRequirements
Install
pnpm add payload-nextcloud @payloadcms/plugin-cloud-storage webdav
Quick start Add the plugin to your Payload config and supply Nextcloud credentials and WebDAV settings.
// payload.config.ts
import { payloadNextcloud } from 'payload-nextcloud'
export default buildConfig({
collections: [
{
slug: 'media',
upload: {
mimeTypes: ['image/*', 'application/pdf'],
},
fields: [/* your fields */],
},
],
plugins: [
payloadNextcloud({
collections: {
// enable integration for a collection
media: true,
},
nextcloud: {
auth: {
username: process.env.NEXTCLOUD_USERNAME || '',
// Prefer app password (token). Provide ONE of token or password.
token: process.env.NEXTCLOUD_TOKEN,
// password: process.env.NEXTCLOUD_PASSWORD,
},
metadata: {
// optional custom WebDAV properties namespace + field map
customPropertiesNamespace: 'http://payloadcms.com/ns/nextcloud',
fieldMap: {
'nextcloud.custom_metadata.title': 'pc:title',
'nextcloud.custom_metadata.description': 'pc:description',
},
},
webdav: {
// Base Nextcloud URL, e.g. https://cloud.example.com
baseUrl: process.env.NEXTCLOUD_URL || '',
// If omitted, defaults to /remote.php/dav/files/{username}
filesPath: process.env.NEXTCLOUD_FILESPATH,
// Optional root directory under the user's files area
rootDirectory: process.env.NEXTCLOUD_ROOTDIR || '/Payload',
timeoutMs: 15000,
// verifyTLS: false, // only in dev with self-signed certs
},
},
}),
],
})
What gets added to your Media collection
nextcloud group in the sidebar with read-only fields:
custom_metadata group (optional editable fields you can sync via WebDAV PROPPATCH)sync_status group to track last sync and errorsPublic share links
nextcloud.share_url will be set to the base public link.${share_url}/download in your app.Nextcloud app password guidance
token.
NEXTCLOUD_TOKEN; do not share your main account passwordOCS-APIRequest: true header and Basic auth—we handle this internally.verifyTLS: false (avoid in production).Development notes
dist, not src.pnpm buildpnpm devdev folder is for local testing only and is not published.License MIT
Author / Support
Update package.json with your name and repository URL. Tag your repo with payload-plugin on GitHub for discoverability.
cloud storage
Official Payload plugin for storing uploads in third-party cloud storage through a pluggable adapter interface
100426.0k/wk45.4kv3
payload storage bunny
Storage adapter that keeps Payload uploads and video in Storage and Stream
821.6k/wk60v4
payload storage cloudinary
Cloudinary storage adapter that moves Payload uploads to Cloudinary with transformations, folders and private files
550/wk7v3
payload storage file explorer
Browse and manage S3-compatible bucket files from an admin view in Payload
460/wk12v3
payload cloudinary plugin
Upload Payload media files to Cloudinary
390/wk77v2
payload s3 upload
Store Payload CMS uploads and resized images in Amazon S3 with per-collection configuration
360/wk70v1