Calendars
People connect their calendars in Settings → Calendars. Their upcoming events show in the apps’ sidebar, and each event opens meeting notes of its own, a page in the Meetings database with the event’s title, time, attendees and video call. How it looks to people is in Calendars.
| Calendar | How people connect it | What the server needs |
|---|---|---|
| Google Calendar | Sign in at Google | An OAuth client you register, [calendars.google] |
| Outlook.com and Microsoft 365 | Sign in at Microsoft | An app registration, [calendars.microsoft] |
| Nextcloud | Sign in at their Nextcloud, which hands Drusite a password of its own (Login Flow v2) | Nothing |
| Any CalDAV server (iCloud, Fastmail, Radicale, Baïkal…) | Address, user name and an app password | Nothing |
A calendar’s address (webcal, .ics) | The address | Nothing |
Without the OAuth apps, people can still add Google’s and Outlook’s calendars by their secret iCal address, read-only and a little behind.
What’s kept, and where
- A connection belongs to the person, not a workspace: every device of theirs sees the same.
- What it signs in with (a refresh token, an app password, a feed’s address, which is often secret) is sealed with the account’s data key, as AI provider keys are, so a database dump holds ciphertext. It’s opened only for the request that needs it, and never sent to an app.
- Events are never stored. A device asks for the next two weeks; the server fetches them from each calendar and passes them on. It keeps the answer in memory for a minute, so the person’s other devices needn’t fetch again, and nothing else. So events aren’t at rest on the server, whatever workspace their meeting notes end up in; a meeting note in an end-to-end encrypted workspace is encrypted on the device as any page is.
- Calendars are only read. The scopes asked for are
calendar.readonly(Google) andCalendars.Read(Microsoft).
Google Calendar
-
In the Google Cloud console, make a project (or pick one) and enable the Google Calendar API (APIs & Services → Library).
-
OAuth consent screen: user type External (or Internal, for a Google Workspace of your own), your app’s name, and the scope
.../auth/calendar.readonly. While the app is in Testing, add the Google accounts that will connect as test users; publish it to let anyone connect. Google may ask to verify an app that asks for calendar scopes before it’s published. -
Credentials → Create credentials → OAuth client ID, of type Web application, with the authorised redirect URI
https://notes.example.com/api/v1/calendars/oauth/callbackwhere
https://notes.example.comis yourpublic_url. -
Give the server the client’s ID and secret:
[calendars.google] client_id = "1234-abc.apps.googleusercontent.com" client_secret_file = "/run/secrets/drusite/google-client-secret"
Outlook and Microsoft 365
-
In the Microsoft Entra admin center, App registrations → New registration. For people with personal accounts (Outlook.com) as well as work and school ones, choose Accounts in any organizational directory and personal Microsoft accounts.
-
Redirect URI: platform Web,
https://notes.example.com/api/v1/calendars/oauth/callback. -
API permissions → Add → Microsoft Graph → Delegated:
Calendars.Read,User.Readandoffline_access. An organisation’s admin may need to grant consent for its users. -
Certificates & secrets → New client secret; note its value (it’s shown once) and when it expires.
-
Give the server the Application (client) ID and the secret:
[calendars.microsoft] client_id = "00000000-0000-0000-0000-000000000000" client_secret_file = "/run/secrets/drusite/microsoft-client-secret" # common (personal and any organisation's accounts), consumers, organizations, or a tenant ID tenant = "common"
When the secret expires, connections stop working and people are asked to connect again: put the new secret in place before then.
Nextcloud and other CalDAV servers
Nothing to set up on the Drusite side. For a Nextcloud, people type its address and sign in there; Nextcloud makes an app password for Drusite, which they can revoke under Settings → Security in Nextcloud. Other CalDAV servers take their address, user name and password (an app password where the service has them: iCloud, Fastmail).
The server calls these servers and feeds itself. By default it calls public addresses only, so nobody can point it at the server’s own network. If your Nextcloud is on the same private network as Drusite (a home lab), allow private addresses:
[calendars]
reach = "any"
With Helm
The chart passes config through as the server’s configuration file, and secrets as files:
config: |
public_url = "https://notes.example.com"
# …
[calendars]
reach = "any"
[calendars.google]
client_id = "1234-abc.apps.googleusercontent.com"
client_secret_file = "/run/secrets/drusite/google-client-secret"
[calendars.microsoft]
client_id = "00000000-0000-0000-0000-000000000000"
client_secret_file = "/run/secrets/drusite/microsoft-client-secret"
secret:
name: drusite-secrets # with keys google-client-secret and microsoft-client-secret
Turning it off
[calendars]
enabled = false
Nobody can connect a calendar, and connected ones aren’t read; their connections stay until people disconnect them.
Troubleshooting
- “This server isn’t set up for Google Calendar”:
[calendars.google]isn’t in the config the server read. - The sign-in page says the redirect URI doesn’t match: the redirect URI registered with
Google or Microsoft must be exactly
<public_url>/api/v1/calendars/oauth/callback. - “The calendar’s provider didn’t accept the sign-in”: the client secret is wrong or expired; the server’s log has the provider’s answer.
- A Nextcloud on a private address is refused: set
[calendars] reach = "any".