How connect Nextcolud Address book to Roundcube address book server side (no user intervention)

Hi Friends,
we are an Italian association and offer email and nextcloud sync services to our associates.
We would like to connect Nextcolud Address book to Roundcube address book, but server side, making sure that no user intervention is required.

We have seen https://plugins.roundcube.net/packages/roundcube/carddav, but we wonder if this is the way to allow synchronization without user intervention.

Should this possible?

Many thanks!

Davide

2 Likes

Yes, that’s exactly the way how I have successfully implemented it, but the address books still need to be configured once on a per user base using individual app passwords.

Even if the username and password were the same between Nextcloud and Roundcube (email account)?

Thanks again!

Davide

I will work too, but it would prevent you from introducing/enabling e.g. 2FA authentication for the users at a later stage. That’s the reason why I recommend to use app passwords by default for such functions. Additionally I find it easier to track which login has been used at what time.

Enabling bidirectional sync from Nextcloud to Roundcube, without user intervention is possible.
This behavior need to customize Roundcube plugin “carddav/config.inc.php” and that password and username match both in RC and NC!

Here an example of Roundcube cardav plugin configuration setting:

// Only, If you do not want your users to add (additional) custom carddav addressbooks
$prefs['_GLOBAL']['fixed'] = true;

// Example preset which is similar to what you will need:
$prefs['Personal'] = array(
	'name'         =>  'Personal',
	// will be substituted for the roundcube username
	'username'     =>  '%u', 
	// will be substituted for the roundcube password
	'password'     =>  '%p',
	// %u will be substituted for the CardDAV username
	'url'          =>  'https://server.example/nextcloud/remote.php/dav/addressbooks/users/%u/contacts/',

	'active'       =>  true,
	'readonly'     =>  false,
	'refresh_time' => '02:00:00',

	'fixed'        =>  array( 'username' ),
	'hide'        =>  false,
);
2 Likes