en En
es Es

Integration with Nextcloud

Nextcloud is a platform for creating private cloud storage (similar to Google Drive or Dropbox) that can be deployed on your own servers. It allows users to store files, share them, and collaborate. The BILLmanager and Nextcloud integration module allows hosting providers to:

  • automate the sale of disk space as a service;
  • manage Nextcloud user quotas directly from BILLmanager;
  • configure the sale of disk space: 
    • by fixed volume;
    • based on usage statistics.

Integration is implemented via an external pmnextcloud service processing module that interacts with the Nextcloud API. Main components for integration are:

  • service handler in BILLmanager with the product type "Backup";
  • external script for installation from the bill-nextcloud repository, providing communication between BILLmanager and the Nextcloud API;
  • Nextcloud API for user and quota management.

Installation and configuration requirements for integration

Integration is configured as part of creating a service handler in BILLmanager.

General requirements

To correctly integrate Nextcloud with BILLmanager, the following conditions must be met:

  • one instance of Nextcloud can only be used for one BILLmanager platform. Each BILLmanager platform creates accounts starting with id 1 (user_1), which leads to name conflicts and prevents correct operation.
  • It is recommended to use isolated environments. For Nextcloud, this can be achieved in one of two ways:
    • running in docker container;
    • installing on a separate physical or virtual server.

Nextcloud installation requirements

The following conditions must be met for the successful installation and configuration of the Nextcloud platform:

  • a server for installing the Nextcloud platform or running a Docker container with command line access. For more information about Nextcloud server requirements, see the official Nextcloud documentation.
  • the following utilities must be installed on the server:
    • git;
    • bash;
    • curl or wget.     
  • Internet access to clone the repository.

Nextcloud side configuration

To set up the integration on Nextcloud's end:

  1. Install the Nextcloud platform using one of the following ways:

  2. Log in to the platform interface and generate an application password to access the API: in the upper right corner, open Platform administrator profile Personal settingsSecurityApplication passwords → specify any application name → Create application password

BILLmanager side configuration

Installing the module

Before you start configuring the interface:

  1. If you are using BILLmanager version lower than 6.128.0, please update the platform. For more details, see the Upgrade article.
  2. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  3. Clone the repository:
    git clone https://github.com/LC208/bill-nextcloud.git
  4. Navigate to the directory with the module:

    Sample command for navigation
    cd /usr/local/mgr5/src/bill-nextcloud
  5. Launch the installation:

    Installation script
    sh install.sh

Connecting the handler

To create a service handler, go to IntegrationProcessing modules Add button:

  1. Product type: Backup.
  2. Processing module: Nextcloud.
  3. Integration settings:
    1. URL-address — enter the URL address of the Nextcloud dashboard home page. For example, http://my.panel.example.
    2. Client ID — enter your Nextcloud username;
    3. Password — enter the password to access the API.
  4. Processing module settings. Configure the internal (within BILLmanager) parameters of the service handler:
    1. Name — Enter the name of the handler that will be displayed in the interface. Mandatory field.
    2. Responsible — choose the department to which tasks from the handler will be assigned;
    3. Sorting — enter a value for the sorting parameter. The lower the value, the higher the position in the list. If there are several handlers with the same sorting priority, they will be sorted alphabetically.

Setting the tariff

To set up a tariff:

  1. Go to ProductsTariff plansAdd button:
    1. Product type — select Backup.
    2. Tariff plan parameters:
      1. Processing module — select the handler you created for Nextcloud..
      2. Internal name nextcloud
      3. Handler settings:
        1. User group — select the group that will be assigned to the user account when it is created in Nextcloud.
  2. Disable the "Cloud disk" and "Local disk" parameters in the tariff content. They are added by default for the "Backup" product type, but are not processed by the Nextcloud module. To disable the parameters, go to ProductsTariff plans → choose tariff → Options → choose parameter → Disable button.

For more information on creating tariff plans, see About tariff plan configuration article.

Product type parameters

To manage default settings, go to ProductsProduct typesBackupParameters button → select the parameter you want to change → click the Edit button. For more details, see Product types.

The main parameters of the product should not be changed by the client. To prevent the client from making changes, select Staff member or Superuser in the Edit permissions field in the parameter settings.

Key product parameters:

Internal parameter nameDescription
userpasswordNextcloud user password
usernameNextcloud username
urlURL address of the Nextcloud platform home page
disk
disc
service name of the add-on “Disk Space”

Statistical data collection

Statistics are collected for the following items:

  • disk;
  • disc.

The cron scheduler task statdaily.cron is responsible for collecting statistics. Statistics for the same date are summarized.

Logging

The log of BILLmanager interaction with the Nextcloud handler is stored in the file /usr/local/mgr5/var/pmnexctloud.log 

The article was last updated on 08.05.2025. The article was prepared by technical writers of ISPsystem