This example configures a single Org file ‘/path/to/inbox.org’ to sync with a single calendar (with ID ‘CALENDAR-ID’) located on a Nextcloud server at ‘NEXTCLOUD-SERVER-URL’.
(require 'org-caldav) ;; URL of the caldav server (setq org-caldav-url "https://NEXTCLOUD-SERVER-URL/remote.php/dav/calendars/USERID") ;; calendar ID on server (setq org-caldav-calendar-id "CALENDAR-ID") ;; Org filename where new entries from calendar stored (setq org-caldav-inbox "/path/to/inbox.org") ;; Additional Org files to check for calendar events (setq org-caldav-files nil) ;; Usually a good idea to set the timezone manually (setq org-icalendar-timezone "Europe/Berlin")