This Backend allows users to sign in with their email or custom login name using the ISPConfig 3 Control Panel API.
IMPORTANT: This APP requires the installation of a plugin in the ISPConfig 3 Control Panel. ISPConfig - Nextcloud Plugin
For a user with this email user@happy.tld
and Nextcloud running in the subdomain cloud.domain.tld
, the Federated Cloud ID will have this format:
user.happy.tld@cloud.domain.tld
(This can't be changed)
Just install it from your Nextcloud application catalogue.
Clone this repository into your Nextcloud apps directory:
cd /var/www/nextcloud/site/apps/
git clone https://github.com/mediabox-cl/nextcloud-user-ispconfig-api.git user_ispconfig_api
chown -R www-data:www-data user_ispconfig_api
Install it as usual from admin app list or CLI with:
cd ..
sudo -u www-data php occ app:install user_ispconfig_api
sudo -u www-data php occ app:enable user_ispconfig_api
Update the cloned repository in your Nextcloud apps directory:
cd /var/www/nextcloud/site/apps/user_ispconfig_api
git pull
cd ..
chown -R www-data:www-data user_ispconfig_api
Update the Nextcloud APP:
cd ..
sudo -u www-data php occ upgrade
This backend uses the ISPConfig 3 SOAP API. Thus, it requires credentials for a legitimate remote API user.
In your ISPConfig 3 control panel go to System > Remote Users
and create a new user
with permissions for Server functions
, Mail domain functions
and Mail user functions
.
Note: I recommend to restrict the allowed client IP to the Nextcloud server IP.
Along with that, you have to provide the SOAP API Location and Uri.
If you didn't modify it, these should be:
https://host.domain.tld:8080/remote/index.php
https://host.domain.tld:8080/remote/
To finally enable authentication against the ISPConfig 3 API, you need to add it
to your Nextcloud config file in config/config.php
.
Using this basic configuration will allow any mail user to authenticate with
their email address or custom login name and password and will create a new Nextcloud account on first login.
<?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',
),
);
Now you must follow the instruction to install the ISPConfig - Nextcloud Plugin
Ensure you have the PHP SOAP
extension installed and activated.
ERROR: PHP soap extension is not installed or not enabled
php-soap
extension installed:php -m | grep soap
The soap
output indicates SOAP is installed, if not:
sudo apt update && sudo apt install php-soap -y
For Apache, enable the module and restart the service and for PHP FPM just restart the service.