The Calendar and Contacts Server.
Python SQLPL PLpgSQL Shell JavaScript HTML Other
Switch branches/tags
Latest commit bd91ced Jun 29, 2017 @m0rgen m0rgen committed with dreness Handle variable length APNS device tokens (#496)
* Handle variable length APNS device tokens

* Update comment
Permalink
Failed to load latest commit information.
bin Avoid permissions errors due to SIP on macOS Mar 22, 2017
calendarserver Handle variable length APNS device tokens (#496) Jun 29, 2017
conf Enable Directory Proxy Service for macOS Server, since it’s needed fo… May 25, 2017
contrib Update copyrights Feb 27, 2017
doc Add 'installation' section, with full recognitition of the fact that … Jun 27, 2017
lib-patches Merge from trunk. Jul 7, 2016
locales Update copyrights Feb 27, 2017
simplugin Update copyrights Feb 27, 2017
support Adds a command line tool for migrating wiki principals into resource … Mar 4, 2017
twisted/plugins Update copyrights Feb 27, 2017
twistedcaldav Add —mailto option to the export tool to convert non-mailto: CUAs to … Mar 23, 2017
txdav algorithm header is not required by the spec; make it optional, with … Mar 29, 2017
txweb2 Update copyrights Feb 27, 2017
.gitignore Tweak keychain init to also set trust settings (user interaction Aug 19, 2016
.project Merge of bypass-dps. Dec 13, 2016
.pydevproject Add extra logging/tracking of auto-scheduling. Apr 10, 2014
.travis.yml Travis-CI integration (#481) Feb 18, 2017
CONTRIBUTING.md Update links Apr 20, 2016
HACKING.rst Rename Contributing.rst back to HACKING.rst, with url tweaks. Apr 18, 2016
LICENSE.txt Yay file extentions. Jan 23, 2014
PULL_REQUEST_TEMPLATE.md Requested to copy 'contributing' file May 11, 2016
README.rst Update copyrights Feb 27, 2017
requirements-cs.txt The dependency “six” was not being built. Jan 5, 2017
requirements-default.txt Support for pySecureTransport in addition to pyOpenSSL. Oct 23, 2015
requirements-dev.txt Update dependencies to latest releases Dec 5, 2016
requirements-ignore-installed.txt Update to Twisted 16.6 Dec 5, 2016
requirements-osx.txt Support for pySecureTransport in addition to pyOpenSSL. Oct 23, 2015
requirements-twisted-default.txt Add “constantly” as a Twisted dependency, build “incremental” before … Jan 4, 2017
requirements-twisted-osx.txt Add “constantly” as a Twisted dependency, build “incremental” before … Jan 4, 2017
setup.py Enable Directory Proxy Service for macOS Server, since it’s needed fo… May 25, 2017

README.rst

Getting Started

This is the core code base for the Calendar and Contacts Server, which is a CalDAV, CardDAV, WebDAV, and HTTP server.

For general information about the server, see https://apple.github.io/ccs-calendarserver.

Copyright and License

Copyright (c) 2005-2017 Apple Inc. All rights reserved.

This software is licensed under the Apache License, Version 2.0. The Apache License is a well-established open source license, enabling collaborative open source software development.

See the "LICENSE" file for the full text of the license terms.

QuickStart

WARNING: these instructions are for running a server from the source tree, which is useful for development. These are not the correct steps for running the server in deployment or as part of an OS install. You should not be using the run script in system startup files (eg. /etc/init.d); it does things (like download software) that you don't want to happen in that context.

Begin by creating a directory to contain Calendar and Contacts Server and all its dependencies:

mkdir ~/CalendarServer
cd CalendarServer

Next, check out the source code from the GIT repository. To check out the latest code:

git clone https://github.com/apple/ccs-calendarserver.git

Note: if you have two-factor authentication activated on GitHub, you'll need to use a personal access token instead of your password. You can generate personal access tokens at https://github.com/settings/tokens

Pip is used to retrieve the python dependencies and stage them for use by virtualenv, however if your system does not have pip (and virtualenv), install it by running:

python -m ensurepip

If this yields a permission denied error, you are likely using a system-wide installation of Python, so either retry with a user installation of Python or prefix the command with 'sudo'.

The server requires various external libraries in order to operate. The bin/develop script in the sources will retrieve these dependencies and install them to the .develop directory. Note that this behavior is currently also a side-effect of bin/run, but that is likely to change in the future:

cd ccs-calendarserver
./bin/develop
____________________________________________________________

Using system version of libffi.

____________________________________________________________

Using system version of OpenLDAP.

____________________________________________________________

Using system version of SASL.

____________________________________________________________
...

Before you can run the server, you need to set up a configuration file for development. There is a provided test configuration that you can use to start with, conf/caldavd-test.plist, which can be copied to conf/caldavd-dev.plist (the default config file used by the bin/run script). If conf/caldavd-dev.plist is not present when the server starts, you will be prompted to create a new one from conf/caldavd-test.plist.

You will need to choose a directory service to use to populate your server's principals (users, groups, resources, and locations). A directory service provides the Calendar and Contacts Server with information about these principals. The directory services supported by Calendar and Contacts Server are:

  • XMLDirectoryService: this service is configurable via an XML file that contains principal information. The file conf/auth/accounts.xml provides an example principals configuration.
  • OpenDirectoryService: this service uses Apple's OpenDirectory client, the bulk of the configuration for which is handled external to Calendar and Contacts Server (e.g. System Preferences --> Users & Groups --> Login Options --> Network Account Server).
  • LdapDirectoryService: a highly flexible LDAP client that can leverage existing LDAP servers. See twistedcaldav/stdconfig.py for the available LdapDirectoryService options and their defaults.

The caldavd-test.plist configuration uses XMLDirectoryService by default, set up to use conf/auth/accounts-test.xml. This is a generally useful configuration for development and testing.

This file contains a user principal, named admin, with password admin, which is set up (in caldavd-test.plist) to have administrative permissions on the server.

Start the server using the bin/run script, and use the -n option to bypass dependency setup:

bin/run -n
Using /Users/andre/CalendarServer/ccs-calendarserver/.develop/roots/py_modules/bin/python as Python

Missing config file: /Users/andre/CalendarServer/ccs-calendarserver/conf/caldavd-dev.plist
You might want to start by copying the test configuration:

  cp conf/caldavd-test.plist conf/caldavd-dev.plist

Would you like to copy the test configuration now? [y/n]y
Copying test cofiguration...

Starting server...

The server should then start up and bind to port 8008 for HTTP and 8443 for HTTPS. You should then be able to connect to the server using your web browser (eg. Safari, Firefox) or with a CalDAV client (eg. Calendar).