{"id":13584670,"url":"https://github.com/tchapi/davis","last_synced_at":"2026-03-14T21:25:24.141Z","repository":{"id":36372618,"uuid":"218266803","full_name":"tchapi/davis","owner":"tchapi","description":"🗓 A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 5, initially inspired by Baïkal.","archived":false,"fork":false,"pushed_at":"2024-10-15T19:52:58.000Z","size":7426,"stargazers_count":390,"open_issues_count":9,"forks_count":21,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-10-29T20:05:45.336Z","etag":null,"topics":["bootstrap5","caldav","carddav","symfony5","webdav"],"latest_commit_sha":null,"homepage":"https://github.com/users/tchapi/projects/1/views/1","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.me/tchap"]}},"created_at":"2019-10-29T11:01:11.000Z","updated_at":"2024-10-28T13:52:47.000Z","dependencies_parsed_at":"2023-02-17T12:46:07.789Z","dependency_job_id":"b17c856c-9569-4558-841a-b9fb782046c9","html_url":"https://github.com/tchapi/davis","commit_stats":{"total_commits":356,"total_committers":12,"mean_commits":"29.666666666666668","dds":0.5814606741573034,"last_synced_commit":"3697aac9af99f16d1ce921d595d25cb7e7cf124e"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fdavis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fdavis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fdavis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fdavis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchapi","download_url":"https://codeload.github.com/tchapi/davis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","caldav","carddav","symfony5","webdav"],"created_at":"2024-08-01T15:04:26.013Z","updated_at":"2026-03-14T21:25:24.135Z","avatar_url":"https://github.com/tchapi.png","language":"PHP","funding_links":["https://www.paypal.me/tchap","https://paypal.me/tchap"],"categories":["Servers","PHP","Software","HarmonyOS"],"sub_categories":["Standalone","Calendar \u0026 Contacts","Calendar \u0026 Contacts - CalDAV or CardDAV Servers","Windows Manager"],"readme":"Davis\n---\n\n[![Build Status][ci_badge]][ci_link]\n[![Publish Docker image](https://github.com/tchapi/davis/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/tchapi/davis/actions/workflows/main.yml)\n[![Latest release][release_badge]][release_link]\n[![License](https://img.shields.io/github/license/tchapi/davis)](https://github.com/tchapi/davis/blob/main/LICENSE)\n![Platform](https://img.shields.io/badge/platform-amd64%20%7C%20arm64-blue?logo=docker)\n![PHP Version](https://img.shields.io/badge/php-8.2%20%7C%208.3%20%7C%208.4-777BB4?logo=php\u0026logoColor=white)\n[![Sponsor me][sponsor_badge]][sponsor_link]\n\nA modern, simple, feature-packed, fully translatable DAV server, admin interface and frontend based on `sabre/dav`, built with [Symfony 7](https://symfony.com/) and [Bootstrap 5](https://getbootstrap.com/), initially inspired by [Baïkal](https://github.com/sabre-io/Baikal) (_see dependencies table below for more detail_)\n\n### Web admin dashboard\n\nProvides user edition, calendar creation and sharing, and address book creation. The interface is simple and straightforward, responsive, and provides a light and a dark mode.\n\nSupports **Basic authentication**, as well as **IMAP** and **LDAP** (_via external providers_).\n\n### DAV Server\n\nThe underlying server implementation supports (*non-exhaustive list*) CalDAV, CardDAV, WebDAV, calendar sharing, scheduling, mail notifications, and server-side subscriptions (*depending on the capabilities of the client*).\n\n### Additional features ✨\n\n- Subscriptions (to be added via the client, such as the macOS calendar, for instance)\n- Public calendars, available to anyone with the link\n- Automatic birthday calendar, updated on the fly when birthdates change in your contacts\n\n### Deployment\n\nEasily containerisable (_`Dockerfile` and sample `docker-compose` configuration file provided_).\n\nNixOS [package](https://search.nixos.org/packages?channel=unstable\u0026show=davis\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=davis) and module available.\n\nComes with already built Docker images in two flavours: [standalone](https://github.com/tchapi/davis/pkgs/container/davis-standalone) (with included Caddy reverse proxy) or [barebone](https://github.com/tchapi/davis/pkgs/container/davis).\n\n- - -\n\n✨ Created and maintained (with the help of the community) by [@tchapi](https://github.com/tchapi). ✨\n\n![Dashboard page](_screenshots/dashboard.png)\n![User creation page](_screenshots/user.png)\n![Sharing page](_screenshots/sharing.png)\n\n| Dark / Light mode  | Useful information at hand        |\n|--------------------|----------------------------|\n| ![Color mode](_screenshots/mode.png)| ![Setup information](_screenshots/setup_info.png)|\n\n# 🔩 Requirements\n\n  - PHP \u003e 8.2 (with `pdo_mysql` [or `pdo_pgsql`, `pdo_sqlite`], `gd` and `intl` extensions), compatible up to PHP 8.5 (_See dependencies table below_)\n  - A compatible database layer, such as MySQL or MariaDB (recommended), PostgreSQL (not extensively tested yet) or SQLite (not extensively tested yet)\n  - Composer \u003e 2 (_The last release compatible with Composer 1 is [v1.6.2](https://github.com/tchapi/davis/releases/tag/v1.6.2)_)\n  - The [`imap`](https://www.php.net/manual/en/imap.installation.php) and [`ldap`](https://www.php.net/manual/en/ldap.installation.php) PHP extensions if you want to use either authentication methods (_these are not enabled / compiled by default except in the Docker image_)\n\nDependencies\n------------\n\n| Release            | Status                     | PHP version        |\n|--------------------|----------------------------|--------------------|\n| `main` (edge)      | development branch         | PHP 8.2+           |\n| `v5.x`             | stable                     | PHP 8.2+           |\n| `v4.x`             | security fixes only        | PHP 8.0 → 8.3      |\n| `v3.x`             | :warning: unmaintained     | PHP 7.3 → 8.2      |\n\n# 🧰 Installation\n\n0. Clone this repository\n\n1. Retrieve the dependencies:\n\n    a. If you plan to run Davis locally, for development purposes\n\n    ```\n    composer install\n    ```\n\n    b. If you plan to run Davis on production\n\n    ```\n    composer install --no-dev\n    ```\n\n   And set `APP_ENV=prod` in your `.env.local` file (see below)\n\n\n3. At least put the correct credentials to your database (driver and url) in your `.env.local` file so you can easily create the necessary tables.\n\n4. Run the migrations to create all the necessary tables:\n\n    ```\n    bin/console doctrine:migrations:migrate\n    ```\n\n**Davis** can also be used with a pre-existing MySQL database (_for instance, one previously managed by Baïkal_). See the paragraph \"Migrating from Baikal\" for more info.\n\n\u003e [!NOTE]\n\u003e\n\u003e The tables are not _exactly_ equivalent to those of Baïkal, and allow for a bit more room in columns for instance (among other things)\n\n## Configuration\n\nCreate your own `.env.local` file to change the necessary variables, if you plan on using `symfony/dotenv`.\n\n\u003e [!NOTE]\n\u003e\n\u003e If your installation is behind a web server like Apache or Nginx, you can setup the env vars directly in your Apache or Nginx configuration (see below). Skip this part in this case.\n\n\u003e [!CAUTION]\n\u003e\n\u003e In a production environnement, the `APP_ENV` variable MUST be set to `prod` to prevent leaking sensitive data.\n\n**a. The database driver and url** (_you should already have it configured since you created the database previously_)\n\n```shell\nDATABASE_DRIVER=mysql # or postgresql, or sqlite\nDATABASE_URL=mysql://db_user:db_pass@host:3306/db_name?serverVersion=10.9.3-MariaDB\u0026charset=utf8mb4\n```\n\n**b. The admin password for the backend**\n\n```shell\nADMIN_LOGIN=admin\nADMIN_PASSWORD=test\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e You can bypass auth entirely if you use a third party authorization provider such as Authelia. In that case, set the `ADMIN_AUTH_BYPASS` env var to `true` (case-sensitive, this is actually the string `true`, not a boolean) to allow full access to the dashboard. This does not change the behaviour of the DAV server.\n\n**c. The auth Realm and method for HTTP auth**\n\n```shell\nAUTH_REALM=SabreDAV\nAUTH_METHOD=Basic # can be \"Basic\", \"IMAP\" or \"LDAP\"\n```\n\u003e See [the following paragraph](#specific-environment-variables-for-imap-and-ldap-authentication-methods) for more information if you choose either IMAP or LDAP.\n\n**d. The global flags to enable CalDAV, CardDAV and WebDAV**. You can also disable the option to have calendars public\n\n```shell\nCALDAV_ENABLED=true\nCARDDAV_ENABLED=true\nWEBDAV_ENABLED=false\n\nPUBLIC_CALENDARS_ENABLED=true\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e By default, `PUBLIC_CALENDARS_ENABLED` is true. That doesn't mean that all calendars are public by default — it just means that you have an option, upon calendar creation, to set the calendar public (but it's not public by default).\n\n\n**e. Mailer configuration**\n\nIt includes:\n  - the mailer uri (`MAILER_DSN`)\n  - The email address that your invites are going to be sent from\n\n```shell\nMAILER_DSN=smtp://user:pass@smtp.example.com:port\nINVITE_FROM_ADDRESS=no-reply@example.org\n```\n\n\u003e [!WARNING]\n\u003e If the username, password or host contain any character considered special in a URI (such as `: / ? # [ ] @ ! $ \u0026 ' ( ) * + , ; =`), you MUST encode them.\n\u003e See [here](https://symfony.com/doc/current/mailer.html#transport-setup) for more details.\n\n**f. The reminder offset for all birthdays**\n\nYou must specify a relative duration, as specified in [the RFC 5545 spec](https://www.rfc-editor.org/rfc/rfc5545.html#section-3.3.6)\n\n```shell\nBIRTHDAY_REMINDER_OFFSET=PT9H\n```\n\nIf you don't want a reminder for birthday events, set it to the `false` value (lowercase):\n\n```shell\nBIRTHDAY_REMINDER_OFFSET=false\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e By default, if the env var is not set or empty, we use `PT9H` (9am on the date of the birthday).\n\n**g. The paths for the WebDAV installation**\n\n\u003e [!TIP]\n\u003e\n\u003e I recommend that you use absolute directories so you know exactly where your files reside.\n\n```shell\nWEBDAV_TMP_DIR=/webdav/tmp\nWEBDAV_PUBLIC_DIR=/webdav/public\nWEBDAV_HOMES_DIR=\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e In a docker setup, I recommend setting `WEBDAV_TMP_DIR` to `/tmp`.\n\n\u003e [!NOTE]\n\u003e\n\u003e By default, home directories are disabled totally (the env var is set to an empty string). If needed, it is recommended to use a folder that is **NOT** a child of the public dir, such as `/webdav/homes` for instance, so that users cannot access other users' homes.\n\n**h. The log file path**\n\nYou can use an absolute file path here, and you can use Symfony's `%kernel.logs_dir%` and `%kernel.environment%` placeholders if needed (as in the default value). Setting it to `/dev/null` will disable logging altogether.\n\n```shell\nLOG_FILE_PATH=\"%kernel.logs_dir%/%kernel.environment%.log\"\n```\n\n**i. The timezone you want for the app**\n\nThis must comply with the [official list](https://www.php.net/manual/en/timezones.php)\n\n```shell\nAPP_TIMEZONE=Australia/Lord_Howe\n```\n\n\u003e Set a void value like so:\n\u003e ```shell\n\u003e APP_TIMEZONE=\n\u003e ```\n\u003e in your environment file if you wish to use the **actual default timezone of the server**, and not enforcing it.\n\n**j. Trusting forwarded headers**\n\nIf you're behind one or several proxies, the TLS termination might be upstream and the application might not be aware of the HTTPS context. In order for urls to be generated with the correct scheme, you should indicate that you trust the chain of proxies until the TLS termination one. You can use the Symfony mechanism for that (see [documentation](https://symfony.com/doc/7.2/deployment/proxies.html) for possible values):\n\n```shell\nSYMFONY_TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR\n```\n\n#### Overriding the dotenv (`.env`) path\n\nYou can override the expected location of the environment files (`.env`, `.env.local`, etc) by setting the `ENV_DIR` variable.\n\nThe value should be to a _folder_ containing the env files. This value must be specified in the actual environment and *not* in an `.env` file as it is read and evaluated **before** the env files are read.\n\nFor instance, you can use it to call `bin/console` with a specific dotenv directory:\n\n```shell\n\u003e ENV_DIR=/var/lib/davis bin/console\n```\n\nOr use it directly in the Apache configuration\n\n```apache\n\u003cVirtualHost *:80\u003e\n    # .. rest of config (see ¶ below)\n\n    SetEnv ENV_DIR /var/lib/davis\n    # ... other env vars if needed\n\u003c/VirtualHost\u003e\n```\n\n### Specific environment variables for IMAP and LDAP authentication methods\n\nIn case you use the `IMAP` auth type, you must specify the auth url (_the \"mailbox\" url_) in `IMAP_AUTH_URL` as `host:port`, the encryption method (SSL, TLS or None) and whether the certificate should be validated.\n\nYou should also explicitely define whether you want new authenticated users to be created upon login:\n\n```shell\nIMAP_AUTH_URL=imap.mydomain.com:993\nIMAP_ENCRYPTION_METHOD=ssl # ssl, tls or false\nIMAP_CERTIFICATE_VALIDATION=true\nIMAP_AUTH_USER_AUTOCREATE=true # false by default\n```\n\nSame goes for LDAP, where you must specify the LDAP server url, the DN pattern, the Mail attribute, as well as whether you want new authenticated users to be created upon login (_like for IMAP_):\n\n```shell\nLDAP_AUTH_URL=ldap://127.0.0.1:3890 # default LDAP port\nLDAP_DN_PATTERN=uid=%u,ou=users,dc=domain,dc=com\nLDAP_MAIL_ATTRIBUTE=mail\nLDAP_AUTH_USER_AUTOCREATE=true # false by default\nLDAP_CERTIFICATE_CHECKING_STRATEGY=try # try by default. Other values are: never, hard, demand or allow\n```\n\n\u003e Ex: for [Zimbra LDAP](https://zimbra.github.io/adminguide/latest/#zimbra_ldap_service), you might want to use the `zimbraMailDeliveryAddress` attribute to retrieve the principal user email:\n\u003e    ```shell\n\u003e    LDAP_MAIL_ATTRIBUTE=zimbraMailDeliveryAddress\n\u003e    ```\n\n## Migrating from Baïkal?\n\nIf you're migrating from Baïkal, then you will likely want to do the following :\n\n1. Get a backup of your data (without the `CREATE`  statements, but with complete `INSERT`  statements):\n\n    ```shell\n    mysqldump -u root -p --no-create-info --complete-insert baikal \u003e baikal_to_davis.sql # baikal is the actual name of your database\n    ```\n\n2. Create a new database for Davis (let's name it `davis`) and create the base schema:\n\n    ```shell\n    bin/console doctrine:migrations:migrate 'DoctrineMigrations\\Version20191030113307' --no-interaction\n    ```\n\n3. Reimport the data back:\n\n    ```\n    mysql -uroot -p davis \u003c baikal_to_davis.sql\n    ```\n\n4. Run the necessary remaining migrations:\n\n    ```\n    bin/console doctrine:migrations:migrate\n    ```\n\n\u003e [!NOTE]\n\u003e Some details / steps to resolve are also available in https://github.com/tchapi/davis/issues/226.\n\n# 🌐 Access / Webserver\n\nA simple status page is available on the root `/` of the server.\n\nThe administration interface is available at `/dashboard`. You need to login to use it (See `ADMIN_LOGIN` and `ADMIN_PASSWORD` env vars).\n\nThe main endpoint for CalDAV, WebDAV or CardDAV is at `/dav`.\n\n\u003e [!TIP]\n\u003e\n\u003e For shared hosting, the `symfony/apache-pack` is included and provides a standard `.htaccess` file in the public directory so redirections should work out of the box.\n\n## API Endpoint\n\nFor user and calendar management there is an API endpoint. See [the API documentation](docs/api/README.md) for more information.\n\n\u003e [!TIP]\n\u003e\n\u003e The API endpoint requires an environment variable `API_KEY` set to a secret key that you will use in the `X-Davis-API-Token` header of your requests to authenticate. You can generate it with `bin/console api:generate`\n\n## Webserver Configuration Examples\n\n### Example Caddy 2 configuration\n\n```\ndav.domain.tld {\n    # General settings\n    encode zstd gzip\n    header {\n        -Server\n        -X-Powered-By\n\n        # enable HSTS\n        Strict-Transport-Security max-age=31536000;\n\n        # disable clients from sniffing the media type\n        X-Content-Type-Options nosniff\n\n        # keep referrer data off of HTTP connections\n        Referrer-Policy no-referrer-when-downgrade\n    }\n\n    root * /var/www/davis/public\n    php_fastcgi 127.0.0.1:8000\n    file_server\n}\n```\n### Example Apache 2.4 configuration\n\n```apache\n\u003cVirtualHost *:80\u003e\n    ServerName dav.domain.tld\n\n    DocumentRoot /var/www/davis/public\n    DirectoryIndex /index.php\n\n    \u003cDirectory /var/www/davis/public\u003e\n        AllowOverride None\n        Order Allow,Deny\n        Allow from All\n        FallbackResource /index.php\n    \u003c/Directory\u003e\n\n    # Apache \u003e 2.4.25, else remove this part\n    \u003cDirectory /var/www/davis/public/bundles\u003e\n        FallbackResource disabled\n    \u003c/Directory\u003e\n\n    # Env vars (if you did not use .env.local)\n    SetEnv APP_ENV prod\n    SetEnv APP_SECRET \u003capp-secret-id\u003e\n    SetEnv DATABASE_DRIVER \"mysql\"\n    SetEnv DATABASE_URL \"mysql://db_user:db_pass@host:3306/db_name?serverVersion=10.9.3-MariaDB\u0026charset=utf8mb4\"\n    # ... etc\n\u003c/VirtualHost\u003e\n```\n\n### Example Nginx configuration\n\n```nginx\nserver {\n    server_name dav.domain.tld;\n    root /var/www/davis/public;\n\n    location / {\n        try_files $uri /index.php$is_args$args;\n    }\n\n    location /bundles {\n        try_files $uri =404;\n    }\n\n    location ~ ^/index\\.php(/|$) {\n        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # Change for your PHP version\n        fastcgi_split_path_info ^(.+\\.php)(/.*)$;\n        include fastcgi_params;\n\n        # Env vars (if you did not use .env.local)\n        fastcgi_param APP_ENV prod;\n        fastcgi_param APP_SECRET \u003capp-secret-id\u003e;\n        fastcgi_param DATABASE_DRIVER \"mysql\";\n        fastcgi_param DATABASE_URL \"mysql://db_user:db_pass@host:3306/db_name?serverVersion=10.9.3-MariaDB\u0026charset=utf8mb4\";\n        # ... etc ...\n\n        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n        fastcgi_param DOCUMENT_ROOT $realpath_root;\n        internal;\n    }\n\n    location ~ \\.php$ {\n        return 404;\n    }\n}\n```\n\nMore examples and information [here](https://symfony.com/doc/current/setup/web_server_configuration.html).\n\n## Well-known redirections for CalDAV and CardDAV\n\nWeb-based protocols like CalDAV and CardDAV can be found using a discovery service. Some clients require that you implement a path prefix to point to the correct location for your service. See [here](https://en.wikipedia.org/wiki/List_of_/.well-known/_services_offered_by_webservers) for more info.\n\nIf you use Apache as your webserver, you can enable the redirections with:\n\n```apache\nRewriteEngine On\nRewriteRule ^\\.well-known/carddav /dav/ [R=301,L]\nRewriteRule ^\\.well-known/caldav /dav/ [R=301,L]\n```\n\nMake sure that `mod_rewrite` is enabled on your installation beforehand.\n\nIf you use Nginx, you can add this to your configuration:\n\n```nginx\nlocation / {\n    rewrite ^/.well-known/carddav /dav/ redirect;\n    rewrite ^/.well-known/caldav /dav/ redirect;\n}\n```\n\n# 🐳 Dockerized installation\n\nA `Dockerfile` is available for you to compile the image.\n\nTo build the checked out version, just run:\n\n    docker build --pull --file docker/Dockerfile --tag davis:latest --build-arg fpm_user=82:82 .\n\n\u003e [!TIP]\n\u003e\n\u003e The `fpm_user` build arg allows to set:\n\u003e  - the uid FPM will run with\n\u003e  - the owner of the app folder\n\u003e\n\u003e This is helpful if you have a proxy that does not use the same default PHP Alpine uid/gid for www-data (82:82). For instance, in the docker compose file, nginx uses 101:101\n\u003e\n\nThis will build a `davis:latest` image that you can directly use. Do not forget to pass sensible environment variables to the container since the _dist_ `.env` file will take precedence if no `.env.local` or environment variable is found.\n\nYou can use `--platform` to specify the platform to build for. Currently, `arm64` (ARMv8) and `amd64` (x86) are supported.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e ⚠ Do not forget to run all the database migrations the first time you run the container :\n\u003e\n\u003e     docker exec -it davis sh -c \"APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction\"\n\n## Docker images\n\nFor each release, a Docker image is built and published in the [Github package repository](https://github.com/tchapi/davis/pkgs/container/davis).\n\n### Release images\n\nEach release builds and tags two images: one for the standard build (no reverse-proxy) and one for the standalone build (including Caddy as a reverse-proxy). Example:\n\n```\ndocker pull ghcr.io/tchapi/davis:v4.4.0\n```\n\n```\ndocker pull ghcr.io/tchapi/davis-standalone:v4.4.0\n```\n\n### Edge image\n\nThe edge image is generally built from the tip of the main branch, but might sometimes be used for specific branch testing:\n\n```\ndocker pull ghcr.io/tchapi/davis:edge\n```\n\n\u003e [!WARNING]\n\u003e\n\u003e The `edge` image must not be considered stable. **Use only release images for production setups**.\n\n## Full stack\n\nA few `docker-compose.yml` files are also included (in the `docker` folder) as minimal example setups, with various databases for instance.\n\nYou can start the containers with :\n\n    cd docker \u0026\u0026 docker compose up -d\n\n\u003e [!NOTE]\n\u003e\n\u003e The default recipe above uses MariaDB.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e ⚠ Do not forget to run all the database migrations the first time you run the container :\n\u003e\n\u003e     docker exec -it davis sh -c \"APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction\"\n\n\u003e [!WARNING]\n\u003e\n\u003e For SQLite, you must also make sure that the folder the database will reside in AND the database file in itself have the right permissions! You can do for instance:\n\u003e `chown -R www-data: /data` if `/data` is the folder your SQLite database will be in, just after you have run the migrations\n\n### Updating from a previous version\n\nIf you update the code, you need to make sure the database structure is in sync.\n\n**Before v3.0.0**, you need to force the update:\n\n    docker exec -it davis sh -c \"APP_ENV=prod bin/console doctrine:schema:update --force --no-interaction\"\n\n**For v3.0.0 and after**, you can just migrate again (_provided you correctly followed the migration notes in the v3.0.0 release_):\n\n    docker exec -it davis sh -c \"APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction\"\n\n\nThen, head up to `http://\u003cYOUR_DOCKER_IP\u003e:9000` to see the status display :\n\n![Status page](_screenshots/status.png)\n\n\u003e Note that there is no user and no principals created by default.\n\n# NixOS Installation\n\nTo install Davis on NixOS, you can use the builtin NixOS module [`services.davis`](https://search.nixos.org/options?channel=unstable\u0026query=services.davis).\n\nCurrently the NixOS module and package are in the nixos-unstable channel, but they are slated to enter the stable channel in the 24.05 release.\n\n* [All `services.davis` options](https://search.nixos.org/options?channel=unstable\u0026query=services.davis)\n* [Basic Guide](https://nixos.org/manual/nixos/unstable/#module-services-davis)\n\nIf you encounter a bug or problem with the NixOS Davis module please open an issue [at the nixpkgs repo](https://github.com/NixOS/nixpkgs/issues/new/choose) so the module maintainers can assist.\n\n# Development\n\nYou can spin off a local PHP webserver with:\n\n    php -S localhost:8000 -t public\n\nIf you change or add translations, you need to update the `messages` XLIFF file with:\n\n    bin/console translation:extract en --force --domain=messages+intl-icu\n\n## Testing\n\nYou can use:\n\n    ./vendor/bin/phpunit\n\n## ✨ Code linting\n\nWe use [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) with:\n\n    PHP_CS_FIXER_IGNORE_ENV=True ./vendor/bin/php-cs-fixer fix\n\n## ❓ How-to's\n\nBelow are some issues that can bring more info / insight into custom setups that Davis users have experienced in the past. Hopefully it can help:\n\n  - **Davis on Proxmox / TrueNAS Scale**: https://github.com/tchapi/davis/issues/164\n\n\n## 🐛 Troubleshooting\n\nDepending on how you run Davis, logs are either:\n  - [dev] printed out directly in the console\n  - [dev] available in the Symfony Debug Bar in the [Profiler](https://symfony.com/doc/current/profiler.html)\n  - [dev] logged in `./var/log/dev.log`\n  - [prod] logged in `./var/log/prod.log`, but only if there has been an error (_it's the fingers_crossed filter, explained [here](https://symfony.com/doc/current/logging.html#handlers-that-modify-log-entries)_)\n\n\u003e [!NOTE]\n\u003e\n\u003e It's `./var/log` (relative to the Davis installation), not `/var/log`.\n\u003e\n\u003e To tail the aplication log on Docker, do:\n\u003e ```\n\u003e docker exec -it davis tail /var/www/davis/var/log/prod.log\n\u003e ```\n\n### I have a \"Bad timezone configuration env var\" error on the dashboard\n\nIf you see this:\n\n![Bad timezone configuration env var error](_screenshots/bad_timezone_configuration_env_var.png)\n\nIt means that the value you set for the `APP_TIMEZONE` env var is not a correct timezone, as per [the official list](https://www.php.net/manual/en/timezones.php). Your timezone has thus not been set and is the server's default (Here, UTC). Adjust the setting accordingly.\n\n### I have a 500 and no tables have been created\n\nYou probably forgot to run the migration once to create the necessary DB schema\n\nIn Docker:\n\n```shell\ndocker exec -it davis sh -c \"APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction\"\n```\n\nIn a shell, if you run Davis locally:\n\n    bin/console doctrine:migrations:migrate\n\n### I have a 500 and a log about `Uncaught Error: Class \"Symfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle\" not found`\n\nYou are running the app in dev mode, but you haven't installed the dev dependencies. Either:\n\na. Set `APP_ENV=prod` in your local env file (See configuration above)\n\nb. Or `composer install` (without the `--no-dev` flag)\n\n\n### The LDAP connection is not working\n\n\u003e [!NOTE]\n\u003e\n\u003e Make sure all environment parameters are in plain text (no quotes).\n\nCheck if your instance can reach your LDAP server:\n\n  - For Docker instances: make sure it is on the same network\n  - Check connection via `ldapsearch`:\n\n    ```shell\n    # For docker: connect into container's shell\n    docker exec -it davis sh\n\n    # install ldap utils (for alpine linux)\n    apk add openldap-clients\n\n    # User checking their own entry\n    ldapsearch -H ldap://lldap-server:3890 -D \"uid=someuser,ou=users,dc=domain,dc=com\" -W -b \"dc=domain,dc=com\" \"(uid=someuser)\"\n    ```\n\n  - Check that the `LDAP_DN_PATTERN` filter is compliant with your LDAP service\n  - Example: `uid=%u,ou=people,dc=domain,dc=com`: [LLDAP](https://github.com/lldap/lldap) uses `people` instead of `users`.\n\n### The birthday calendar is not synced / not up to date\n\nAn update event might have been missed. In this case, it's easy to resync all contacts by issuing the command:\n\n```\nbin/console dav:sync-birthday-calendar\n```\n\n# 📚 Libraries used\n\n  - Symfony 7 (Licence : MIT)\n  - Sabre-io/dav (Licence : BSD-3-Clause)\n  - Bootstrap 5 (Licence : MIT)\n\n_This project does not use any pipeline for the assets since the frontend side is relatively simple, and based on Bootstrap._\n\n# ⚖️ Licence\n\nThis project is release under the MIT licence. See the LICENCE file\n\n[ci_badge]: https://github.com/tchapi/davis/workflows/CI/badge.svg\n[ci_link]: https://github.com/tchapi/davis/actions?query=workflow%3ACI\n\n[sponsor_badge]: https://img.shields.io/badge/sponsor%20me-🙏-blue?logo=paypal\n[sponsor_link]: https://paypal.me/tchap\n\n[release_badge]: https://img.shields.io/github/v/release/tchapi/davis\n[release_link]: https://github.com/tchapi/davis/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Fdavis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchapi%2Fdavis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Fdavis/lists"}