# OpenCloud-Radicale

[![Build Status](<https://img.shields.io/github/actions/workflow/status/daemonless/opencloud-radicale/build.yaml?style=flat-square&label=Build&color=green>)](<https://github.com/daemonless/opencloud-radicale/actions>) [![Last Commit](<https://img.shields.io/github/last-commit/daemonless/opencloud-radicale?style=flat-square&label=Last+Commit&color=blue>)](<https://github.com/daemonless/opencloud-radicale/commits>) [![OCI Pulls](<https://img.shields.io/docker/pulls/daemonless/opencloud-radicale?style=flat-square&label=OCI+Pulls&color=blue>)](<https://hub.docker.com/r/daemonless/opencloud-radicale>)

A simple CalDAV (calendar) and CardDAV (contact) server.

|  |  |
| --- | --- |
| **Port** | `5232` |
| **Registry** | [`ghcr.io/daemonless/opencloud-radicale`](<https://github.com/daemonless/opencloud-radicale/pkgs/container/opencloud-radicale>) |
| **Daemonless** | [daemonless/opencloud-radicale](<https://github.com/daemonless/opencloud-radicale>) |
| **Source** | [daemonless/opencloud-radicale](<https://github.com/daemonless/opencloud-radicale>) |
| **Website** | [radicale.org](<https://radicale.org/>) |

# !!! WARNING "Work in Progress"

This image is functional but may change significantly in a future release.

## Intended for use with OpenCloud stack

This image can be used with [OpenCloud](<https://daemonless.io/images/opencloud>) to provide personal address books and calendars for each OpenCloud user.  
The image relies on OpenCloud acting as an authenticating reverse proxy for radicale. Using it as a standalone radicale server is probably not a good idea.

## Integrate with OpenCloud

To intergrate the radicale service with OpenCloud, you need to add a proxy configuration to OpenCloud. Create the file `/path/to/container/opencloud/config/proxy.yaml` with this content (or add the content below to your existing `proxy.yaml` configuration file):

```
additional_policies:
  - name: default
    routes:
      - endpoint: /caldav/
        backend: http://radicale:5232
        remote_user_header: X-Remote-User
        skip_x_access_token: true
        additional_headers:
          - X-Script-Name: /caldav
      - endpoint: /.well-known/caldav
        backend: http://radicale:5232
        remote_user_header: X-Remote-User
        skip_x_access_token: true
        additional_headers:
          - X-Script-Name: /caldav
      - endpoint: /carddav/
        backend: http://radicale:5232
        remote_user_header: X-Remote-User
        skip_x_access_token: true
        additional_headers:
          - X-Script-Name: /carddav
      - endpoint: /.well-known/carddav
        backend: http://radicale:5232
        remote_user_header: X-Remote-User
        skip_x_access_token: true
        additional_headers:
          - X-Script-Name: /carddav
```

Add the `radicale` service to your existing compose file for the OpenCloud stack by merging this:

```
services:
  opencloud:
    depends_on:
      - radicale
  radicale:
    image: ghcr.io/daemonless/opencloud-radicale:latest
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - /path/to/containers/opencloud-radicale:/config
    restart: unless-stopped
```

## Prerequisites

Before deploying, ensure your host environment is ready. See the [Quick Start Guide](<https://daemonless.io/guides/quick-start/index.md>) for host setup instructions, including the security model for host vs. container privileges.

## Deployment

**Customize Paths, UID & Ports**

```
services:
  opencloud-radicale:
    image: "ghcr.io/daemonless/opencloud-radicale:latest"
    container_name: opencloud-radicale
    environment:
      - PUID=1000  # User ID for the application process
      - PGID=1000  # Group ID for the application process
      - TZ=UTC  # Timezone for the container
    volumes:
      - "/containers/opencloud-radicale:/config"
    ports:
      - "5232:5232"
    # always (not unless-stopped) so FreeBSD's podman rc.d auto-starts it at boot
    restart: always
```

Save as `compose.yaml`, then run `podman-compose up -d`.

> [!WARNING]
>
> Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the jail's IPv4 address or hostname assigned by the virtual network.

```
# .env

DIRECTOR_PROJECT=opencloud-radicale
PUID=1000
PGID=1000
TZ=UTC
```

```
# appjail-director.yml

options:
  - virtualnet: ':<random> default'
  - nat:
services:
  radicale:
    name: radicale
    options:
      - container: 'args:--pull'
      - expose: '5232:5232 proto:tcp'
    oci:
      user: root
      environment:
        - PUID: !ENV '${PUID}'
        - PGID: !ENV '${PGID}'
        - TZ: !ENV '${TZ}'
    volumes:
      - opencloud-radicale: /config
volumes:
  opencloud-radicale:
    device: '/containers/opencloud-radicale'
```

```
# Makejail

ARG tag=latest

OPTION container=boot
OPTION overwrite=force
OPTION from=ghcr.io/daemonless/opencloud-radicale:${tag}
```

Save the files above, then run `appjail-director up`.

Install and manage **OpenCloud-Radicale** on FreeBSD with [fjord](<https://fjord.daemonless.io>):

```
fjord install opencloud-radicale
```

Or open the **App Store** in the fjord web UI and install **OpenCloud-Radicale** from the wizard. New to fjord? See the [Install Guide](<https://fjord.daemonless.io/install/>).

> [!WARNING]
>
> **Experimental**
>
> Bastille's OCI support is experimental. It requires `buildah` and shares the host network stack (`inherit`). Mount volumes with `--volume HOST JAIL`; without it, image-declared volumes are stored under `${bastille_volumesdir}/${jail}`.

```
services:
  opencloud-radicale:
    name: opencloud-radicale
    image: "ghcr.io/daemonless/opencloud-radicale:latest"
    network:
      - mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "/containers/opencloud-radicale:/config"
```

Save as `bastille-compose.yml`, then run `bastille up`.

Open `http://<server>:5232` from another machine (the server's own browser can't use a published port).

## Parameters

### Environment Variables

| Variable | Default | Description |
| --- | --- | --- |
| `PUID` | `1000` | User ID for the application process |
| `PGID` | `1000` | Group ID for the application process |
| `TZ` | `UTC` | Timezone for the container |

### Volumes

| Path | Description |
| --- | --- |
| `/config` | Configuration and data directory |

### Ports

| Port | Protocol | Description |
| --- | --- | --- |
| `5232` | TCP | Web UI |

## Version Tags

| Tag | Description | Best For |
| :--- | :--- | :--- |
| `latest` | **Upstream Binary**. Built from official release. | Most users — recommended. |

> [!NOTE]
>
> **Implementation Details**
>
> - **Architectures:** amd64
> - **User:** `bsd` (UID/GID set via [PUID/PGID](<https://daemonless.io/guides/permissions/index.md>)). Defaults to `1000:1000`.
> - **Base:** Built on `ghcr.io/daemonless/base` (FreeBSD 15).

---

Need help? Join our [Discord](<https://discord.gg/Kb9tkhecZT>) community.
