Simple relay server for calendar integration in self hosted Nextcloud
146
Simple relay server for calendar integration in self hosted Nextcloud
Nextcloud allows users to add calendars via links (called "New subscription from link" in Nextcloud) but limits redirect following by 5 hops. This can break calendar integration if the calendars require more than 5 hops.
This server acts as a relay between Nextcloud and the calendar servers by separately fetching the calendars and allowing Nextcloud to access them directly without requiring redirects.
The server runs on Python and uses Flask, no security features are implemented.
This should be sufficient for personal use (self hosted in home network), but is not suitable for production environments.
The server can be set up as a independent server (e.g. calendar.arpa) or as a custom location on the Nextcloud server when using a reverse proxy like Nginx Proxy Manager (nextcloud.arpa/calendar-server)
| Scheme | BASE_URL example |
|---|---|
nextcloud.arpa/calendar-server | /nxtcld-calendar-server/ |
calendar.arpa | / |
The container contains two folders that can be kept, the data and the log folder. But only the data folder is essential for the app to function.
| Folder | Path in container |
|---|---|
| data | app/data |
| logs | app/logs |
This example uses the yml file to write the data to data/config.json.
See below for an explanation of the file contents.
configs:
calendar_config:
content: |
[
{
"NAME": "Calendar",
"URL": "https://calend.ar",
"PATH": "calendar",
"FILENAME": "calendar.ics"
}
]
services:
nextcloud-calendar-server:
image: srisner/nxtcld-calendar-server:v1.0
container_name: nextcloud-calendar-server
restart: always
configs:
- source: calendar_config
target: /app/data/config.json
ports:
- 0.0.0.0:5000:5000/tcp
environment:
- BASE_URL=/nxtcld-calendar-server/
volumes:
- nextcloud-calendar-server-data:/app/data
volumes:
nextcloud-calendar-server-data:
name: nextcloud-calendar-server-data
Calendars are added in the config file data/config.json
Example:
[
{
"NAME": "Cal 1",
"URL": "https://...",
"PATH": "cal_1",
"FILENAME": "cal_1.ics"
},
{
"NAME": "Cal 2",
"URL": "https://...",
"PATH": "cal_2",
"FILENAME": "cal_2.ics"
}
]
| Key | Value |
|---|---|
NAME | used for debugging and readability, should be unique but no errors will occur if it is not unique |
URL | the calendars subscription link |
PATH | on which path the calendar will be accessible to Nextcloud (calendar.arpa/PATH or nextcloud.arpa/calendar-server/PATH) Should not contain any / since this will break path matching |
FILENAME | the filename that will be used when downloading the calendar, should end with .ics |
Content type
Image
Digest
sha256:05548552e…
Size
392.2 MB
Last updated
2 months ago
docker pull srisner/nxtcld-calendar-server:v1.0