This tutorial will show you how to deploy your Java app in several minutes. These instructions will also give you enough information to make the most out of Dokkur.

Be sure that you already have:

  1. Dokkur account.
  2. SSH keys added to your account.
  3. Java 8 installed locally.
  4. Maven 3 installed locally.

Set up

In this step you will install the Dokkur Toolbelt that gives you you access to the Dokkur Command Line Interface (CLI).

After installation you can use dokkur login command to log in with your email and password you set when creating Dokkur account.

Prepare the app

To deploy an app you need to have the app prepared for deployment.

If you don’t have your own Java project, you can use a template that we have already prepared for you:

$ git clone
$ cd java-getting-started

You now have a functioning git repository that contains a simple application as well as a pom.xml file, which is used by Java’s dependency manager, Maven.

If you have a Java app that you want to deploy, you need to do some preparations.

Declare app dependencies

How does Dokkur recognize an app as a Java app? The answer is by the existence of a pom.xml file in the root directory. You can create it by running mvn archetype:create.

It may look something like this:


The pom.xml file lists the app dependencies together with their versions. When an app is deployed, Dokkur reads this file and installs the appropriate Java dependencies using the mvn clean installcommand.

Another file,, determines the version of Java to use. The contents of this file, which is optional, is quite straightforward:


Run mvn clean install in your local directory to install the dependencies, preparing your system for running the app locally.

$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloaded: (5 KB at 14.9 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.584s
[INFO] Finished at: 2015-07-06T09:52:33+01:00
[INFO] Final Memory: 19M/222M
[INFO] ------------------------------------------------------------------------

If you do not have Maven installed, or get an error like “‘mvn’ is not recognized as an internal or external command”, then you can use the wrapper command instead by running mvnw clean install on Windows or ./mvnw clean install on Mac and Linux. This will both install Maven and run the Maven command.
The Maven process copies dependencies into your application’s target/dependency directory. This process is called “vendoring”, and it is accomplished by the following plugin configuration in the pom.xml file.


Once dependencies are installed, you will be ready to run your app locally.

Create a new app

Follow these steps:

  1. Open website, go to Personal apps (left menu bar)
  2. Click ⨁ button to open New App interface
  3. Enter the app’s name (Caution! Use latin lowercase and numbers, e.g. myapp007), choose available and convenient instances for hosting, pick Custom App template and press Create App button.

Congrats! Your app has easily been created. Now you need to deploy it. Just do it!

Add BUILDPACK_URL config var

  1. Go to Settings page, in Environmental variables section click on Edit button.
  3. In the Name field write BUILDPACK_URL
  4. In the VALUE field put
  5. Save settings

Deploy your app

  1. Go to Settings page, copy the app git url from the Git URL section.
  2. Switch to Dokkur Toolbelt and execute this command:

    git remote add dokkur git_url
    Instead of git_url paste your app's git url.

  3. Push your app:
    git push dokkur master
    If you want to deploy another branch, run:
    git push dokkur yourbranch:master

Hell yeah! Your app is deployed! Open in your browser.