mkhoirulwafa18

payload nextcloud

by mkhoirulwafa18
Cloud storage
v3
^3.37.0
MIT

Overview

Summary generated from the README

Stores Payload upload files in Nextcloud through WebDAV and can create public share links via the OCS Files Sharing API. It is added to the Payload config as a plugin and enabled per upload collection, using a Nextcloud username with an app password or token. It builds on the Payload cloud-storage plugin and the webdav package and requires Payload 3.37 or later.

Features

  • Uploads files to Nextcloud via WebDAV
  • Optionally creates public share links and stores the URL on the document
  • Stores a direct WebDAV URL for internal use
  • Adds read-only Nextcloud metadata fields in an admin sidebar group
  • Syncs custom metadata through WebDAV property updates
  • Tracks sync status and errors per document

Use cases

  • Keep Payload media in a self-hosted Nextcloud instead of local disk or a public cloud
  • Share uploaded files through Nextcloud public links from a Payload collection

From the author

A Payload CMS plugin that integrates Nextcloud as a storage adapter

Installation

npm i payload-nextcloud

2

Stars

0

Forks

0

Open Issues

1 years ago

Last Updated

11

Weekly Downloads

v0.1.0

npm Version

108.6 KB

Unpacked Size

2

Dependencies

GitHub stars

20 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 20262
Dec 4, 20262
Dec 3, 20262
Dec 2, 20262
Dec 1, 20262
Nov 30, 20262
Nov 29, 20262
Nov 28, 20262
Nov 27, 20262
Nov 26, 20262
Nov 25, 20262
Nov 24, 20262
Nov 23, 20262
Nov 22, 20262
Nov 21, 20262
Nov 20, 20262
Nov 19, 20262
Nov 18, 20262
Nov 17, 20262
Nov 16, 20262
Nov 15, 20262
Nov 14, 20262
Nov 13, 20262
Nov 12, 20262
Nov 11, 20262
Nov 10, 20262
Nov 9, 20262
Nov 8, 20262
Nov 7, 20262
Nov 6, 20262
Nov 5, 20262
Nov 4, 20262
Nov 3, 20262
Nov 2, 20262
Nov 1, 20262
Oct 31, 20262
Oct 30, 20262
Oct 29, 20262
Oct 28, 20262
Oct 27, 20262
Oct 26, 20262
Oct 25, 20262
Oct 24, 20262
Oct 23, 20262
Oct 22, 20262
Oct 21, 20262
Oct 20, 20262
Oct 19, 20262
Oct 18, 20262
Oct 17, 20262
Oct 16, 20262
Oct 15, 20262
Oct 14, 20262
Oct 13, 20262
Oct 12, 20262
Oct 11, 20262
Oct 10, 20262
Oct 9, 20262
Oct 8, 20262
Oct 7, 20262
Oct 6, 20262
Oct 5, 20262
Oct 4, 20262
Oct 3, 20262
Oct 2, 20262
Oct 1, 20262
Sep 30, 20262
Sep 29, 20262
Sep 28, 20262
Sep 27, 20262
Sep 26, 20262
Sep 25, 20262
Sep 24, 20262
Sep 23, 20262
Sep 22, 20262
Sep 21, 20262
Sep 20, 20262
Sep 19, 20262
Sep 18, 20262
Sep 17, 20262
Sep 16, 20262
Sep 15, 20262
Sep 14, 20262
Sep 13, 20262
Sep 12, 20262
Sep 11, 20262
Sep 10, 20262
Sep 9, 20262
Sep 8, 20262
Sep 7, 20262
Sep 6, 20262
npm weekly downloads

