A lightweight bridge to synchronize data between your Immich instance and a CardDAV server. This project aims to enhance your self-hosted CardDAV contacts by adding preview pictures from your self-hosted Immich instance. https://flokuep.github.io/immich-carddav-bridge/
  • TypeScript 91.5%
  • Shell 4%
  • JavaScript 3.9%
  • Dockerfile 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] fa324cce5a
fix(deps): bump vite from 8.2.2 to 8.3.0 (#176)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-21 06:31:05 +02:00
.github fix(deps): bump actions/setup-node from 6 to 7 (#160) 2026-07-22 08:11:46 +02:00
docker fix: Quotes env vars in docker entrypoint (#165) 2026-08-12 07:56:30 +00:00
docs feat: allow manual matching (#35) 2025-08-23 13:02:12 +02:00
src feat: allow manual matching (#35) 2025-08-23 13:02:12 +02:00
test feat: allow manual matching (#35) 2025-08-23 13:02:12 +02:00
.env.example feat: allow multiple address books (#10) 2025-07-06 07:00:22 +00:00
.gitignore Fix .gitignore pattern for comments (#15) 2025-07-20 12:21:16 +00:00
CONTRIBUTING.md add: CONTRIBUTING.md 2025-07-05 22:28:05 +02:00
docker-compose.yaml feat: add multi-sync command (#13) 2025-07-06 16:27:56 +00:00
Dockerfile Use docker multi stage building for reduced image size (#14) 2025-07-20 14:22:51 +02:00
LICENCE add: readme and licence (#5) 2025-07-05 17:43:35 +00:00
package-lock.json fix(deps): bump vite from 8.2.2 to 8.3.0 (#176) 2026-09-21 06:31:05 +02:00
package.json fix(deps): bump vite from 8.2.2 to 8.3.0 (#176) 2026-09-21 06:31:05 +02:00
tsconfig.json add: implementation of profile picture sync 2025-07-05 11:41:24 +02:00
vite.config.ts add: vite for building 2025-07-04 13:47:09 +02:00
vitest.config.ts add: implementation of profile picture sync 2025-07-05 11:41:24 +02:00

immich-carddav-bridge

A lightweight bridge to synchronize data between your Immich instance and a CardDAV server. This project aims to enhance your self-hosted CardDAV contacts by adding preview pictures from your self-hosted Immich instance.

✨ Features

  • Synchronizes Immich people's preview images to CardDAV contacts.

🚀 Getting Started

Prerequisites

Make sure you have:

  • Docker & Docker Compose (recommended for easy deployment)
  • An Immich server
  • A CardDAV server (e.g., Nextcloud, Radicale)

Installation & Configuration

You can either extend your existing docker-compose.yaml file for your Immich server or create a separate one for immich-carddav-bridge. The following instructions are for integrating into an existing Docker Compose setup. The separate setup is straightforward. Please have a look at Usage for more configuration options, including having multiple configurations.

Please ensure that immich-carddav-bridge can reach both your Immich instance and your CardDAV server via HTTP(S).

  1. Set up your environment variables: Enhance your .env file or environment configuration:

    IMMICH_URL=https://your-immich-instance/api
    IMMICH_KEY=YOUR_IMMICH_API_KEY
    CARDDAV_URL=https://your-carddav-server/dav/
    CARDDAV_USERNAME=your_carddav_user
    CARDDAV_PASSWORD=your_carddav_pass_or_token
    CARDDAV_PATH_TEMPLATE=/addressbooks/users/$CARDDAV_USERNAME/
    CRON_SCHEDULE=0 0 * * *
    

    Adjust these variables to match your setup. You can specify the list of addressbooks by setting a comma-seperated list of addressbook-names to CARDDAV_ADDRESSBOOKS. Otherwise all addressbooks were fetched.

  2. Adjust your docker-compose.yaml: Add the immich-carddav-bridge service to your existing docker-compose.yaml file:

    immich-carddav-bridge:
      container_name: immich-carddav-bridge
      image: ghcr.io/flokuep/immich-carddav-bridge:latest
      restart: unless-stopped
      depends_on:
        - immich-server # Ensure this matches your Immich service name
    
  3. Run with Docker Compose:

    docker-compose up -d
    

    This will start the bridge in the background. Check the logs with docker-compose logs -f immich-carddav-bridge to monitor its activity. The synchronization will run on startup, if you don't want to have this initial run, set SKIP_INITIAL_RUN=true in your .env file.

🤝 Compatibility

This bridge has been tested with the following CardDAV servers. Your CARDDAV_URL and CARDDAV_PATH settings will vary depending on your server configuration.

CardDAV Server CARDDAV_URL Example CARDDAV_PATH Example Notes
Nextcloud https://your-nextcloud.com/remote.php/dav/ /addressbooks/users/$CARDDAV_USERNAME/ Ensure your user has access to the address book.

🧑‍💻 Development

Want to contribute or hack on it? Awesome!

Setup

  1. Clone and install dependencies:

    git clone [https://github.com/flokuep/immich-carddav-bridge.git](https://github.com/flokuep/immich-carddav-bridge.git)
    cd immich-carddav-bridge
    npm install
    cp .env.example .env
    
  2. Configure your instances: Adjust your .env file with the Immich and CardDAV instance details you want to use for development.

  3. Run locally:

    npm run try
    

    Currently, there's no hot reload. The code is built and then executed. You can easily append parameters, for example:

    npm run try -- -d
    

Testing

Run the tests to ensure everything is working as expected:

npm test # or yarn test