{"id":1265,"date":"2025-12-18T17:58:40","date_gmt":"2025-12-18T15:58:40","guid":{"rendered":"https:\/\/valentijn.sessink.nl\/?p=1265"},"modified":"2025-12-18T18:01:41","modified_gmt":"2025-12-18T16:01:41","slug":"publish-a-thunderbird-calendar-in-nextcloud","status":"publish","type":"post","link":"https:\/\/valentijn.sessink.nl\/?p=1265","title":{"rendered":"Publish a Thunderbird Calendar in Nextcloud"},"content":{"rendered":"\n<p>I have a calendar in Nextcloud that I want to publish. Let&#8217;s call it <strong>Party<\/strong>. I want this to be a <strong>public link<\/strong> and have a <strong>readable name<\/strong>. I want it to be <strong>read-only<\/strong>. Sharing it directly from within the Calendar app in Nextcloud will unfortunately give users opportunity to use the caldav entity of the calendar &#8211; i.e. write in it. So what do we do?<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Obviously, this is a task for an .ics document: a bit of a convoluted (but what standard isn&#8217;t, these days), but still quite usable document format for read-only calendar information.<\/p>\n\n\n\n<p>All the pieces of the puzzle are all there. Thunderbird can <a href=\"https:\/\/support.mozilla.org\/en-US\/kb\/exporting-and-sharing-a-calendar\">export a calendar to a webdav share<\/a>. Nextcloud will gladly share your document read-only and any other calendar application with .ics compatibility can then import your calendar.<\/p>\n\n\n\n<p>However, there are a couple of challenges. Nextcloud normally will not export a file with a nice name and if you do enable the &#8220;custom share tokens&#8221; setting, it will not let you add a dot, so if we want a <code>PartyCalendar.ics<\/code> file, that is out of bounds. Also, Thunderbird doesn&#8217;t seem to bother with the CN or NAME parameter in an .ics document, and simply names your calender after the name of the link. If that&#8217;s <code>gci7GRLdRkFSnjk<\/code>, your parties will show up in a calendar with that very name.<\/p>\n\n\n\n<p>So here&#8217;s what we&#8217;ll do. In Nextcloud:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set the <em>Allow users to set custom share tokens<\/em> setting in our nextcloud instance to <strong>Yes\/ON\/Ja\/True<\/strong> at <code>https:\/\/example.com\/settings\/admin\/sharing<\/code><\/li>\n\n\n\n<li>Setup a new Nextcloud directory<\/li>\n\n\n\n<li>Share it, read-only. This is share number 1.<\/li>\n\n\n\n<li>Change the link name to something pretty, like Partyhouse\n<ul class=\"wp-block-list\">\n<li>As a side note: you <em>may<\/em> turn off the custom share tokens immediately afterwards, the Partyhouse name will remain active<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Create yet another share link to the same directory, this time read-write, adding a password to it. This is share number 2. Leave this link as is.<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s assume your <strong>read-only<\/strong> link, number 1, is <code>https:\/\/example.com\/s\/Partyhouse<\/code> Your <strong>read\/write<\/strong> link, number 2, is <code>https:\/\/example.com\/s\/gci7GRLdRkFSnjk<\/code> with password <code>g;xa@hmqg{<\/code>.<\/p>\n\n\n\n<p>In Thunderbird:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the Calendar tab (Events and tasks &#8211; Calendar or simply type ctrl-3)<\/li>\n\n\n\n<li>Make a new calendar: On My Computer, name it anything you like, for example MyParty.<\/li>\n\n\n\n<li>Add all your partying events to this calendar.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Nextcloud documentation<\/h2>\n\n\n\n<p>We are almost ready now, but the Nextcloud documentation is a bit iffy. If your Nextcloud instance is at <code>https:\/\/example.com\/<\/code> and you have a public share with the value of <code>https:\/\/example.com\/s\/gci7GRLdRkFSnjk<\/code>, then the <a href=\"https:\/\/docs.nextcloud.com\/server\/latest\/user_manual\/en\/files\/access_webdav.html#accessing-public-shares-over-webdav\">documentation<\/a> tells you that the webdav share is accessible through <code>https:\/\/example.com\/public.php\/dav\/files\/gci7GRLdRkFSnjk<\/code>. This turns out to be <strong>unusable<\/strong> because Thunderbird will not recognize the username\/password obligation and simply refuse with a 401 (or so).<\/p>\n\n\n\n<p>So in Thunderbird, right click on the new calendar, choose Publish Calendar. For publishing URL use <code>https:\/\/example.com\/public.php\/<strong>webdav<\/strong>\/PartyCalendar.ics<\/code>. The last part will become the name of your calendar document. Now you may wonder: isn&#8217;t this a very generic publishing URL? Well in fact: it is. But a dialog will pop up, asking for a <em>username<\/em> and a <em>password<\/em>. For username, use the last part of the sharing URL, i.e. in our example it is <code><strong>gci7GRLdRkFSnjk<\/strong><\/code>. For password, fill in the password for share number 2, in our case <code><strong>g;xa@hmqg{<\/strong><\/code>.<\/p>\n\n\n\n<p>Click on the Publish button. If everything is fine, the button changes to &#8220;Close&#8221; and you&#8217;re done.<\/p>\n\n\n\n<p>Now your calendar can be found on the other, public, link, i.e. on <code>https:\/\/example.com\/s\/Partyhouse\/PartyCalendar.ics<\/code><\/p>\n\n\n\n<p>Happy partying!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a calendar in Nextcloud that I want to publish. Let&#8217;s call it Party. I want this to be a public link and have a readable name. I want it to be read-only. Sharing it directly from within the Calendar app in Nextcloud will unfortunately give users opportunity to use the caldav entity of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,22],"tags":[195,197,198,9,203,32,194],"class_list":["post-1265","post","type-post","status-publish","format-standard","hentry","category-happy-hacking","category-vrije-software","tag-caldav","tag-ical","tag-lightning","tag-linux","tag-nextcloud","tag-open-source","tag-thunderbird"],"_links":{"self":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1265"}],"version-history":[{"count":8,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1265\/revisions"}],"predecessor-version":[{"id":1273,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/1265\/revisions\/1273"}],"wp:attachment":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}