Nextcloud - bcgov/common-service-showcase GitHub Wiki

Note: This summary of Nextcloud focuses on how it could fit into the CSS Team's DOMO (Document Management) project.

Licence and Cost

  • Opensource (licensed under the GNU AGPLv3)
  • self-hosted
  • Enterprise version is a paid subscription to a support service. see the FAQ - Enterprise-related question
  • It is pre-configured, optimized and hardened for the special needs of large scale, production-critical enterprise deployments
  • See Enterptise pricing

Architecture

  • Nextcloud server (Unix OS, Apache or nginx webserver, PHP runtime, MySQL/Postgres,..)
  • WebDAV and other APIs enable integration with third party applications
  • Can be extended using 'apps' (contributed modules)
  • has a web interface (Javascript, JQuery, Vue)
  • Monitoring and logging streams
  • Can use OIDC Connect to manage Nextcloud users and Authentication (see: https://www.schiessle.org/articles/2020/07/26/nextcloud-and-openid-connect/)
  • REDIS caching server can be used to speed up data access and lower the load on the database.

Features

  • more geared towards users managing/syncing files
  • drop-box type user interface
  • Has Desktop and Mobile installed clients (like drop-box) for managing/syncing files
  • file versioning

Object Storage

  • Storage can either be mounted on the server or through the Nextcloud interface.
  • Configure Nextcloud Server to use S3 object storage for its primary or external file storage
  • You can allow users to mount external storage
  • Uses wes/aws-sdk-php to speak to S3-compatible storage
  • If used as Primary storage, you can mount to multiple buckets or one bucket per user.
    • Object storage performance characteristics make it most suitable for archival or streaming of large files
    • Multi-bucket seems to also overcomes performance limitations of single bucket
    • a report that Nextcloud may be slow and unreliable while browsing files stored on external storage or uploading content.
    • One can extend the 'External Storage Support' app (module) if neccessary
  • Usage of Amazon S3 or a compatible object storage can be secured through server side encryption on the Nextcloud server
  • The optional full text search feature requires an Apache Solr Java servlet

Resources

  • Demo (Instant Trial > password is demo)

Nextcloud Client APIs

Client APIs - could be used by a government app to run file operations on a centralised Nextcloud server.

  • OCS API (a mixtrue of Webdav and REST, developed by Nextcloud)

    • has a more features than just WebDav, for file managing, sharing and other collaboration tools
    • Sharing REST API.
  • Webdav API (an extension of http protocol)

    • access files with: http://localhost:8080/remote.php/dav/files/admin/
    • file-related operations, sharing, versioning, basic searchs
    • Requests authenticated with Basic Auth or session cookies
    • eg: Upload a file:
      • PUT https://demo1.nextcloud.com/remote.php/webdav/test-file-upload.txt
      • do a PROPFIND request that returns XML about a file
      • or GET storage details that returns JSON

Proof of Concept

Evaluation

  • while very useful for governement staff, does not typically serve as an API for service client applications.
⚠️ **GitHub.com Fallback** ⚠️