Contribute to this guideReport an issue

guideGetting started

If you would like to go straight to the point and see an example of an application with working CKFinder, have a look at the CKFinder 3 for Java - demo application repository.

# 1. Add CKSource Maven Repository to your project


// build.gradle
repositories {
    maven {
        url = ''


<!-- pom.xml -->
    <name>CKSource Maven Repository</name>

# 2. Add CKFinder in project dependencies


// build.gradle
dependencies {
    compile 'com.cksource:ckfinder3:3.5.1'


<!-- pom.xml -->

# 3. Enable the CKFinder servlet in your configuration

<!-- web.xml -->

Please note that the multipart configuration is mandatory. File uploads in CKFinder will not work without it.

The above example assumes that the servlet is registered in the web.xml file, but you might want to register it another way. Here you can read more about servlet registration methods.

# 4. Add the configuration file and adjust the configuration options

At this point you need to alter the configuration options to configure paths used by CKFinder, define access permissions, file extension whitelists, etc.

By default, the CKFinder connector looks for a configuration file named ckfinder.yml in application resources. Here you can find a template of this configuration file.

If you would like to load the configuration from any other location, have a look at the Loading configuration from a custom location tutorial.

In case when the files managed by CKFinder are served through the web server, it is recommended to perform some server configuration fine-tuning to make sure the files are served in a secure manner. To read more, refer to the Securing a publicly accessible folder article.

# 5. Configure authentication

Usually, you will want to restrict the access to CKFinder, so only authenticated users of your application can upload or browse files. You can achieve this by implementing a custom Authenticator.

To read more, refer to the Configuring authentication tutorial.

# Demo application

Check an example of a basic setup of CKFinder in a Spring Boot application.

Please note that Spring Boot is not necessary to use CKFinder, you can set it up like any other regular servlet. If you would like to read more about servlet registration methods, refer to the How to Register a Servlet in Java article by Baeldung.