You can synchronize user accounts between ISPConfig and a Nextcloud installation. When a new email user is created in ISPConfig, a corresponding user is automatically created in Nextcloud. The login then takes place with the email address and the corresponding password. Of course, the login also works with email users that have already been created.
Installation with the website wizard
If you have installed Nextcloud with our web wizard, you do not have to worry about the installation and can setup the Nextcloud instance in ISPConfig now.
Manual installation
Install app
First log in to Nextcloud as an admin and install the ISPConfig API Backend app.
Create remote user in ISPConfig
Log in to ISPConfig and create a new remote user under System / User Management.

You can freely choose the user name and password, and you should allow remote access.
Under Functions, select Nextcloud client functions, Nextcloud mail functions and Nextcloud server functions.
Configure Nextcloud API backend
To enable authentication with ISPConfig, you need to extend the Nextcloud configuration file in config/config.php. With this basic configuration, every mail user can authenticate with their email address or a user-defined login name and password and create a new Nextcloud account when logging in for the first time.
<?php $CONFIG = array( // [ ... ], 'user_ispconfig_api' => array( 'location' => 'https://host.domain.tld:8080/remote/index.php', 'uri' => 'https://host.domain.tld:8080/remote/', 'user' => 'remote_user', 'password' => 'secure_remote_user_password', ), );
For location and uri, replace host.domain.tld with the address under which you can log in to ISPConfig.
Setup the Nextcloud instance in ISPConfig
Create Nextcloud Secret
Log in to Nextcloud as an admin and go to “Personal settings / Security”. Enter the app name (e.g. ispconfig) and click on “Create new app password”. Copy the newly created password.
Configure ISPConfig
In the server config, select a mail server that you want to synchronize with Nextcloud.
Open the Nextcloud section, enter the address of your Nextcloud installation, the name of the admin user for Nextcloud and the APP password you have just created.
