The code that runs CKAN is open-source and licensed under the MIT license. It is hosted on KnowledgeForge, and the project home page is here:http://knowledgeforge.net/project/ckan/.
All content and data on CKAN is open and can be freely used, reused and redistributed. Formally, it is made available under a Creative Commons Attribution Share-Alike v3.0 license with the additional provision that this license should be read broadly to cover not only copyright but also all other IP rights present in this material including, for example, any database rights.
For convenience, all material -- including all package, tag and revision information -- is available in bulk, in the form of a full dump of the CKAN database. This (gzipped) dump file is updated daily and can be downloaded from http://www.ckan.net/images/ckan.sql.gz.