Create new calendars using Lightning (without the GUI)

Hello,

when I want to create a new calendar, I log into the GUI, create the calendar, copy the URL and subscribe to that URL using a CalDAV client, eg. Lightning.

But what is needed to be done, if users don’t have access to the GUI? If they are restricted to CalDAV? is there any way to create new calendars using a CalDAV-Client, eg Lighting, without the need to log into the GUI?

I dont have any solution, but I am curious for what scenario you would need something like this.

Some people don’t want to put every kind of dates and meetings in one calendar. They would like to separate work from leisure from sports, or whatever. This separation does come handy, if you are using different devices in work and in private and you simply don’t want your private dates to appear on your working screen or vice versa.

You lost me here, your question was about creating calendars. The scenario you describe is about separating calenders.
You can create multiple calendars on nextcloud, which is perfect for your scenario.

Yes, I know I can create new calendars in NC, as much as I want to use. But my question is, how to create a new calendar without having to log into the GUI, simply by using some client program or app, that can create a new remote calendar on the NC server.

> ./occ dav:create-calendar --help
Description:
  Create a dav calendar

Usage:
  dav:create-calendar <user> <name>

Arguments:
  user                  User for whom the calendar will be created
  name                  Name of the calendar

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --no-warnings     Skip global warnings, show command output only
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Yes, of course you can do that — assuming you have shell access to the server and the necessary admin rights. But how do you create a new calendar when you are just having access to the client machine?

In other words: I am using my PC, the NC server is not reachable, neither physically nor via SSH, I am looking at Thunderbird/Lightning or any other calendar app, and I want to create a new calendar, that will be stored in NC.

The only way I know, is to write to the server’s admin and asking him/her to create that new calendar for me. What was needed, would be a program or an app, that can remotely create new calendars without the need of shell access to the server.

Afaik, it is not possible to create a new calendar using CalDAV at the moment. The usual way to create new calendars in Nextcloud is using the web gui :wink:

With the standard calendar app coming with iOS, a new calendar can be created (if a caldav account is setup on the iOS device):
Open Calendar app , tap „calendars“ and then tap „add“. A new calendar will be created on the Nextcloud server (just tested with iOS 13.2 against Nextcloud 16.0.5).

It is possible to create a new calendar via caldav:
https://tools.ietf.org/html/rfc4791#section-5.3.1

1 Like

Yes I know, but my attempt to create a new calendar using Thunderbird/Lightning failed.
I’ve now repeated my test using DAVx5@Android and it succeeds! So it seems to be a Thunderbird/Lightning deficiency and not a Nextcloud problem.

@weka If you stick to Thunderbird/Lightning you should think about opening an issue ticket in their repository.

The reason is obvious :
In Lightning/Thunderbird, you add each calendar separately with an address kind of https://cloud.example.com/remote.php/dav/calendars/User/personal/ .
This method connects to a specific calendar in the CadDAV server

In DAVx5, you add the primary CadDAV address (https://cloud.example.com/remote.php/dav/), and it’s the same with iOS & macOS (https://cloud.example.com/remote.php/dav/principals/users/User/).
So these methods connect to the CadDAV server and ask which calendars are available to sync.
That’s why these solutions are able to add a new calendar and Lightning is not.

Maybe with Lightning/Thunderbird, you could try if you don’t connect to CadDAV “natively” but through an extension like TbSync (https://addons.thunderbird.net/en-US/thunderbird/addon/tbsync/?src=cb-dl-updated) AND Provider for CadDAV & CardDAV (https://addons.thunderbird.net/en-US/thunderbird/addon/dav-4-tbsync/?src=cb-dl-updated).

1 Like

Thanks for the link to these two addons! I will try them as soon as TB68 is available for my Linux distribution. Until now, I am stuck at TB60. If I find the time, I will try to download TB68 or higher from Mozilla and run it as a third party program.