Thunderbird Lightning - CalDav

when i add new calendar subscription to Thunderbird Lightning Calendar extension calendar and tasks does not sync. I used Fiddler to see where is a problem and I found out that server replies with the folowing error after request with authorization header is sent.

I also tried https://domain/remote.php/dav/calendars/username/calendar_name/ type of URL with same result.
I use 2 step authentication so i had to generate api password on personal page. (However I also tried non-2step auth account) Does anyone know how to get it working?

Nextcloud 12.0.3
Lightning 5.4.4
No error logs related to this issue.


Lightning doesn’t support Autodiscovery of calendars. I’m afraid you have add each calendar one by one.
You can use the calendar link you can find for each calendar in the three dot menu.

1 Like

Thanks for your reply. Problem persists after I used direct calendar URL.

What am I doing wrong?

You can’t use OAuth API keys, you have to generate app passwords. You can generate them in your personal settings


I was generating password for Music App API. Thanks for your help.

this is very interesting for me. I have tried to connect two NextCloud calendars to Lightning for several month now. Usually i succeed with one calendar, but i don’t succeed with two.
Where do i have to go (to be in my personal settings) and what do i do to generate app passwords?
By the way: what is the email adress used for in the calendar settings?
Should there be a manual containing the informations a hint where i can find the help would be sufficient.

In Settings (upper right button) in the Personal (upper) section click Security
Or navigate your browser to: yourcloudurl/index.php/settings/user/security
It contains a (pobably) long list of client connections.
Scroll down to the bottom.
Set a name (e.g." Thunderbird Lightning") and Click Add app password
Copy the auto generated password for your current user.

In Thunderbird/Lightning, when it prompts you to enter the password for CalDav, paste the app password.
check the save password box so you don’t have to note it down.

I also felt pretty lost about this. Especially because Lightning happened to be able to connect the calendars once somewhere in the very beginning. So I expected a more sophisticated problem.


I’ve read a lot and tried different things, but I cannot manage to do it…

  1. I copy the link from the dots menu in Calendars.
  2. I’ve set up an application password in the Security menu.
  3. I put everything into Lightning using:
    3a) my username and my user password
    3b) my application name (i.e. Thunderbird) and application password
    and two combinations that are left, always obtaining the same error:

[calCachedCalendar] replay action failed: null, uri=http://(…), result=2147500037, operation=[xpconnect wrapped calIOperation]

I’m a bit tired with it after few weeks of trying once for a while… I would really appreciate some help. Thanks a lot in advance

1 Like

Thanks! Years later (NC 21, TB 78) this helped me to massively improve responsiveness of NC calendars in Thunderbird.