A modern, simple, feature-packed, fully translatable admin interface for sabre/dav based on Symfony 7 and Bootstrap
A modern, simple, feature-packed, fully translatable admin interface for sabre/dav based on Symfony 7 and Bootstrap
A modern, simple, feature-packed, fully translatable DAV server, admin interface and frontend based on sabre/dav, built with Symfony 7 and Bootstrap 5, initially inspired by Baïkal (see dependencies table below for more detail)
Provides 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.
Supports Basic authentication, as well as IMAP and LDAP (via external providers).
The 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).
Easily containerisable (Dockerfile and sample docker-compose configuration file provided).
NixOS package and module available.
Comes with already built Docker images in two flavours: standalone (with included Caddy reverse proxy) or barebone.
✨ Created and maintained (with the help of the community) by @tchapi. ✨
| Dark / Light mode | Useful information at hand |
|---|---|
pdo_mysql [or pdo_pgsql, pdo_sqlite], gd and intl extensions), compatible up to PHP 8.5 (See dependencies table below)imap and ldap PHP extensions if you want to use either authentication methods (these are not enabled / compiled by default except in the Docker image)| Release | Status | PHP version |
|---|---|---|
main (edge) |
development branch | PHP 8.2+ |
v5.x |
stable | PHP 8.2+ |
v4.x |
security fixes only | PHP 8.0 → 8.3 |
v3.x |
:warning: unmaintained | PHP 7.3 → 8.2 |
Clone this repository
Retrieve the dependencies:
a. If you plan to run Davis locally, for development purposes
composer installb. If you plan to run Davis on production
composer install --no-devAnd set APP_ENV=prod in your .env.local file (see below)
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.
Run the migrations to create all the necessary tables:
bin/console doctrine:migrations:migrateDavis 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.
[!NOTE]
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)
Create your own .env.local file to change the necessary variables, if you plan on using symfony/dotenv.
[!NOTE]
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.
[!CAUTION]
In a production environnement, the
APP_ENVvariable MUST be set toprodto prevent leaking sensitive data.
a. The database driver and url (you should already have it configured since you created the database previously)
DATABASE_DRIVER=mysql # or postgresql, or sqlite
DATABASE_URL=mysql://db_user:db_pass@host:3306/db_name?serverVersion=10.9.3-MariaDB&charset=utf8mb4b. The admin password for the backend
ADMIN_LOGIN=admin
ADMIN_PASSWORD=test[!NOTE]
You can bypass auth entirely if you use a third party authorization provider such as Authelia. In that case, set the
ADMIN_AUTH_BYPASSenv var totrue(case-sensitive, this is actually the stringtrue, not a boolean) to allow full access to the dashboard. This does not change the behaviour of the DAV server.
c. The auth Realm and method for HTTP auth
AUTH_REALM=SabreDAV
AUTH_METHOD=Basic # can be "Basic", "IMAP" or "LDAP"See the following paragraph for more information if you choose either IMAP or LDAP.
d. The global flags to enable CalDAV, CardDAV and WebDAV. You can also disable the option to have calendars public
CALDAV_ENABLED=true
CARDDAV_ENABLED=true
WEBDAV_ENABLED=false
PUBLIC_CALENDARS_ENABLED=true[!NOTE]
By default,
PUBLIC_CALENDARS_ENABLEDis 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).
e. Mailer configuration
It includes:
MAILER_DSN)MAILER_DSN=smtp://user:[email protected]:port
[email protected][!WARNING] If the username, password or host contain any character considered special in a URI (such as
: / ? # [ ] @ ! $ & ' ( ) * + , ; =), you MUST encode them. See here for more details.
f. The reminder offset for all birthdays
You must specify a relative duration, as specified in the RFC 5545 spec
BIRTHDAY_REMINDER_OFFSET=PT9HIf you don't want a reminder for birthday events, set it to the false value (lowercase):
BIRTHDAY_REMINDER_OFFSET=false[!NOTE]
By default, if the env var is not set or empty, we use
PT9H(9am on the date of the birthday).
g. The paths for the WebDAV installation
[!TIP]
I recommend that you use absolute directories so you know exactly where your files reside.
WEBDAV_TMP_DIR=/webdav/tmp
WEBDAV_PUBLIC_DIR=/webdav/public
WEBDAV_HOMES_DIR=[!NOTE]
In a docker setup, I recommend setting
WEBDAV_TMP_DIRto/tmp.
[!NOTE]
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/homesfor instance, so that users cannot access other users' homes.
h. The log file path
You 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.
LOG_FILE_PATH="%kernel.logs_dir%/%kernel.environment%.log"i. The timezone you want for the app
This must comply with the official list
APP_TIMEZONE=Australia/Lord_HoweSet a void value like so:
APP_TIMEZONE=in your environment file if you wish to use the actual default timezone of the server, and not enforcing it.
j. Trusting forwarded headers
If 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 for possible values):
SYMFONY_TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR.env) pathYou can override the expected location of the environment files (.env, .env.local, etc) by setting the ENV_DIR variable.
The 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.
For instance, you can use it to call bin/console with a specific dotenv directory:
> ENV_DIR=/var/lib/davis bin/consoleOr use it directly in the Apache configuration
# .. rest of config (see ¶ below)
SetEnv ENV_DIR /var/lib/davis
# ... other env vars if needed
In 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.
You should also explicitely define whether you want new authenticated users to be created upon login:
IMAP_AUTH_URL=imap.mydomain.com:993
IMAP_ENCRYPTION_METHOD=ssl # ssl, tls or false
IMAP_CERTIFICATE_VALIDATION=true
IMAP_AUTH_USER_AUTOCREATE=true # false by defaultSame 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):
LDAP_AUTH_URL=ldap://127.0.0.1:3890 # default LDAP port
LDAP_DN_PATTERN=uid=%u,ou=users,dc=domain,dc=com
LDAP_MAIL_ATTRIBUTE=mail
LDAP_AUTH_USER_AUTOCREATE=true # false by default
LDAP_CERTIFICATE_CHECKING_STRATEGY=try # try by default. Other values are: never, hard, demand or allowEx: for Zimbra LDAP, you might want to use the
zimbraMailDeliveryAddressattribute to retrieve the principal user email:LDAP_MAIL_ATTRIBUTE=zimbraMailDeliveryAddress
If you're migrating from Baïkal, then you will likely want to do the following :
Get a backup of your data (without the CREATE statements, but with complete INSERT statements):
mysqldump -u root -p --no-create-info --complete-insert baikal > baikal_to_davis.sql # baikal is the actual name of your databaseCreate a new database for Davis (let's name it davis) and create the base schema:
bin/console doctrine:migrations:migrate 'DoctrineMigrations\Version20191030113307' --no-interactionReimport the data back:
…dav.domain.tld { # General settings encode zstd gzip header { -Server -X-Powered-By
# enable HSTS
Strict-Transport-Security max-age=31536000;
# disable clients from sniffing the media type
X-Content-Type-Options nosniff
# keep referrer data off of HTTP connections
Referrer-Policy no-referrer-when-downgrade
}
root * /var/www/davis/public
php_fastcgi 127.0.0.1:8000
file_server
}
### Example Apache 2.4 configuration
```apache
ServerName dav.domain.tld
DocumentRoot /var/www/davis/public
DirectoryIndex /index.phpNo open issues yet, or sync has not completed.