Nextcloud automatically generates a birthday calendar from a user’s contacts. Unfortunately older contact cards that have been carried over through various Nextcloud version upgrades can result in duplicate entries.

Overview

This issue (documented under #1506 and #1902) is a long-standing one on GitHub but has a straight-forward server-side fix proposed by Micha-Btz.

  • Delete affected user’s birthday calendar using the web interface
  • Run the occ command line utility to regenerate birthday calendar

Deleting the affected user’s birthday calendar using the web interface

Navigate to your https Nextcloud instance, log in as the affected user and delete the Contact Birthdays calendar.

Make use of the occ command line utility by navigating to the root installation folder of your Nextcloud instance and, using your appropriate web-user and php installation run the following:

sudo -u www-data php7.4 occ dav:sync-birthday-calendar username

www-data, php7.4 and username may be substituted for values appropriate to your installation.

That’s all there is to it.