10+3 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 202610
Dec 4, 202610
Dec 3, 20269
Dec 2, 20269
Dec 1, 202610
Nov 30, 202611
Nov 29, 20265
Nov 28, 20264
Nov 27, 20264
Nov 26, 20264
Nov 25, 20264
Nov 24, 20263
Nov 23, 20262
Nov 22, 20263
Nov 21, 20263
Nov 20, 20262
Nov 19, 20264
Nov 18, 20265
Nov 17, 20265
Nov 16, 20268
Nov 15, 20267
Nov 14, 20267
Nov 13, 20269
Nov 12, 20269
Nov 11, 20268
Nov 10, 20268
Nov 9, 20265
Nov 8, 20265
Nov 7, 20265
Nov 6, 20263
Nov 5, 20262
Nov 4, 20262
Nov 3, 20262
Nov 2, 20265
Nov 1, 20265
Oct 31, 20265
Oct 30, 20265
Oct 29, 20264
Oct 28, 20264
Oct 27, 20265
Oct 26, 20263
Oct 25, 20262
Oct 24, 20262
Oct 23, 20262
Oct 22, 20263
Oct 21, 20263
Oct 20, 20262
Oct 19, 20261
Oct 18, 20262
Oct 17, 20263
Oct 16, 20263
Oct 15, 20263
Oct 14, 20263
Oct 13, 20263
Oct 12, 20263
Oct 11, 20263
Oct 10, 20262
Oct 9, 20262
Oct 8, 20261
Oct 7, 20261
Oct 6, 20261
Oct 5, 20261
Oct 4, 20260
Oct 3, 20260
Oct 2, 20260
Oct 1, 20260
Sep 30, 20260
Sep 29, 20261
Sep 28, 20261
Sep 27, 20262
Sep 26, 20265
Sep 25, 20265
Sep 24, 20265
Sep 23, 20265
Sep 22, 20265
Sep 21, 20265
Sep 20, 20265
Sep 19, 20262
Sep 18, 20262
Sep 17, 20263
Sep 16, 20264
Sep 15, 20263
Sep 14, 20265
Sep 13, 20265
Sep 12, 20268
Sep 11, 20268
Sep 10, 20267
Sep 9, 20268
Sep 8, 20268
Sep 7, 20268
Sep 6, 20267

Each point is npm's rolling 7-day download count.

Health Score

35/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1093935074-root.svg)](https://payloaddirectory.dev/plugins/1093935074-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1093935074-root"><img src="https://payloaddirectory.dev/badge/1093935074-root.svg" alt="Payload Directory"></a>
Updated Nov 11, 2025Created Nov 11, 2025Published Nov 11, 2025

README

payload-nextcloud

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

  • Upload files to Nextcloud via WebDAV
  • Optional public share link creation (sets nextcloud.share_url on uploaded document)
  • Exposes a direct WebDAV URL (nextcloud.webdav_url) for internal use
  • Adds an admin sidebar group with Nextcloud metadata and sync status fields

Requirements

  • Payload ^3.37.0 (peerDependency)
  • Node 18+ (or 20+)
  • A Nextcloud account and preferably an App Password (token)

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

  • A nextcloud group in the sidebar with read-only fields:
    • fileId, path, name, size, mimeType, etag, lastModified, permissions, isDirectory
    • webdav_url (direct WebDAV path)
    • share_url (public link if sharing succeeds)
  • A custom_metadata group (optional editable fields you can sync via WebDAV PROPPATCH)
  • A sync_status group to track last sync and errors

Public share links

  • On successful upload, the plugin attempts to create a public share via Nextcloud OCS API.
  • If successful, nextcloud.share_url will be set to the base public link.
  • If you prefer a direct binary URL, consider using ${share_url}/download in your app.

Nextcloud app password guidance

  • Strongly recommended: create an App Password in Nextcloud and use it as your token.
    • Nextcloud: Settings → Security → Create new app password → copy the generated password
    • Use that value as NEXTCLOUD_TOKEN; do not share your main account password
  • OCS API requires the OCS-APIRequest: true header and Basic auth—we handle this internally.
  • For self-signed certificates in dev, you can temporarily set verifyTLS: false (avoid in production).

Development notes

  • This package’s top-level exports point to dist, not src.
  • You need to build before running the dev project:
    • pnpm build
    • pnpm dev
  • The dev 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.

Similar plugins