### Install Xandikos from Source (Setup) Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Clone the repository and install Xandikos using setup.py, including all dependencies. ```bash git clone https://github.com/jelmer/xandikos.git cd xandikos python setup.py install ``` -------------------------------- ### Setup uWSGI Standalone Server Source: https://github.com/jelmer/xandikos/blob/master/notes/uwsgi.rst This command prepares the directory and starts a standalone uWSGI server using a specified configuration file. It's useful for direct HTTP traffic serving. ```shell mkdir -p $HOME/dav uwsgi examples/uwsgi-standalone.ini ``` -------------------------------- ### Copy Example uWSGI Configuration Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Create a copy of the example uWSGI configuration file for Heroku. ```bash cp examples/uwsgi-heroku.ini uwsgi.ini ``` -------------------------------- ### Install WebDAV-Push Extra Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Install the optional 'webdav-push' extra for Xandikos to enable WebDAV-Push functionality. ```python pip install 'xandikos[webdav-push]' ``` -------------------------------- ### Install Xandikos from Source (Development with Requirements) Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Clone the repository, install development requirements, and set up Xandikos in develop mode. ```bash git clone https://github.com/jelmer/xandikos.git cd xandikos pip install -r requirements.txt python setup.py develop ``` -------------------------------- ### Install Xandikos with iMIP listen support Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Install the necessary package for Xandikos to support the iMIP listener. ```bash pip install 'xandikos[imip-listen]' ``` -------------------------------- ### Install Python and Xandikos on macOS Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install Python using Homebrew and then install Xandikos using pip. ```bash brew install python pip install xandikos ``` -------------------------------- ### Install Xandikos from Source (Development) Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Clone the repository and install Xandikos in editable mode for development purposes. ```bash git clone https://github.com/jelmer/xandikos.git cd xandikos pip install -e . ``` -------------------------------- ### Deploy Xandikos using Kubernetes Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Apply the example Kubernetes configuration file to deploy Xandikos. ```bash kubectl apply -f examples/xandikos.k8s.yaml ``` -------------------------------- ### Install Xandikos on NetBSD Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install Xandikos using the pkgin package manager on NetBSD systems. ```bash pkgin install py-xandikos ``` -------------------------------- ### Example .xandikos Configuration Source: https://github.com/jelmer/xandikos/blob/master/notes/collection-config.rst An example of an ini-style configuration file for Xandikos collection metadata. This format is compatible with Python's configobj library. ```ini # This is a standard Python configobj file, so it's mostly ini-style, and comments # can appear preceded by #. color = 030003 ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Install all mandatory development dependencies for Xandikos using pip. ```bash pip install .[dev] ``` -------------------------------- ### Create htpasswd File and Configure Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Example of creating an htpasswd file with bcrypt hashing and then configuring Xandikos to use it with autocert. ```bash htpasswd -B -c /etc/xandikos/htpasswd alice xandikos --autocert --htpasswd /etc/xandikos/htpasswd \ -d /var/lib/xandikos ``` -------------------------------- ### Install Xandikos from AUR Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install Xandikos from the Arch User Repository using an AUR helper like yay. ```bash yay -S xandikos # or using another AUR helper ``` -------------------------------- ### Install Xandikos on FreeBSD Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install Xandikos using the pkg package manager on FreeBSD systems. ```bash pkg install py311-xandikos ``` -------------------------------- ### Install Optional Dependencies on Debian/Ubuntu Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install additional Python packages that Xandikos can optionally use. ```bash sudo apt install python3-dulwich python3-defusedxml python3-icalendar python3-jinja2 ``` -------------------------------- ### Verify Xandikos Installation Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Check if Xandikos is installed correctly by running its version command. ```bash xandikos --version ``` -------------------------------- ### ACL Configuration Example Source: https://github.com/jelmer/xandikos/blob/master/notes/multi-user.rst An example of how to configure Access Control Lists (ACLs) within a collection's configuration to manage read and write permissions for specific users. ```ini [acl] read = jelmer, joe write = jelmer ``` -------------------------------- ### Test Xandikos Installation with Temporary Instance Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Run a temporary instance of Xandikos with default settings and a temporary data directory. ```bash xandikos --defaults -d /tmp/test-dav ``` -------------------------------- ### Install Xandikos using pip Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Use this command to install the latest stable version of Xandikos from PyPI. ```bash pip install xandikos ``` -------------------------------- ### Install Xandikos on Debian/Ubuntu Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Install Xandikos using the apt package manager on Debian-based systems. ```bash sudo apt update sudo apt install xandikos ``` -------------------------------- ### Vdirsyncer Configuration File Source: https://github.com/jelmer/xandikos/blob/master/docs/source/clients.md This is an example configuration file for vdirsyncer, defining local and remote storage for contacts and calendars, and setting up pairs for synchronization. Ensure paths and URLs are correctly set for your environment. ```ini [general] status_path = "~/.vdirsyncer/status/" [pair my_contacts] a = "my_contacts_local" b = "my_contacts_remote" collections = ["from a", "from b"] [storage my_contacts_local] type = "filesystem" path = "~/.contacts/" fileext = ".vcf" [storage my_contacts_remote] type = "carddav" url = "https://dav.example.com" username = "your_username" password = "your_password" [pair my_calendars] a = "my_calendars_local" b = "my_calendars_remote" collections = ["from a", "from b"] [storage my_calendars_local] type = "filesystem" path = "~/.calendars/" fileext = ".ics" [storage my_calendars_remote] type = "caldav" url = "https://dav.example.com" username = "your_username" password = "your_password" ``` -------------------------------- ### Xandikos Directory Structure Example Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Illustrates the default directory layout for Xandikos data, including calendars and contacts, each managed as a Git repository. ```text /var/lib/xandikos/ # Root directory (configured with --directory) ├── calendars/ # Calendar collections │ ├── calendar/ # Default calendar │ │ ├── .git/ # Git repository │ │ └── *.ics # iCalendar files │ └── tasks/ # Task list └── contacts/ # Addressbook collections └── addressbook/ # Default addressbook ├── .git/ # Git repository └── *.vcf # vCard files ``` -------------------------------- ### Docker Compose Configuration for Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Example docker-compose.yml file for deploying Xandikos in a production-like environment. ```yaml version: '3' services: xandikos: image: ghcr.io/jelmer/xandikos:latest ports: - "8080:8080" volumes: - ./data:/data environment: - AUTOCREATE=defaults - CURRENT_USER_PRINCIPAL=/alice restart: unless-stopped ``` -------------------------------- ### Built-in milter configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Configure xandikos serve to include the milter directly. This is the recommended setup for co-located Xandikos and Postfix instances. It avoids an LMTP hop and the need for a separate --imip-listen configuration. ```bash xandikos serve \ --directory /var/lib/xandikos \ --milter-listen unix:/run/xandikos/milter.sock \ --milter-listen-mode 660 \ --milter-listen-group postfix ``` -------------------------------- ### Run Xandikos Interactively in Docker Source: https://github.com/jelmer/xandikos/blob/master/docs/source/getting-started.md Start a Xandikos container interactively, mounting a volume for data persistence and exposing the default port. ```shell mkdir /tmp/xandikos docker run -it -v /tmp/xandikos:/data -p8000:8000 ghcr.io/jelmer/xandikos ``` -------------------------------- ### Run Standalone Xandikos Instance Source: https://github.com/jelmer/xandikos/blob/master/README.rst Starts a standalone Xandikos instance with default calendar and addressbook, storing data in the user's home directory. ```shell ./bin/xandikos --defaults -d $HOME/dav ``` -------------------------------- ### Python Context Class Example Source: https://github.com/jelmer/xandikos/blob/master/notes/context.rst A basic Python class definition for 'Context' with a method to retrieve the current user. This serves as a foundational example for context management. ```python class Context(object): def get_current_user(self): return (name, principal) ``` -------------------------------- ### Kubernetes Deployment for Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/getting-started.md Example Kubernetes Deployment configuration for running Xandikos as a containerized service. ```yaml --- apiVersion: apps/v1 kind: Deployment metadata: name: xandikos spec: strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate replicas: 1 selector: matchLabels: app: xandikos template: metadata: labels: app: xandikos spec: containers: - name: xandikos image: ghcr.io/jelmer/xandikos imagePullPolicy: Always command: - "python3" - "-m" - "xandikos.web" - "--port=8080" - "-d/data" - "--defaults" - "--listen-address=0.0.0.0" - "--current-user-principal=/jelmer" - "--route-prefix=/dav" resources: limits: cpu: "2" memory: "2Gi" requests: cpu: "0.1" memory: "10M" livenessProbe: httpGet: path: /health port: 8081 initialDelaySeconds: 30 periodSeconds: 3 timeoutSeconds: 90 ports: - containerPort: 8081 volumeMounts: - name: xandikos-volume mountPath: /data securityContext: fsGroup: 1000 volumes: - name: xandikos-volume persistentVolumeClaim: claimName: xandikos --- apiVersion: v1 kind: Service metadata: name: xandikos labels: app: xandikos spec: ports: - port: 8080 name: web selector: app: xandikos type: ClusterIP ``` -------------------------------- ### Configure Xandikos Outbound iMIP with Sendmail Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Use this configuration when Xandikos is running on a host with a working `/usr/sbin/sendmail` installation. It pipes messages to sendmail for delivery. ```bash xandikos serve --directory /var/lib/xandikos \ --imip-send=sendmail \ --smtp-from "Xandikos " ``` -------------------------------- ### Kubernetes Ingress Configuration for Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/reverse-proxy.md This example configures a Kubernetes nginx ingress controller to route traffic to Xandikos, including basic authentication and handling of .well-known paths. ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: xandikos annotations: nginx.ingress.kubernetes.io/auth-type: basic nginx.ingress.kubernetes.io/auth-secret: my-htpasswd nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - mysite' spec: ingressClassName: nginx rules: - host: example.com http: paths: - backend: service: name: xandikos port: name: web path: /dav(/|$)(.*) pathType: Prefix --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: xandikos-wellknown spec: ingressClassName: nginx rules: - host: example.com http: paths: - backend: service: name: xandikos port: name: web path: /.well-known/carddav pathType: Exact - backend: service: name: xandikos port: name: web path: /.well-known/caldav pathType: Exact ``` -------------------------------- ### Create Heroku Instance Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Create a new Heroku application instance. ```bash heroku create ``` -------------------------------- ### Running pycardsyncer Initial Sync Source: https://github.com/jelmer/xandikos/blob/master/docs/source/clients.md Execute an initial synchronization for a configured account using the pycardsyncer script. ```bash pycardsyncer --account example ``` -------------------------------- ### Production Server Configuration with Logging Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Set up Xandikos for production with specific listen address and port, enabling debug logging, and using default settings. ```bash xandikos \ --directory /var/lib/xandikos \ --listen-address localhost \ --port 8080 \ --debug \ --defaults ``` -------------------------------- ### Run Compatibility Tests (CalDAV Server Tester) Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Execute the compatibility tests using the 'check-caldav-server-tester' Makefile target. ```bash make check-caldav-server-tester ``` -------------------------------- ### Configure Heroku Requirements and Procfile Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Specify uWSGI in requirements.txt and define the web process in Procfile for Heroku. ```bash echo uwsgi > requirements.txt echo web: uwsgi uwsgi.ini > Procfile ``` -------------------------------- ### Basic Standalone Server Configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Run Xandikos as a standalone server with a specified data directory, default settings, and a current user principal. ```bash xandikos \ --directory /var/lib/xandikos \ --defaults \ --current-user-principal /john ``` -------------------------------- ### Kubernetes ServiceMonitor for Prometheus Source: https://github.com/jelmer/xandikos/blob/master/docs/source/getting-started.md Example ServiceMonitor configuration for Prometheus to scrape metrics from the Xandikos service. ```yaml --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: xandikos labels: app: xandikos spec: selector: matchLabels: app: xandikos endpoints: - port: web ``` -------------------------------- ### Run Compatibility Tests (PyCalDAV) Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Execute the compatibility tests using the 'check-pycaldav' Makefile target. ```bash make check-pycaldav ``` -------------------------------- ### Run Compatibility Tests (vdirsyncer) Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Execute the compatibility tests using the 'check-vdirsyncer' Makefile target. ```bash make check-vdirsyncer ``` -------------------------------- ### Nginx Authentication Header Forwarding Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Configure Nginx to correctly pass authentication headers to Xandikos. This is crucial for reverse proxy authentication setups. ```nginx proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization; ``` -------------------------------- ### Postfix main.cf Configuration for Xandikos Milter Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Configure Postfix to use the Xandikos milter by specifying the socket path and protocol version in `main.cf`. Ensure `milter_default_action` is set to `accept` to prevent mail delivery failures during milter outages. ```text # /etc/postfix/main.cf smtpd_milters = unix:/run/xandikos/milter.sock non_smtpd_milters = $smtpd_milters milter_default_action = accept milter_protocol = 6 # Generous content timeout: the milter does an LMTP/HTTP round-trip # to Xandikos at end-of-message. The 300s default is usually fine. # milter_content_timeout = 300s ``` -------------------------------- ### Enable Xandikos with Systemd Source: https://github.com/jelmer/xandikos/blob/master/docs/source/getting-started.md Copy systemd unit files and reload the daemon to enable Xandikos socket activation. ```shell cp examples/xandikos.{socket,service} /etc/systemd/system systemctl daemon-reload systemctl enable xandikos.socket ``` -------------------------------- ### File-based Backend Metadata Configuration Source: https://github.com/jelmer/xandikos/blob/master/notes/file-format.rst Metadata for file-based (vdir) collections is stored in .xandikos/config using Python configparser format. This example includes default properties and a specific section for 'calendar'. ```ini [DEFAULT] type = calendar displayname = My Calendar description = Personal calendar for work events color = #FF5733 source = https://example.com/calendar.ics refreshrate = PT1H comment = Calendar synchronized from external source [calendar] order = 10 ``` -------------------------------- ### Apply Postfix Milter Configuration via postconf Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Use the `postconf` command to apply the milter settings to Postfix's configuration and reload the service. This is a convenient way to update settings without manually editing `main.cf`. ```bash sudo postconf -e \ 'smtpd_milters = unix:/run/xandikos/milter.sock' \ 'non_smtpd_milters = $smtpd_milters' \ 'milter_default_action = accept' \ 'milter_protocol = 6' sudo systemctl reload postfix ``` -------------------------------- ### Git Backend Metadata Configuration Source: https://github.com/jelmer/xandikos/blob/master/notes/file-format.rst Metadata for Git-backed collections is stored in .git/config under the [xandikos] section. This example shows common properties like type, displayname, color, source, refreshrate, and comment. ```ini [xandikos] type = calendar displayname = My Calendar color = #FF5733 source = https://example.com/calendar.ics refreshrate = PT1H comment = Personal calendar for work events ``` -------------------------------- ### Systemd Socket Activation Configuration (Socket File) Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Create a systemd socket unit file to manage the Xandikos server's network socket activation. ```ini [Unit] Description=Xandikos CalDAV/CardDAV server socket [Socket] # All Xandikos sockets live under /run/xandikos/ so the web, # milter and iMIP LMTP sockets share one directory. ListenStream=/run/xandikos/web.sock RuntimeDirectory=xandikos [Install] WantedBy=sockets.target ``` -------------------------------- ### Enable Default Calendar and Addressbook Creation Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Automatically create default calendar and addressbook collections if they do not already exist. ```bash --defaults ``` -------------------------------- ### Create Xandikos iMIP Import Wrapper Script Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md This script acts as a wrapper for the `xandikos import-imip` command, typically used with Dovecot Pigeonhole's sieve-pipe extension. It forwards iMIP messages to a running Xandikos server. ```bash # /usr/lib/dovecot/sieve-pipe/xandikos-import-imip #!/bin/sh exec xandikos import-imip \ --server-url http://localhost:8080/user/inbox/ ``` -------------------------------- ### Set Calendar and Addressbook Home Sets Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Configure the default paths for a principal's calendar and addressbook home collections by specifying keys in the `[principal]` section of the `.xandikos` file. This is useful for advertising these collections at non-default paths. ```ini [principal] calendar-home-set = my-calendars addressbook-home-set = my-contacts ``` -------------------------------- ### Run Compatibility Tests (Litmus) Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Execute the compatibility tests using the 'check-litmus' Makefile target. ```bash make check-litmus ``` -------------------------------- ### Deploy App to Heroku Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Push the local master branch to Heroku to deploy the application. ```bash git push heroku master ``` -------------------------------- ### Check Code Style and Formatting Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Verify code style violations and check formatting using ruff. ```bash ruff check; ruff format --check . ``` -------------------------------- ### Clone Xandikos Repository Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Clone the Xandikos repository locally to begin the deployment process. ```bash git clone git://jelmer.uk/xandikos xandikos cd xandikos ``` -------------------------------- ### Announce Services with Avahi/Bonjour Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Enable service announcement using Avahi/Bonjour for automatic network discovery. ```bash --avahi ``` -------------------------------- ### Create Default Xandikos Collections Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Use the `--defaults` flag to create default collections if they are missing. This command initializes necessary data structures. ```bash xandikos --defaults -d /path/to/data ``` -------------------------------- ### Configure Automatic Directory Creation Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Control whether Xandikos should automatically create missing directories when they are accessed. Options are 'yes' or 'no'. ```bash --autocreate yes ``` -------------------------------- ### Open Heroku App Source: https://github.com/jelmer/xandikos/blob/master/notes/heroku.rst Open the deployed Heroku application in your web browser. ```bash heroku open ``` -------------------------------- ### pycardsyncer CardDAV Configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/clients.md Set up pycardsyncer, a Python script for CardDAV synchronization, by defining account credentials and resource URLs in its configuration file. ```ini [Account example] user: your_username passwd: your_password resource: https://dav.example.com/user/contacts/addressbook/ write_support: YesPleaseIDoHaveABackupOfMyData ``` -------------------------------- ### Akonadi DAV Groupware Resource Configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/clients.md Configure Akonadi, the KDE PIM storage service, to add a DAV groupware resource for calendar synchronization within KOrganizer. ```text Server: https://dav.example.com ``` -------------------------------- ### Enable WebDAV-Push Notifications Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Enable WebDAV-Push to allow clients to register for Web Push notifications instead of polling. Requires the 'webdav-push' extra package. ```bash --webdav-push ``` -------------------------------- ### Verify Postfix Milter Configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Check the active Postfix configuration for milter-related settings using `postconf -n`. This command displays non-default configuration parameters. ```bash postconf -n | grep -E '^(smtpd|non_smtpd)_milters|^milter_' ``` -------------------------------- ### Run Unit Tests Source: https://github.com/jelmer/xandikos/blob/master/CONTRIBUTING.md Execute the unit test suite for Xandikos using the unittest module. ```bash python3 -m unittest tests.test_suite ``` -------------------------------- ### Test LMTP Listener with swaks Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Use this command to smoke-test the LMTP listener by sending a sample .eml file. Ensure you replace placeholders with actual values. ```bash swaks --to bob@example.com --from alice@example.com \ --server /run/xandikos/imip.sock --protocol LMTP \ --data path/to/sample.eml ``` -------------------------------- ### Enable Compression in Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Use this command to enable compression for Xandikos, which can help improve response times. Specify the data directory with the -d flag. ```bash xandikos --compress -d /path/to/data ``` -------------------------------- ### Run Xandikos Docker Image Source: https://github.com/jelmer/xandikos/blob/master/docs/source/installation.md Pull the official Xandikos Docker image and run it, mapping ports and volumes. ```bash docker pull ghcr.io/jelmer/xandikos:latest docker run -p 8080:8080 -v /path/to/data:/data ghcr.io/jelmer/xandikos ``` -------------------------------- ### Configure Nginx to Allow All DAV Methods Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Configure Nginx to allow all necessary WebDAV methods. This prevents 'Method Not Allowed' errors when interacting with Xandikos. ```nginx location / { proxy_pass http://localhost:8080; proxy_method $request_method; # Allow all DAV methods if ($request_method !~ ^(GET|HEAD|POST|PUT|DELETE|OPTIONS|PROPFIND|PROPPATCH|MKCOL|COPY|MOVE|LOCK|UNLOCK|REPORT)$ ) { return 405; } } ``` -------------------------------- ### Configure HTTP Basic Authentication with htpasswd Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Require HTTP Basic authentication using an Apache-style htpasswd file. Supports bcrypt and SHA1 hash formats. Requires --autocert and the 'bcrypt' Python package for bcrypt entries. ```bash --htpasswd FILE ``` -------------------------------- ### Dump DAV XML Configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Use this command to output the DAV XML configuration. This is particularly useful for diagnosing protocol-related issues. ```bash xandikos --dump-dav-xml ``` -------------------------------- ### Set Server State Directory Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Specify the directory for server state, including TLS certificates, VAPID keys, and push subscription index. Defaults to $XDG_DATA_HOME/xandikos. ```bash --state-dir DIR ``` -------------------------------- ### Authenticated Xandikos iMIP Import Wrapper Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md This wrapper script is for authenticated Xandikos servers. It points to an HTTPS URL and reads credentials from a secure password file for importing iMIP messages. ```bash exec xandikos import-imip \ --server-url https://dav.example.net/user/inbox/ \ --username bob \ --password-file /run/secrets/xandikos-password ``` -------------------------------- ### Configure Well-Known Redirects for DAVx5 Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Ensure well-known redirects are configured for DAVx5 to resolve service discovery issues. ```nginx location /.well-known/caldav { return 301 $scheme://$host/; } location /.well-known/carddav { return 301 $scheme://$host/; } ``` -------------------------------- ### Enable Self-Signed HTTPS Certificates Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Serve HTTPS using self-signed certificates generated on first use. This option is for development and testing only and should not be used in production. Requires the 'cryptography' Python package. ```bash --autocert ``` -------------------------------- ### Standalone milter with LMTP configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Set up a separate xandikos-milter daemon that forwards messages over LMTP to a running xandikos serve instance. This is useful when the milter needs to run as its own service. ```bash xandikos serve \ --directory /var/lib/xandikos \ --imip-listen unix:/run/xandikos/imip.sock \ --imip-listen-mode 660 \ --imip-listen-group postfix xandikos-milter \ --lmtp-socket unix:/run/xandikos/imip.sock \ --listen unix:/run/xandikos/milter.sock \ --listen-mode 660 \ --listen-group postfix ``` -------------------------------- ### Standalone milter with HTTP (cross-host) configuration Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Configure the milter to forward messages to a Xandikos instance on a different host via HTTPS. Basic authentication is used, with credentials read from a specified password file. ```bash xandikos-milter \ --server-url https://dav.example.net/user/inbox/ \ --username calendar \ --password-file /run/secrets/xandikos-password \ --listen unix:/run/xandikos/milter.sock \ --listen-mode 660 \ --listen-group postfix ``` -------------------------------- ### Command-Line Debugging with Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Use these flags for detailed debugging of Xandikos. Output is redirected to a log file. ```bash xandikos \ --debug \ --dump-dav-xml \ --log-level DEBUG \ -d /path/to/data 2>&1 | tee xandikos-debug.log ``` -------------------------------- ### Systemd Service Configuration for Xandikos Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Define a systemd service unit file to run the Xandikos server, specifying its executable, arguments, and user/group. ```ini [Unit] Description=Xandikos CalDAV/CardDAV server After=network.target [Service] Type=notify ExecStart=/usr/bin/xandikos \ --directory /var/lib/xandikos \ --listen-address /run/xandikos/web.sock \ --defaults User=xandikos Group=xandikos [Install] WantedBy=multi-user.target ``` -------------------------------- ### Run Xandikos LMTP listener on a Unix socket Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md Configure and run the Xandikos LMTP listener on a Unix socket, specifying permissions and group for the socket. ```bash xandikos serve --directory /var/lib/xandikos \ --imip-listen=unix:/run/xandikos/imip.sock \ --imip-listen-mode=660 \ --imip-listen-group=postfix ``` -------------------------------- ### Set Listening Address Source: https://github.com/jelmer/xandikos/blob/master/docs/source/configuration.md Specify the network address Xandikos should listen on. Defaults to localhost. Can also be a Unix socket path. ```bash --listen-address 0.0.0.0 ``` ```bash --listen-address /run/xandikos/web.sock ``` -------------------------------- ### Enable Xandikos Debug Logging and DAV XML Dump Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Enable debug logging and dump WebDAV XML requests to help diagnose sync issues. This provides detailed information about sync operations. ```bash xandikos --debug --dump-dav-xml -d /path/to/data ``` -------------------------------- ### Chrooted Postfix Milter Socket Path Source: https://github.com/jelmer/xandikos/blob/master/docs/source/imip.md When Postfix runs in a chroot environment, specify the milter socket path relative to the chroot directory. This ensures Postfix can access the socket correctly. ```text smtpd_milters = unix:private/xandikos-milter ``` -------------------------------- ### Test CalDAV Service Connectivity with curl Source: https://github.com/jelmer/xandikos/blob/master/docs/source/troubleshooting.md Test basic connectivity to the CalDAV service using curl. Includes OPTIONS and PROPFIND requests. ```bash # Test OPTIONS curl -X OPTIONS https://dav.example.com/ -u username:password # Test PROPFIND curl -X PROPFIND https://dav.example.com/ \ -u username:password \ -H "Depth: 0" \ -H "Content-Type: application/xml" \ -d ' ' ```