How to integrate Unikname Connect with Nextcloud cloud solution?

Despite the lack of official documentation on the integration of the famous Nextcloud solution, here are some tips to guide you through a manual integration.

:pen: How to integrate Nextcloud with Unikname Connect?

1. Choose and install an official OpenID Connect plugin of Nextcloud from the plugin repository

We know that successful configurations have been done with this plugin:

You can also browse all OpenID Connect plugins for Nextcloud if you want to try another plugin.

Please, let us know if you succeed with another one!

2. Configure the plugin with the generic OpenID Connect information for Unikname Connect

Please, follow this official guide:

:rotating_light: :warning: Don’t forget to check the pre-requisites!

Here is the configuration of the plugin you can use:

'oidc_login_provider_url' => '',
'oidc_login_client_id' => 'provided by Unikname',
'oidc_login_client_secret' => 'provided by Unikname',
'oidc_login_button_text' => 'Se connecter avec votre @unikname',
'oidc_login_disable_registration' => false,

3. Special instructions for URL verification

Allow an URL_Checker to verify your domain

For this, you need to edit the following file (we assume you’ve followed the standard Nextcloud installation process on Apache): /var/www/nextcloud/.htaccess

Edit and comment 2 lines:

They should look like that:

#    RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
#    RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]

Save and you can then launch the URL verification process.

Which URL verification method to choose between “html tag” and “file upload”?

You must choose the “file upload” verification method, as there isn’t any known way to modify the current template of Nextcloud to add the meta hml tag in all Nextcloud pages.

:rotating_light: :warning: :rotating_light: :warning: :rotating_light: :warning: :rotating_light: :warning: :rotating_light:
After a successful URL verification, you must revert the above configuration.
Especially if you’re using TLS certificates generated by Let’s Encrypt, certificate renewals won’t work anymore!
So don’t forget to uncomment the previously commented lines.

Of course, you need a Unikname Connect account to be able to finalize the set up of your application:

That’s it! :clap:

:interrobang: How to get help?

If you have questions or need help to do this integration, just ask below :arrow_down: :grin: